:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --ink: #000000; /* Black */
  --muted: #606060;
  --accent: #209cbd; /* Primary Teal */
  --good: #209cbd;
  --bad: #f68318; /* Primary Orange */
}

:root.dark {
  --bg: #0e0f12;
  --panel: #141720;
  --ink: #e8eefc;
  --muted: #9aa3b2;
  --accent: #209cbd;
  --good: #3bd671;
  --bad: #f68318;
}

/* Dark mode specific overrides for cleaner look */
:root.dark .login-container::before {
  opacity: 0.05;
  filter: blur(30px);
}

:root.dark .login-card {
  background: var(--panel);
  border-color: rgba(32, 156, 189, 0.2);
  box-shadow: 
    0 20px 40px rgba(0,0,0,0.3),
    0 8px 16px rgba(0,0,0,0.2);
}

:root.dark .form-group input {
  background: #141720;
  border-color: rgba(32, 156, 189, 0.3);
  color: var(--ink);
}

:root.dark .form-group input:focus {
  background: #141720;
  border-color: var(--accent);
  box-shadow: 
    0 0 0 4px rgba(32, 156, 189, 0.15),
    0 4px 12px rgba(0,0,0,0.3);
}

:root.dark .form-group input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

:root.dark #loginApp {
  background: var(--bg);
}

:root.dark #loginApp::before {
  opacity: 0.3;
}

/* Dark mode game page overrides */
:root.dark #app {
  background: var(--bg);
}

:root.dark #app::before {
  opacity: 0.3;
}

:root.dark #board {
  background: var(--panel);
  border-color: rgba(32, 156, 189, 0.2);
  box-shadow: 
    0 20px 40px rgba(0,0,0,0.3),
    0 8px 16px rgba(0,0,0,0.2);
}

:root.dark #stats {
  background: rgba(255,255,255,0.05);
  border-color: rgba(32, 156, 189, 0.2);
}

:root.dark .valve {
  background: rgba(255,255,255,0.1);
  border-color: rgba(32, 156, 189, 0.3);
  color: var(--ink);
}

/* Dark mode overlay styling */
:root.dark #overlay {
  background: radial-gradient(1200px 600px at 50% 40%, color-mix(in srgb, var(--panel), var(--bg)), rgba(14, 15, 18, 0.98));
}

/* Start section styling */
.start-section {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
}

.overlay-theme-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--bad) 100%);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.overlay-theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

:root.dark .card {
  background: var(--panel);
  border-color: rgba(32, 156, 189, 0.2);
  box-shadow: 
    0 20px 40px rgba(0,0,0,0.4),
    0 8px 16px rgba(0,0,0,0.3);
}

:root.dark .chips {
  border-color: rgba(32, 156, 189, 0.3);
  background: rgba(32, 156, 189, 0.1);
}

:root.dark .difficulty-selector select {
  background: var(--panel);
  border-color: rgba(32, 156, 189, 0.3);
  color: var(--ink);
}

:root.dark .difficulty-selector select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(32, 156, 189, 0.2);
}

/* Brand utility buttons */
.btn-blue {
  background: var(--accent);
  color: #fff;
  border: none;
}
.btn-blue:hover { filter: brightness(0.95); }

.btn-orange {
  background: var(--bad);
  color: #fff;
  border: none;
}
.btn-orange:hover { filter: brightness(0.95); }

/* Brand text colors */
.stat-blue { color: var(--accent); }
.stat-orange { color: var(--bad); }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

#app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, 
    rgba(32, 156, 189, 0.05) 0%, 
    rgba(246, 131, 24, 0.05) 25%, 
    rgba(32, 156, 189, 0.05) 50%, 
    rgba(246, 131, 24, 0.05) 75%, 
    rgba(32, 156, 189, 0.05) 100%);
  position: relative;
}

#app::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(32, 156, 189, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(246, 131, 24, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(32, 156, 189, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

#board {
  width: min(92vw, 900px);
  height: auto;
  aspect-ratio: 4 / 3;
  background: var(--panel);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06), inset 0 0 0 1px rgba(0,0,0,0.02);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  align-content: start;
  position: relative;
  padding: 10px 16px 44px 16px; /* ensure inner content stays within container */
}



#board.error {
  border-color: var(--bad);
  box-shadow: 0 10px 30px rgba(0,0,0,0.06), 0 0 0 3px rgba(239, 68, 68, 0.7);
}

#board.correct {
  border-color: #27ae60;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06), 0 0 0 3px rgba(39, 174, 96, 0.7);
}

#vf { margin: 16px 16px 0 -12px; }

#hud {
  margin: -290px 16px 8px 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
}

#stats { 
  color: var(--ink); 
  opacity: 0.9; 
  font-weight: 600; 
  font-variant-numeric: tabular-nums; 
  justify-self: start; 
  display: grid; 
  grid-auto-rows: 1.6em; 
  gap: 2px; 
  text-align: left; 
  max-width: 220px; 
  margin-left: 16px; 
}
.stat-row { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }

#valves { display: flex; gap: 10px; align-items: center; justify-self: start; }
.valve {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #ffffff 0%, rgba(255,255,255,0.9) 100%);
  color: var(--ink); 
  font-weight: 700;
  font-size: 18px;
  border: 2px solid rgba(32, 156, 189, 0.2);
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 12px rgba(32, 156, 189, 0.1),
    0 2px 4px rgba(0,0,0,0.05);
}
/* No pre-highlight of correct answer; only show what user presses */
.valve.active { 
  background: linear-gradient(135deg, var(--accent) 0%, var(--bad) 100%); 
  color: white; 
  border-color: var(--accent);
  box-shadow: 
    0 8px 20px rgba(32, 156, 189, 0.3),
    0 4px 8px rgba(0,0,0,0.1);
}

#overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(1200px 600px at 50% 40%, color-mix(in srgb, var(--panel), var(--bg)), rgba(14, 15, 18, 0.96));
  text-align: center;
  padding: 24px;
}

.card {
  width: min(680px, 92vw);
  padding: 28px 24px;
  background: var(--panel);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

#brandLogo { width: 120px; height: auto; display: block; margin: 0 auto 32px auto; }
#board #brandLogo { position: absolute; top: 16px; left: 16px; width: 80px; height: auto; z-index: 10; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0 16px 0; }
.chip {
  padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(0,0,0,0.12);
  color: var(--ink); background: rgba(0,0,0,0.04);
  font-weight: 600; font-size: 13px;
}

.difficulty-selector {
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.difficulty-selector label {
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}

.difficulty-selector select {
  padding: 8px 12px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
}

.difficulty-selector select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(32, 156, 189, 0.1);
}
.cta {
  appearance: none; border: none; outline: none; cursor: pointer;
  padding: 18px 36px; border-radius: 12px; 
  background: linear-gradient(135deg, var(--accent) 0%, var(--bad) 100%); 
  color: #fff; font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 
    0 8px 20px rgba(32, 156, 189, 0.3),
    0 4px 8px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.cta:hover::before {
  left: 100%;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(32, 156, 189, 0.4);
}

.cta:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(32, 156, 189, 0.3);
}

.cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.hint { color: var(--muted); margin-top: 10px; }

#title {
  margin: 0 0 8px 0;
  font-weight: 800;
  letter-spacing: 0.3px;
}

#subtitle { margin: 0 0 20px 0; color: var(--muted); }
#help { color: var(--muted); max-width: 720px; }
#cta { margin-top: 16px; color: var(--accent); font-weight: 600; }

.hidden { display: none !important; }

#themeToggle {
  position: fixed;
  top: 20px;
  right: 20px;
  border: none;
  background: linear-gradient(135deg, var(--accent) 0%, var(--bad) 100%);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(32, 156, 189, 0.3);
}

#logoutBtn {
  border: none;
  background: linear-gradient(135deg, var(--bad) 0%, var(--accent) 100%);
  color: white;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 12px rgba(246, 131, 24, 0.3),
    0 2px 4px rgba(0,0,0,0.1);
}

/* Game page specific positioning - restore original layout */
#board #logoutBtn {
  position: absolute;
  bottom: 16px;
  left: 16px;
}

#board #themeToggle {
  position: absolute;
  top: 20px;
  right: 20px;
}

#logoutBtn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 20px rgba(246, 131, 24, 0.4),
    0 4px 8px rgba(0,0,0,0.15);
}

#themeToggle:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 20px rgba(32, 156, 189, 0.4),
    0 4px 8px rgba(0,0,0,0.15);
}

/* Bottom navigation buttons styling */
.nav-button {
  appearance: none;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 12px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--bad) 100%);
  color: white;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 
    0 8px 20px rgba(32, 156, 189, 0.3),
    0 4px 8px rgba(0,0,0,0.1);
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.nav-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(32, 156, 189, 0.4);
}

.nav-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(32, 156, 189, 0.3);
}

#brandMark { position: absolute; left: 12px; top: 10px; height: 26px; width: auto; }

/* Login page styles */
#loginApp {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, 
    rgba(32, 156, 189, 0.05) 0%, 
    rgba(246, 131, 24, 0.05) 25%, 
    rgba(32, 156, 189, 0.05) 50%, 
    rgba(246, 131, 24, 0.05) 75%, 
    rgba(32, 156, 189, 0.05) 100%);
  padding: 20px;
  position: relative;
}

#loginApp::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(32, 156, 189, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(246, 131, 24, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(32, 156, 189, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* Login page theme toggle positioning */
body > .theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.login-container {
  width: 100%;
  max-width: 450px;
  position: relative;
}

.login-container::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  right: -50px;
  bottom: -50px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--bad) 50%, var(--accent) 100%);
  border-radius: 20px;
  opacity: 0.1;
  z-index: -1;
  filter: blur(20px);
}

.login-card {
  background: var(--panel);
  border: 1px solid rgba(32, 156, 189, 0.15);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 
    0 20px 40px rgba(32, 156, 189, 0.1),
    0 8px 16px rgba(0,0,0,0.05);
  text-align: center;
  position: relative;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--bad) 50%, var(--accent) 100%);
  border-radius: 20px 20px 0 0;
}

.login-card h1 {
  margin: 0 0 16px 0;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--accent);
  font-size: 2rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--bad) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.login-card .subtitle {
  margin: 0 0 28px 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 500;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.form-group {
  display: grid;
  gap: 6px;
  text-align: left;
}

.form-group label {
  font-weight: 600;
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  padding: 10px 14px;
  border: 2px solid rgba(32, 156, 189, 0.2);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(32, 156, 189, 0.1);
}

/* Ensure all input placeholders have consistent color */
.form-group input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 
    0 0 0 4px rgba(32, 156, 189, 0.15),
    0 4px 12px rgba(32, 156, 189, 0.2);
  transform: translateY(-1px);
}

.form-group input:hover {
  border-color: rgba(32, 156, 189, 0.4);
  box-shadow: 0 4px 12px rgba(32, 156, 189, 0.15);
}

.login-footer {
  border-top: 1px solid rgba(32, 156, 189, 0.15);
  padding-top: 16px;
  margin-top: 16px;
  text-align: center;
}

.login-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  padding: 10px 20px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(32, 156, 189, 0.1) 0%, rgba(246, 131, 24, 0.1) 100%);
  border: 1px solid rgba(32, 156, 189, 0.2);
  display: inline-block;
  min-width: 200px;
}

.login-footer a:hover {
  background: linear-gradient(135deg, rgba(32, 156, 189, 0.2) 0%, rgba(246, 131, 24, 0.2) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(32, 156, 189, 0.2);
  border-color: rgba(32, 156, 189, 0.4);
}

.forgot-password {
  margin-top: 12px;
  text-align: center;
}

.forgot-password a {
  color: var(--bad);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(246, 131, 24, 0.1);
}

.forgot-password a:hover {
  background: rgba(246, 131, 24, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(246, 131, 24, 0.3);
}

.theme-toggle {
  background: linear-gradient(135deg, var(--accent) 0%, var(--bad) 100%);
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(32, 156, 189, 0.3);
  position: relative;
  overflow: hidden;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.theme-toggle:hover::before {
  left: 100%;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(32, 156, 189, 0.4);
}

/* Leaderboard page styles */
#leaderboardApp {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.leaderboard-container {
  width: 100%;
  max-width: 600px;
}

.leaderboard-card {
  background: var(--panel);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  text-align: center;
}

.leaderboard-card h1 {
  margin: 0 0 8px 0;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 700;
}

.leaderboard-card .subtitle {
  margin: 0 0 32px 0;
  color: var(--muted);
  font-size: 1rem;
}

.leaderboard-card #brandLogo {
  width: 80px;
  height: auto;
  margin-bottom: 24px;
}

.leaderboard-list {
  margin: 32px 0;
  max-height: 400px;
  overflow-y: auto;
}

.leaderboard-entry {
  display: flex;
  align-items: center;
  padding: 16px;
  margin-bottom: 12px;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--muted);
  transition: all 0.2s;
}

.leaderboard-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.leaderboard-entry .rank {
  font-size: 1.5rem;
  font-weight: 700;
  margin-right: 20px;
  min-width: 40px;
}

.leaderboard-entry .player-info {
  flex: 1;
  text-align: left;
}

.leaderboard-entry .player-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.leaderboard-entry .score-details {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--muted);
}

.leaderboard-entry .score {
  font-weight: 600;
  color: var(--accent);
}

.leaderboard-entry .date {
  color: var(--muted);
  font-size: 0.8rem;
}

.leaderboard-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.secondary:hover {
  background: var(--accent);
  color: white;
}

/* Profile page styles */
#profileApp {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.profile-container {
  width: 100%;
  max-width: 500px;
}

.profile-card {
  background: var(--panel);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  text-align: center;
}

.profile-card h1 {
  margin: 0 0 8px 0;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 700;
}

.profile-card h2 {
  margin: 32px 0 16px 0;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: left;
}

.profile-card #brandLogo {
  width: 80px;
  height: auto;
  margin-bottom: 24px;
}

.user-info {
  margin: 32px 0;
}

.user-details {
  background: var(--bg);
  border-radius: 12px;
  padding: 24px;
  text-align: left;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--muted);
}

.user-details::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-orange), var(--primary-teal));
}

.user-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.user-email, .user-phone, .user-joined {
  color: var(--muted);
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.stats-section {
  margin: 32px 0;
}

.stats-list {
  display: grid;
  gap: 16px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--muted);
}

.stat-label {
  font-weight: 600;
  color: var(--ink);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 0.5rem;
}

.stat-detail {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.25rem;
  font-style: italic;
}

.stat-breakdown {
  grid-column: 1 / -1;
}

.stat-breakdown .stat-value {
  font-size: 1rem;
  line-height: 1.4;
  text-align: left;
  color: var(--text-secondary);
}

.profile-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  flex-wrap: wrap;
  padding: 0 20px;
}

/* Email confirmation page styles */
.confirm-status {
  text-align: center;
  padding: 2rem;
}

.loading-spinner {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.success-message, .error-message {
  text-align: center;
  padding: 2rem;
}

.success-icon, .error-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.success-icon {
  color: #4caf50;
}

.error-icon {
  color: #f44336;
}

/* Mobile Message Styles */
.mobile-message {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mobile-message-content {
  text-align: center;
  max-width: 400px;
  padding: 40px 20px;
  background: var(--panel);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border: 1px solid rgba(32, 156, 189, 0.2);
}

.mobile-message-content h2 {
  color: var(--accent);
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.mobile-message-content p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 30px;
}

.mobile-icon {
  font-size: 4rem;
  margin-top: 20px;
}

/* Dark mode mobile message */
:root.dark .mobile-message {
  background: var(--bg);
}

:root.dark .mobile-message-content {
  background: var(--panel);
  border-color: rgba(32, 156, 189, 0.2);
  box-shadow: 
    0 20px 40px rgba(0,0,0,0.3),
    0 8px 16px rgba(0,0,0,0.2);
}

@media (max-width: 600px) {
  .profile-actions {
    gap: 12px;
    flex-direction: column;
    align-items: stretch;
  }
  
  .profile-actions .cta,
  .profile-actions .danger,
  .profile-actions .theme-toggle {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
}

/* Dark mode overrides for profile */
:root.dark .user-details::before {
  background: linear-gradient(90deg, rgba(32, 156, 189, 0.8), rgba(246, 131, 24, 0.8));
}

.danger {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.danger:hover {
  background: #c0392b;
  transform: translateY(-2px);
}

.loading {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 500;
}

.loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error {
  text-align: center;
  padding: 2rem;
  color: var(--bad);
  background: rgba(246, 131, 24, 0.1);
  border: 1px solid rgba(246, 131, 24, 0.3);
  border-radius: 12px;
  margin: 1rem 0;
}

.error-details {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem 0;
  opacity: 0.8;
}

.retry-btn {
  background: linear-gradient(135deg, var(--accent), var(--bad));
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0.5rem;
}

.retry-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(32, 156, 189, 0.3);
}

/* Reset password page styles */
#resetApp {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.reset-container {
  width: 100%;
  max-width: 400px;
}

.reset-card {
  background: var(--panel);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  text-align: center;
}

.reset-card h1 {
  margin: 0 0 8px 0;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 700;
}

.reset-card .subtitle {
  margin: 0 0 32px 0;
  color: var(--muted);
  font-size: 1rem;
}

.reset-card #brandLogo {
  width: 80px;
  height: auto;
  margin-bottom: 24px;
}

.reset-form {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}

.reset-footer {
  margin-top: 24px;
  color: var(--muted);
}

.reset-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.reset-footer a:hover {
  text-decoration: underline;
}

.no-data {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--muted);
  font-style: italic;
  background: rgba(32, 156, 189, 0.05);
  border: 1px solid rgba(32, 156, 189, 0.1);
  border-radius: 12px;
  margin: 1rem 0;
}

