:root {
  --bg: #fff0f6;
  --bg2: #ffd6e8;
  --accent: #ff6b9d;
  --accent2: #ff9ec4;
  --text: #2d1b2e;
  --text2: #7a4060;
  --card: #ffffff;
  --shadow: rgba(255,107,157,0.25);
  --font-head: 'Fredoka One', cursive;
  --font-body: 'Nunito', sans-serif;
  --radius: 24px;
}

body.theme-pastel {
  --bg: #fff0f6; --bg2: #ffd6e8; --accent: #ff6b9d; --accent2: #ff9ec4;
  --text: #2d1b2e; --text2: #7a4060; --card: #ffffff; --shadow: rgba(255,107,157,0.25);
  --font-head: 'Fredoka One', cursive; --font-body: 'Nunito', sans-serif; --radius: 24px;
}

body.theme-retro {
  --bg: #0a0a1a; --bg2: #1a0a2e; --accent: #00ff9f; --accent2: #ff00ff;
  --text: #ffffff; --text2: #aaaacc; --card: #12122a; --shadow: rgba(0,255,159,0.3);
  --font-head: 'Press Start 2P', monospace; --font-body: 'Space Mono', monospace; --radius: 4px;
}

body.theme-luxury {
  --bg: #1a1408; --bg2: #2c2010; --accent: #d4af37; --accent2: #f0d060;
  --text: #f5f0e8; --text2: #c8b89a; --card: #231c0e; --shadow: rgba(212,175,55,0.25);
  --font-head: 'Playfair Display', serif; --font-body: 'Nunito', sans-serif; --radius: 8px;
}

body.theme-nature {
  --bg: #e8f5e9; --bg2: #c8e6c9; --accent: #2e7d32; --accent2: #66bb6a;
  --text: #1b3a1c; --text2: #4a7a4c; --card: #ffffff; --shadow: rgba(46,125,50,0.2);
  --font-head: 'Fredoka One', cursive; --font-body: 'Nunito', sans-serif; --radius: 20px;
}

body.theme-neon {
  --bg: #0d0d0d; --bg2: #1a0033; --accent: #ff073a; --accent2: #39ff14;
  --text: #ffffff; --text2: #cccccc; --card: #111111; --shadow: rgba(255,7,58,0.4);
  --font-head: 'Fredoka One', cursive; --font-body: 'Nunito', sans-serif; --radius: 16px;
}

body.theme-lemon {
  --bg: #fffde7; --bg2: #fff9c4; --accent: #f9a825; --accent2: #ffd54f;
  --text: #3e2a00; --text2: #7a5c00; --card: #ffffff; --shadow: rgba(249,168,37,0.2);
  --font-head: 'Fredoka One', cursive; --font-body: 'Nunito', sans-serif; --radius: 22px;
}

body.theme-sky {
  --bg: #e3f2fd; --bg2: #bbdefb; --accent: #1976d2; --accent2: #64b5f6;
  --text: #0d1b2a; --text2: #2a5080; --card: #ffffff; --shadow: rgba(25,118,210,0.18);
  --font-head: 'Fredoka One', cursive; --font-body: 'Nunito', sans-serif; --radius: 22px;
}

body.theme-peach {
  --bg: #fff3e0; --bg2: #ffe0b2; --accent: #e64a19; --accent2: #ff8a65;
  --text: #3e1000; --text2: #8d3a00; --card: #ffffff; --shadow: rgba(230,74,25,0.18);
  --font-head: 'Fredoka One', cursive; --font-body: 'Nunito', sans-serif; --radius: 22px;
}

body.theme-lavender {
  --bg: #f3e5f5; --bg2: #e1bee7; --accent: #7b1fa2; --accent2: #ce93d8;
  --text: #1a0030; --text2: #5a2070; --card: #ffffff; --shadow: rgba(123,31,162,0.18);
  --font-head: 'Fredoka One', cursive; --font-body: 'Nunito', sans-serif; --radius: 22px;
}

body.theme-mint {
  --bg: #e0f7fa; --bg2: #b2ebf2; --accent: #00838f; --accent2: #4dd0e1;
  --text: #00252a; --text2: #006064; --card: #ffffff; --shadow: rgba(0,131,143,0.18);
  --font-head: 'Fredoka One', cursive; --font-body: 'Nunito', sans-serif; --radius: 22px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: all 0.4s ease;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 60% 40%, var(--bg2) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 420px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 16px;
}

.app-title {
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--accent);
  text-shadow: 2px 2px 0 var(--shadow);
}

.theme-btn {
  background: var(--card);
  border: 2px solid var(--accent);
  border-radius: 50px;
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}

.theme-btn:hover {
  background: var(--accent);
  color: var(--card);
}

.seat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 8px 32px var(--shadow);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.seat-card::after {
  content: '🚗';
  position: absolute;
  font-size: 120px;
  opacity: 0.05;
  top: -20px;
  right: -20px;
  transform: rotate(-15deg);
  pointer-events: none;
}

.whose-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.whose-name {
  font-family: var(--font-head);
  font-size: 3.5rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 3px 3px 0 var(--shadow);
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.whose-sub {
  font-size: 0.9rem;
  color: var(--text2);
  font-weight: 600;
  margin-bottom: 16px;
}

.tomorrow-pill {
  display: inline-block;
  background: var(--bg);
  border: 1.5px solid var(--accent2);
  border-radius: 50px;
  padding: 4px 14px;
  font-size: 0.8rem;
  color: var(--text2);
  font-weight: 600;
}

.streak-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text2);
  font-weight: 700;
}

.streak-num {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--accent);
}

.swap-active-banner {
  background: var(--bg2);
  border-radius: 12px;
  padding: 8px 14px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text2);
  font-weight: 700;
  border: 1.5px solid var(--accent2);
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.btn {
  flex: 1;
  padding: 14px 10px;
  border-radius: var(--radius);
  border: none;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  min-height: 44px;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 16px var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow);
}

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

.btn-secondary {
  background: var(--card);
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-secondary:hover {
  background: var(--bg2);
}

.btn-danger {
  background: var(--card);
  color: #e53935;
  border: 2px solid #e53935;
}

.btn-danger:hover {
  background: #ffeaea;
}

.btn-warning {
  background: var(--card);
  color: #f57c00;
  border: 2px solid #f57c00;
}

.btn-warning:hover {
  background: #fff3e0;
}

.mini-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px var(--shadow);
}

.mini-card-title {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 6px;
}

.mini-card-body {
  font-size: 0.9rem;
  color: var(--text2);
  font-weight: 600;
}

.mini-card-big {
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--text);
}

.holiday-big-accent {
  color: var(--accent);
}

.holiday-date-body {
  margin-bottom: 8px;
}

.holiday-date-small {
  color: var(--text2);
  font-size: 0.75rem;
}

.holiday-list {
  list-style: none;
  margin-top: 8px;
}

.holiday-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--bg2);
  font-size: 0.85rem;
  color: var(--text2);
  font-weight: 600;
}

.holiday-list li:last-child {
  border-bottom: none;
}

.holiday-days {
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 1rem;
}

.holiday-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: #ccc;
  font-size: 0.8rem;
  padding: 2px 6px;
  min-height: 44px;
  min-width: 44px;
}

.holiday-delete:hover {
  color: #e53935;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: slideIn 0.3s ease;
}

.modal h2 {
  font-family: var(--font-head);
  color: var(--accent);
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.modal p {
  color: var(--text2);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 12px;
  font-weight: 600;
}

.modal label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  margin-top: 14px;
}

.modal input,
.modal select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid var(--bg2);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s;
  min-height: 44px;
}

.modal input:focus,
.modal select:focus {
  border-color: var(--accent);
}

.modal-btns {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-full-btn {
  width: 100%;
}

.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.theme-option {
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s;
  font-weight: 700;
  font-size: 0.85rem;
  min-height: 44px;
}

.theme-option.active {
  transform: scale(1.02);
}

.birthday-banner {
  background: linear-gradient(135deg, var(--accent), var(--accent2), var(--bg2));
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.birthday-banner h2 {
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: white;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.15);
}

.birthday-sub {
  color: white;
  font-weight: 700;
  margin-top: 4px;
}

.confetti {
  font-size: 1.5rem;
  animation: spin 3s linear infinite;
  display: inline-block;
}

.confetti-reverse {
  animation-direction: reverse;
}

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

.dispute-info {
  background: var(--bg2);
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text2);
  font-weight: 600;
  line-height: 1.5;
}

.dispute-reminder {
  margin-top: 12px;
}

.section-title {
  font-family: var(--font-head);
  font-size: 0.9rem;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 20px 0 10px;
}

.add-holiday-btn {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 2px dashed var(--accent2);
  background: transparent;
  color: var(--text2);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s;
  min-height: 44px;
}

.add-holiday-btn:hover {
  background: var(--bg2);
  border-color: var(--accent);
  color: var(--accent);
}

.bottom-spacer {
  height: 32px;
}

.setup-screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
}

.setup-screen .app-title {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.setup-screen p {
  color: var(--text2);
  font-weight: 600;
  margin-bottom: 32px;
  font-size: 1rem;
}

.setup-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 32px var(--shadow);
  text-align: left;
}

.setup-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.setup-label-top {
  margin-top: 20px;
}

.setup-date-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid var(--bg2);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  outline: none;
  min-height: 44px;
}

.setup-go-btn {
  width: 100%;
  margin-top: 24px;
}

.name-options {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.name-opt {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid var(--bg2);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  min-height: 44px;
}

.name-opt.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

@media (max-width: 640px) {
  .app {
    padding: 12px;
    max-width: 100%;
  }

  .whose-name {
    font-size: 2.5rem;
  }

  .setup-screen .app-title {
    font-size: 2rem;
  }

  .setup-card {
    max-width: 100%;
  }

  .modal {
    max-width: 100%;
    padding: 24px 18px;
  }

  .theme-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .modal-btns {
    flex-direction: column;
  }

  .modal-btns .btn {
    width: 100%;
  }

  .btn-row {
    flex-direction: column;
  }

  .btn-row .btn {
    width: 100%;
  }

  .birthday-banner h2 {
    font-size: 1.3rem;
  }
}