/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0e13;
  --bg-secondary: #111621;
  --bg-card: #161b22;
  --bg-tertiary: #1c2128;
  
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #656d76;
  
  --accent-primary: #238636;
  --accent-secondary: #1f6feb;
  --accent-success: #2ea043;
  --accent-warning: #fb8500;
  --accent-danger: #da3633;
  
  --border: #30363d;
  --border-muted: #21262d;
  
  /* Professional Gradients */
  --gradient-primary: linear-gradient(135deg, #238636 0%, #2ea043 100%);
  --gradient-secondary: linear-gradient(135deg, #1f6feb 0%, #388bfd 100%);
  --gradient-success: linear-gradient(135deg, #2ea043 0%, #46954a 100%);
  --gradient-warning: linear-gradient(135deg, #fb8500 0%, #fd7e14 100%);
  --gradient-danger: linear-gradient(135deg, #da3633 0%, #f85149 100%);
  
  /* Professional Typography */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Monaco, Consolas, monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Professional Spacing & Sizing */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.2);
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}

/* === UTILITIES === */
.hidden { display: none !important; }

/* === ONBOARDING === */
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 19, 0.95);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding-content {
  max-width: 600px;
  padding: 3rem;
  text-align: center;
}

/* Show onboarding step by default; use .hidden class to hide specific steps */
.onboarding-step {
  display: block;
}

.hero-welcome {
  margin-bottom: 3rem;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: var(--font-sans);
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 2rem;
}

.achievement-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.achievement-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: left;
}

.achievement-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.achievement-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.achievement-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.hero-description {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.cta-button, .next-button {
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  padding: 1rem 2rem;
  position: relative;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.cta-button:hover, .next-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.tutorial-highlight {
  position: fixed;
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%, -50%);
}

.pulse-ring {
  width: 100%;
  height: 100%;
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.8); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(0.8); opacity: 1; }
}

/* === MAIN INTERFACE === */
.game-interface {
  min-height: 100vh;
  background: var(--bg-primary);
  position: relative;
}

.game-interface::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90vw;
  height: 90vw;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(35, 134, 54, 0.2);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

/* Add an inner circle */
.game-interface::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70vw;
  height: 70vw;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(35, 134, 54, 0.03) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.game-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-title {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.title-icon {
  font-size: 1.25rem;
}

.header-stats {
  display: flex;
  gap: 2rem;
}

.stat-card {
  text-align: center;
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.back-button {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.back-button:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

.back-icon {
  font-size: 1.1rem;
}

#notification-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 300px;
}

.notification {
  padding: 12px 16px;
  background: var(--bg-card);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
}

.notification.show {
  transform: translateY(0);
  opacity: 1;
}

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.section-icon {
  font-size: 1.5rem;
}

.domains-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.domain {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.domain:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.domain h2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.domain-level {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: normal;
}

.domain-xp {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.bar-bg {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  width: 0;
  transition: width 0.5s ease-out;
  position: relative;
}

.domain-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.activity-button {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.activity-button:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-primary);
}

.smoke-button {
  border-color: var(--accent-danger);
}

.smoke-button:hover {
  border-color: var(--accent-danger);
}

.quick-actions {
  margin-top: 3rem;
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
}

.action-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.action-icon {
  font-size: 1.5rem;
}

.action-desc {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.dice-button {
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 auto;
}

.dice-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.dice-icon {
  font-size: 1.25rem;
}

.dice-result {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.complete-button {
  background: var(--gradient-success);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

.complete-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.management-section {
  margin-top: 3rem;
  display: flex;
  gap: 1rem;
}

.manage-button {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.manage-button:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-primary);
}

.manage-icon {
  font-size: 1rem;
}

/* === MANAGEMENT PAGE === */
.management-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.management-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.section-desc {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.add-form {
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.multi-input {
  display: grid;
  grid-template-columns: 1fr auto auto 1fr;
  gap: 1rem;
  align-items: center;
}

.form-input, .form-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.xp-input {
  width: 80px;
}

.add-button {
  background: var(--gradient-success);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.add-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.button-icon {
  font-size: 1rem;
}

.items-list {
  margin-top: 2rem;
}

.list-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.domain-list, .activity-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.domain-list li, .activity-list li {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.domain-list li:hover, .activity-list li:hover {
  border-color: var(--accent-primary);
  transform: translateX(4px);
}

.item-content {
  flex: 1;
}

.item-actions {
  display: flex;
  gap: 0.5rem;
}

.edit-btn, .remove-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.edit-btn:hover {
  color: var(--accent-primary);
}

.remove-btn:hover {
  color: var(--accent-danger);
}

.edit-form {
  display: none;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.edit-form.show {
  display: block;
}

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

.edit-form .form-group:last-child {
  margin-bottom: 0;
}

/* === TIPS SECTION === */
.tips-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.tips-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-warning);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.tip-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-warning);
  border-radius: 10px;
  flex-shrink: 0;
}

.tip-content {
  flex: 1;
}

.tip-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.tip-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes levelUp {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.level-up {
  animation: levelUp 0.6s ease-in-out;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .header-stats {
    justify-content: center;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .main-content {
    padding: 1rem;
  }
  
  .domain {
    padding: 1.5rem;
  }
  
  .notification {
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
  
  .multi-input {
    grid-template-columns: 1fr;
  }
  
  .form-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .tips-grid {
    grid-template-columns: 1fr;
  }
  
  .header-actions {
    gap: 0.5rem;
  }
  
  .back-button {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  transform: scale(1.1);
}

.theme-toggle span {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.theme-toggle:hover span {
  transform: rotate(15deg);
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-muted: #adb5bd;
  --accent-primary: #238636;
  --accent-secondary: #1f7a2e;
  --accent-success: #28a745;
  --accent-warning: #ffc107;
  --accent-danger: #dc3545;
  --border-color: #dee2e6;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.15);
  --shadow-heavy: rgba(0, 0, 0, 0.25);
}

/* Force proper text colors in light mode */
[data-theme="light"] body {
  color: #212529;
  background-color: #ffffff;
}

[data-theme="light"] .game-title,
[data-theme="light"] .section-title,
[data-theme="light"] .domain h2,
[data-theme="light"] .action-title,
[data-theme="light"] .list-title {
  color: #212529 !important;
}

[data-theme="light"] .domain-xp,
[data-theme="light"] .domain-level,
[data-theme="light"] .stat-label,
[data-theme="light"] .stat-value,
[data-theme="light"] .action-desc,
[data-theme="light"] .section-desc {
  color: #6c757d !important;
}

[data-theme="light"] .activity-button,
[data-theme="light"] .dice-button,
[data-theme="light"] .complete-button,
[data-theme="light"] .manage-button,
[data-theme="light"] .add-button,
[data-theme="light"] .cta-button,
[data-theme="light"] .next-button {
  color: #ffffff !important;
}

[data-theme="light"] .form-input,
[data-theme="light"] .form-select {
  color: #212529 !important;
  background-color: #ffffff !important;
}

[data-theme="light"] .form-input::placeholder {
  color: #6c757d !important;
}

[data-theme="light"] .domain-list li,
[data-theme="light"] .activity-list li {
  color: #212529 !important;
}

[data-theme="light"] .tip-title {
  color: #212529 !important;
}

[data-theme="light"] .tip-desc {
  color: #6c757d !important;
}

[data-theme="light"] .back-button {
  color: #212529 !important;
}

[data-theme="light"] .theme-toggle {
  color: #212529 !important;
}

[data-theme="light"] .dice-result {
  color: #212529 !important;
}

[data-theme="light"] .hero-title,
[data-theme="light"] .hero-subtitle,
[data-theme="light"] .hero-description {
  color: #212529 !important;
}

[data-theme="light"] .achievement-title {
  color: #212529 !important;
}

[data-theme="light"] .achievement-desc {
  color: #6c757d !important;
}

[data-theme="light"] .undo-btn {
  color: #000000 !important;
}

[data-theme="light"] .notification-message {
  color: #212529 !important;
}

[data-theme="light"] .circular-bg {
  background: radial-gradient(circle at center, rgba(35, 134, 54, 0.03) 0%, transparent 70%);
}

[data-theme="light"] .circular-bg::before {
  background: radial-gradient(circle, rgba(35, 134, 54, 0.05) 0%, transparent 50%);
}

[data-theme="light"] .circular-bg::after {
  background: radial-gradient(circle, rgba(35, 134, 54, 0.02) 0%, transparent 60%);
}

/* Undo Button */
.undo-btn {
  background: var(--accent-warning);
  color: #000000;
  border: none;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 0.75rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.undo-btn:hover {
  background: #e0a800;
  transform: translateY(-1px);
}

.undo-btn:active {
  transform: translateY(0);
}

/* More Activities Hint */
.more-activities-hint {
  text-align: center;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: 0.5rem;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.more-activities-hint:hover {
  opacity: 1;
}

.more-activities-hint a {
  color: var(--accent-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.more-activities-hint a:hover {
  text-decoration: underline;
}

/* Enhanced Notifications */
.notification {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-medium);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideInFromTop 0.3s ease-out;
  max-width: 400px;
}

.notification.success {
  border-left: 4px solid var(--accent-success);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(40, 167, 69, 0.1) 100%);
}

.notification.error {
  border-left: 4px solid var(--accent-danger);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(220, 53, 69, 0.1) 100%);
}

.notification.warning {
  border-left: 4px solid var(--accent-warning);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(255, 193, 7, 0.1) 100%);
}

.notification.info {
  border-left: 4px solid var(--accent-primary);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(35, 134, 54, 0.1) 100%);
}

.notification-message {
  flex: 1;
  color: var(--text-primary);
  font-weight: 500;
}

@keyframes slideInFromTop {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Update header stats to accommodate theme toggle */
.header-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .theme-toggle {
    width: 35px;
    height: 35px;
    margin-left: 0.5rem;
  }
  
  .theme-toggle span {
    font-size: 1rem;
  }
  
  .notification {
    max-width: calc(100vw - 2rem);
    margin-left: 1rem;
    margin-right: 1rem;
  }
  
  .undo-btn {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    margin-left: 0.5rem;
  }
}

[data-theme="light"] .domain,
[data-theme="light"] .action-card,
[data-theme="light"] .management-card {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="light"] .domain h2,
[data-theme="light"] .action-title,
[data-theme="light"] .list-title,
[data-theme="light"] .game-title,
[data-theme="light"] .section-title,
[data-theme="light"] .tip-title {
  color: var(--text-primary);
}

[data-theme="light"] .domain-xp,
[data-theme="light"] .domain-level,
[data-theme="light"] .action-desc,
[data-theme="light"] .stat-label,
[data-theme="light"] .stat-value,
[data-theme="light"] .section-desc,
[data-theme="light"] .tip-desc {
  color: var(--text-secondary);
}

[data-theme="light"] .activity-button,
[data-theme="light"] .manage-button {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-color: var(--border-color);
}

[data-theme="light"] .activity-button:hover {
  background: var(--bg-primary);
}

[data-theme="light"] .dice-button,
[data-theme="light"] .complete-button,
[data-theme="light"] .cta-button,
[data-theme="light"] .next-button,
[data-theme="light"] .add-button {
  color: #FFFFFF; /* Keep text white on accent-colored buttons */
}

[data-theme="light"] .back-button,
[data-theme="light"] .theme-toggle {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

[data-theme="light"] .form-input,
[data-theme="light"] .form-select {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

[data-theme="light"] .form-input::placeholder {
  color: var(--text-muted);
}

/* Light mode: Activity buttons */
[data-theme="light"] .activity-button {
  background: #f1f3f4;
  color: #212529;
  border: 1px solid #e0e0e0;
}
[data-theme="light"] .activity-button span {
  color: inherit;
}

[data-theme="light"] .activity-button:hover {
  background: #e9ecef;
}

/* Light mode: Stat cards */
[data-theme="light"] .stat-card {
  background: #f8f9fa;
  color: #212529;
  border: 1px solid #e0e0e0;
}

/* Light mode: Pro Tips card */
[data-theme="light"] .tips-card {
  background: #f8f9fa;
  color: #212529;
  border: 1px solid #e0e0e0;
}
[data-theme="light"] .tip-item {
  background: #ffffff;
  color: #212529;
  border: 1px solid #e0e0e0;
}
[data-theme="light"] .tip-title {
  color: #212529;
}
[data-theme="light"] .tip-desc {
  color: #6c757d;
}

/* Auth Section */
#auth-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto; /* Pushes auth to the right */
  padding-right: 1rem;
}

.auth-user {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.auth-button {
  background: var(--accent-primary);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-button.danger {
  background: var(--accent-danger);
}

.auth-button:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* Auth Modal */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.auth-modal-content {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: var(--shadow-heavy);
}

.auth-modal-content h2 {
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 1.5rem;
  text-align: center;
}

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

.auth-modal-content .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.auth-modal-content .cta-button {
  width: 100%;
  margin-top: 1rem;
}

.auth-modal-content .form-switch {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-modal-content .form-switch a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-modal-content .close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
} 