/* Light mode variables */
:root {
  --primary-color: #5badf0;
  --primary-hover: #4a97d8;
  --secondary-color: #1968a8;
  --secondary-hover: #155690;
  --success-color: #4caf50;
  --success-hover: #43a047;
  --background-color: #f9f9f9;
  --background-start-rgb: 249, 249, 249;
  --background-end-rgb: 255, 255, 255;
  --card-background: #ffffff;
  --card-rgb: 255, 255, 255;
  --foreground-rgb: #333333;
  --secondary-foreground: #666666;
  --link-color: #5badf0;
  --text-color: #333;
  --title-color: #272727;
  --error-color: #ff5252;
  --error-background: #ffebee;
  --success-background: rgba(76, 175, 80, 0.1);
  --success-text: #4caf50;
  --notice-background: #fff3e0;
  --notice-text: #e65100;
  --notice-border: #ff9800;
  --input-background: #ffffff;
  --input-border: #ddd;
  --input-focus-border: #5badf0;
  --input-prefix-background: #f8f8f8;
  --button-background: #f1f1f1;
  --button-text: #444;
  --button-hover: #e5e5e5;
  --button-disabled: #f5f5f5;
  --button-disabled-text: #aaa;
  --chart-bar: #5badf0;
  --chart-background: #f8f9fa;
  --timestamp-color: #888;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --emoji-button-bg: #f5f5f5;
  --emoji-button-border: #ddd;
  --emoji-grid-bg: #fcfcfc;
  --tile-border: rgba(0, 0, 0, 0.1);
  --hover-overlay: rgba(0, 0, 0, 0.05);
}

/* Dark mode variables */
[data-theme="dark"] {
  --primary-color: #5badf0;
  --primary-hover: #4a97d8;
  --secondary-color: #69c0ff;
  --secondary-hover: #5aafeb;
  --success-color: #4caf50;
  --success-hover: #43a047;
  --background-color: #121212;
  --background-start-rgb: 18, 18, 18;
  --background-end-rgb: 30, 30, 30;
  --card-background: #1e1e1e;
  --card-rgb: 30, 30, 30;
  --foreground-rgb: #dddddd;
  --secondary-foreground: #aaaaaa;
  --link-color: #5badf0;
  --text-color: #dddddd;
  --title-color: #e0e0e0;
  --error-color: #ff7070;
  --error-background: #4a161a;
  --success-background: rgba(76, 175, 80, 0.2);
  --success-text: #7dff83;
  --notice-background: #3d2e15;
  --notice-text: #ffae5e;
  --notice-border: #ff9800;
  --input-background: #2d2d2d;
  --input-border: #444;
  --input-focus-border: #5badf0;
  --input-prefix-background: #252525;
  --button-background: #2d2d2d;
  --button-text: #e0e0e0;
  --button-hover: #3a3a3a;
  --button-disabled: #252525;
  --button-disabled-text: #666;
  --chart-bar: #5badf0;
  --chart-background: #252525;
  --timestamp-color: #aaa;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --emoji-button-bg: #2d2d2d;
  --emoji-button-border: #444;
  --emoji-grid-bg: #252525;
  --tile-border: rgba(255, 255, 255, 0.1);
  --hover-overlay: rgba(255, 255, 255, 0.05);
}

/* Automatically use dark mode if user prefers it */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary-color: #5badf0;
    --primary-hover: #4a97d8;
    --secondary-color: #69c0ff;
    --secondary-hover: #5aafeb;
    --success-color: #4caf50;
    --success-hover: #43a047;
    --background-color: #121212;
    --background-start-rgb: 18, 18, 18;
    --background-end-rgb: 30, 30, 30;
    --card-background: #1e1e1e;
    --card-rgb: 30, 30, 30;
    --foreground-rgb: #dddddd;
    --secondary-foreground: #aaaaaa;
    --link-color: #5badf0;
    --text-color: #dddddd;
    --title-color: #e0e0e0;
    --error-color: #ff7070;
    --error-background: #4a161a;
    --success-background: rgba(76, 175, 80, 0.2);
    --success-text: #7dff83;
    --notice-background: #3d2e15;
    --notice-text: #ffae5e;
    --notice-border: #ff9800;
    --input-background: #2d2d2d;
    --input-border: #444;
    --input-focus-border: #5badf0;
    --input-prefix-background: #252525;
    --button-background: #2d2d2d;
    --button-text: #e0e0e0;
    --button-hover: #3a3a3a;
    --button-disabled: #252525;
    --button-disabled-text: #666;
    --chart-bar: #5badf0;
    --chart-background: #252525;
    --timestamp-color: #aaa;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --emoji-button-bg: #2d2d2d;
    --emoji-button-border: #444;
    --emoji-grid-bg: #252525;
    --tile-border: rgba(255, 255, 255, 0.1);
    --hover-overlay: rgba(255, 255, 255, 0.05);
  }
  
  body {
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'decoy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

/* Font definitions */
.font-regular {
  font-family: 'decoy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  font-weight: 400;
  font-style: normal;
}

.font-medium {
  font-family: 'decoy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  font-weight: 500;
  font-style: normal;
}

.font-bold {
  font-family: 'decoy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  font-weight: 700;
  font-style: normal;
}

.font-black {
  font-family: 'decoy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  font-weight: 900;
  font-style: normal;
}

html,
body {
  font-family: 'decoy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  min-height: 100vh;
}

h1 {
  line-height: 2.5rem;
}

h2 {
  line-height: 2rem;
}

h3 {
  line-height: 2rem;
}

main {
  width: 100%;
  padding-bottom: 2rem;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button, input, select, textarea {
  font-family: 'decoy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

button {
  cursor: pointer;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.2s;
}

button:hover {
  background-color: var(--secondary-color);
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}

.card {
  background-color: var(--card-background);
  border: 1px solid var(--tile-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
  width: 100%;
  box-shadow: 0 2px 5px var(--shadow-color);
  /* Removed transitions */
  background-image: repeating-linear-gradient(0deg, var(--tile-border), var(--tile-border) 1px, transparent 1px, transparent 20px);
}

.card:hover {
  /* Removed transform and increased box-shadow to prevent movement */
  border-color: var(--primary-color);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--input-border);
  border-radius: 4px;
  font-size: 1rem;
  background-color: var(--input-background);
  color: var(--text-color);
}

.error {
  color: var(--error-color);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}