/* ==========================================
   LIGHT ROMANTIC & SILVER LUXURY DESIGN SYSTEM
   ========================================== */

:root {
  --bg-main: #fdfbf7;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass-modal: rgba(253, 251, 247, 0.96);

  --border-color: rgba(244, 63, 94, 0.18);
  --border-gold: rgba(217, 119, 6, 0.3);

  --text-dark: #1e293b;
  --text-muted: #64748b;
  --text-gold: #d97706;
  --text-rose: #e11d48;

  --rose-main: #f43f5e;
  --rose-soft: #fce7f3;
  --gold-main: #f59e0b;
  --gold-light: #fef3c7;
  --silver-accent: #94a3b8;

  --font-main: 'Montserrat', sans-serif;
  --font-title: 'Cormorant Garamond', serif;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 32px;

  --shadow-soft: 0 10px 30px -5px rgba(244, 63, 94, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 16px 35px -5px rgba(244, 63, 94, 0.18), 0 6px 16px rgba(245, 158, 11, 0.12);
  --shadow-glow: 0 0 25px rgba(244, 63, 94, 0.25);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(253, 226, 228, 0.6) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(254, 243, 199, 0.6) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255, 241, 242, 0.4) 0%, rgba(253, 251, 247, 1) 100%);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 50px;
  overflow-x: hidden;
  position: relative;
}

/* Canvas Background for Giant Floating Hearts */
#bgCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.app-container {
  width: 100%;
  max-width: 1280px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ==========================================
   HEADER SECTION
   ========================================== */
header {
  text-align: center;
  position: relative;
  padding: 10px 0;
}

.anniversary-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 22px;
  background: linear-gradient(135deg, rgba(252, 231, 243, 0.9), rgba(254, 243, 199, 0.9));
  border: 1.5px solid var(--border-gold);
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-rose);
  margin-bottom: 10px;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.1);
}

.main-title {
  font-family: var(--font-title);
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 700;
  background: linear-gradient(135deg, #be123c 0%, #e11d48 40%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 25px rgba(244, 63, 94, 0.15);
  line-height: 1.15;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

/* Actions Header Buttons */
.header-actions {
  position: absolute;
  right: 0;
  top: 10px;
  display: flex;
  gap: 10px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.icon-btn:hover {
  background: #ffffff;
  color: var(--rose-main);
  transform: translateY(-2px);
  border-color: var(--rose-main);
  box-shadow: 0 6px 18px rgba(244, 63, 94, 0.2);
}

/* ==========================================
   PROGRESS BAR (THE LOVE SCALE - 2500 PTS)
   ========================================== */
.progress-section {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 34px;
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 14px;
  z-index: 100;
  transition: all 0.4s ease;
}

.progress-section:hover {
  border-color: rgba(244, 63, 94, 0.35);
  box-shadow: 0 12px 35px -5px rgba(244, 63, 94, 0.12);
}

.participants-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.person-info {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 260px;
}

.person-info.right {
  flex-direction: row-reverse;
  text-align: right;
}

.person-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  background: linear-gradient(135deg, #ffffff, #fff1f2);
  border: 2.5px solid var(--border-color);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  position: relative;
}

.person-info.dad .person-avatar {
  border-color: #3b82f6;
  background: radial-gradient(circle, #eff6ff, #dbeafe);
}

.person-info.mom .person-avatar {
  border-color: #ec4899;
  background: radial-gradient(circle, #fdf2f8, #fce7f3);
}

.person-details .name {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-dark);
}

.person-details .score {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-rose);
}

/* Track Layout */
.track-wrapper {
  position: relative;
  height: 50px;
  display: flex;
  align-items: center;
}

.track-bg {
  position: absolute;
  width: 100%;
  height: 16px;
  background: rgba(244, 63, 94, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(244, 63, 94, 0.15);
  overflow: hidden;
}

/* Progress Fills */
.track-fill-left {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #f43f5e);
  border-radius: 12px 0 0 12px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.track-fill-right {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(-90deg, #ec4899, #f472b6, #f43f5e);
  border-radius: 0 12px 12px 0;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Center Heart Icon */
.center-heart {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #f43f5e, #be123c);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.5);
  border: 3px solid #ffffff;
  z-index: 10;
  animation: heartbeat 2s infinite ease-in-out;
}

@keyframes heartbeat {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.15); box-shadow: 0 0 35px rgba(244, 63, 94, 0.8); }
}

/* Moving Avatars */
.walker {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.2rem;
  transition: left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), right 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 5;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

#dadWalker { left: 0%; }
#momWalker { right: 0%; }

.status-hint {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 600;
}

/* ==========================================
   QUIZ GRID ("СВОЯ ИГРА")
   ========================================== */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  width: 100%;
}

.category-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(254, 243, 199, 0.85));
  border: 1.5px solid var(--border-gold);
  border-top: 4px solid var(--gold-main);
  border-radius: var(--radius-md);
  padding: 18px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 95px;
  box-shadow: var(--shadow-soft);
}

.category-icon {
  font-size: 1.7rem;
  margin-bottom: 4px;
}

.category-title {
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tile-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.tile-card:hover:not(.solved) {
  background: var(--bg-card-hover);
  border-color: var(--gold-main);
  transform: translateY(-5px) scale(1.03);
  box-shadow: var(--shadow-hover);
}

.tile-card .points {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-gold);
  text-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.tile-card.surprise:not(.solved) {
  border-color: rgba(244, 63, 94, 0.4);
  background: linear-gradient(135deg, rgba(252, 231, 243, 0.9), rgba(255, 255, 255, 0.95));
}

.tile-card.surprise:not(.solved)::after {
  content: '🎁';
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.95rem;
}

.tile-card.solved {
  background: rgba(241, 245, 249, 0.6);
  border-color: rgba(226, 232, 240, 0.8);
  cursor: default;
  opacity: 0.45;
}

.tile-card.solved .points {
  color: var(--silver-accent);
  text-decoration: line-through;
}

/* ==========================================
   ENLARGED MODAL WINDOWS & BIG TEXT/EMOJI
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Enlarged Modal Card Layout (860px max width) */
.modal-card {
  background: var(--bg-glass-modal);
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 860px;
  padding: 44px 40px 36px;
  box-shadow: 0 30px 70px -15px rgba(244, 63, 94, 0.25), 0 0 40px rgba(255, 255, 255, 0.9);
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 22px;
  right: 22px;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  color: var(--text-muted);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose-main);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-category {
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-rose);
}

.modal-badge {
  background: linear-gradient(135deg, var(--gold-main), #d97706);
  color: #ffffff;
  font-weight: 800;
  padding: 6px 20px;
  border-radius: 24px;
  font-size: 1.1rem;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.surprise-badge {
  background: linear-gradient(135deg, #f43f5e, #be123c);
  color: #fff;
  font-weight: 800;
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  box-shadow: 0 8px 25px rgba(244, 63, 94, 0.4);
  animation: pulseGlow 1.5s infinite;
}

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

/* ENLARGED QUESTION TEXT & EMOJI */
.question-text {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-dark);
  margin-bottom: 24px;
  text-align: center;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.emoji-line {
  font-size: clamp(2.8rem, 6vw, 3.8rem);
  letter-spacing: 8px;
  line-height: 1.3;
  margin: 10px 0;
  display: block;
}

/* Media Container */
.media-container {
  width: 100%;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.question-img {
  max-width: 100%;
  max-height: 380px;
  border-radius: var(--radius-md);
  border: 3px solid #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  object-fit: cover;
}

/* MULTIPLE CHOICE OPTIONS GRID FOR SURPRISE QUESTIONS */
.options-container {
  width: 100%;
  margin-bottom: 24px;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  width: 100%;
}

.option-btn {
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.option-btn:hover {
  background: #fff1f2;
  border-color: var(--rose-main);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(244, 63, 94, 0.18);
}

.option-btn.selected {
  background: linear-gradient(135deg, #fff1f2, #fce7f3);
  border-color: var(--rose-main);
  color: var(--rose-main);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.3);
}

/* Answer Box */
.answer-box {
  background: rgba(16, 185, 129, 0.12);
  border: 2px solid rgba(16, 185, 129, 0.45);
  border-radius: var(--radius-md);
  padding: 20px 26px;
  text-align: center;
  margin-bottom: 28px;
  display: none;
  animation: fadeIn 0.4s ease;
}

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

.answer-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #059669;
  font-weight: 800;
  margin-bottom: 6px;
}

.answer-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
}

/* Buttons */
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

.btn {
  padding: 15px 36px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.14);
}

.btn-primary {
  background: linear-gradient(135deg, var(--rose-main), #be123c);
  color: #fff;
  box-shadow: 0 6px 22px rgba(244, 63, 94, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fb7185, #e11d48);
}

.award-controls {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  animation: fadeIn 0.4s ease;
}

.who-answered-title {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.parent-selector {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 480px;
}

.parent-opt-btn {
  flex: 1;
  padding: 16px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 2px solid var(--border-color);
  color: var(--text-dark);
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.parent-opt-btn:hover {
  background: #fff5f7;
}

.parent-opt-btn.selected-dad {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.parent-opt-btn.selected-mom {
  border-color: #ec4899;
  background: #fdf2f8;
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.3);
}

.score-buttons {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 480px;
}

.btn-success {
  flex: 1;
  background: linear-gradient(135deg, #10b981, #047857);
  color: #fff;
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.35);
}

.btn-skip {
  flex: 1;
  background: #ffffff;
  color: var(--text-muted);
  border: 1.5px solid var(--border-color);
}

.btn-skip:hover {
  background: #f1f5f9;
  color: var(--text-dark);
}

.redirect-notice {
  font-size: 0.9rem;
  color: var(--text-gold);
  background: #fffbe6;
  border: 1px dashed var(--gold-main);
  padding: 10px 18px;
  border-radius: 12px;
  text-align: center;
  display: none;
  font-weight: 600;
}

/* Victory Modal */
.victory-card {
  text-align: center;
  max-width: 660px;
  background: linear-gradient(145deg, #ffffff, #fff5f7);
  border: 3px solid var(--gold-main);
  box-shadow: 0 0 70px rgba(245, 158, 11, 0.35);
}

.victory-icon {
  font-size: 5rem;
  margin-bottom: 14px;
  animation: bounce 1.5s infinite alternate;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-14px); }
}

.victory-title {
  font-family: var(--font-title);
  font-size: 3.2rem;
  color: var(--text-rose);
  margin-bottom: 10px;
}

.victory-subtitle {
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 22px;
  line-height: 1.5;
  font-weight: 600;
}

.anniversary-quote {
  font-family: var(--font-title);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--text-gold);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  margin: 20px 0 28px;
}

/* Forms */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 22px 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-group label {
  font-size: 0.95rem;
  color: var(--text-dark);
  font-weight: 700;
}

.form-input {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--text-dark);
  font-size: 1.1rem;
  outline: none;
}

.form-input:focus {
  border-color: var(--rose-main);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.2);
}

/* Responsive */
@media (max-width: 992px) {
  .quiz-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .quiz-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .options-grid {
    grid-template-columns: 1fr;
  }
  .participants-bar {
    flex-direction: column;
    gap: 12px;
  }
  .person-info {
    width: 100%;
    justify-content: center;
  }
  .person-info.right {
    flex-direction: row;
    text-align: left;
  }
  .header-actions {
    position: relative;
    top: 0;
    justify-content: center;
    margin-top: 12px;
  }
}
