/* Valentine Quiz - Mobile-first, funny & cute */

:root {
  --pink: #ff6b9d;
  --pink-dark: #e91e63;
  --red: #ff1744;
  --cream: #fff5f8;
  --white: #ffffff;
  --shadow: rgba(233, 30, 99, 0.25);
  --font-title: 'Fredoka', sans-serif;
  --font-body: 'Quicksand', sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 30%, #ff9a9e 60%, #fecfef 100%);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  padding: 1rem;
  position: relative;
}

/* Floating hearts background */
.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.hearts-bg::before,
.hearts-bg::after {
  content: '💕';
  position: absolute;
  font-size: 2rem;
  opacity: 0.2;
  animation: float 8s ease-in-out infinite;
}

.hearts-bg::before {
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.hearts-bg::after {
  top: 60%;
  right: 10%;
  animation-delay: 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}

/* Music hint */
.music-hint {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  color: var(--pink-dark);
  box-shadow: 0 4px 15px var(--shadow);
  z-index: 10;
  animation: pulse 2s ease-in-out infinite;
}

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

.music-hint.hidden {
  display: none;
}

/* Container */
.container {
  position: relative;
  z-index: 1;
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Screens */
.screen {
  display: none;
  width: 100%;
  animation: fadeIn 0.4s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: 0 10px 40px var(--shadow), 0 0 0 3px rgba(255, 107, 157, 0.2);
  width: 100%;
}

.welcome-card h1 {
  font-family: var(--font-title);
  font-size: 1.75rem;
  color: var(--pink-dark);
  text-align: center;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.subtitle {
  text-align: center;
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
  display: block;
  width: 100%;
  padding: 1rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 2rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  color: white;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn-next {
  margin-top: 1rem;
}

.btn.hidden {
  display: none !important;
}

/* Quiz card */
.progress-bar {
  height: 6px;
  background: #ffe0ec;
  border-radius: 3px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--red));
  border-radius: 3px;
  width: 0%;
  transition: width 0.4s ease;
}

.question-number {
  font-size: 0.8rem;
  color: var(--pink-dark);
  margin-bottom: 0.25rem;
}

.question {
  font-family: var(--font-title);
  font-size: 1.35rem;
  color: #333;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option {
  padding: 1rem 1.25rem;
  background: var(--cream);
  border: 2px solid transparent;
  border-radius: 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.option:hover {
  background: #ffd6e4;
  border-color: var(--pink);
}

.option:active {
  transform: scale(0.99);
}

.option.correct {
  background: #c8e6c9;
  border-color: #4caf50;
  pointer-events: none;
}

.option.wrong {
  background: #ffcdd2;
  border-color: #f44336;
  pointer-events: none;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.option:disabled,
.option.answered {
  pointer-events: none;
  opacity: 0.85;
}

.reply-message {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.reply-message.funny {
  background: #fff3e0;
  color: #e65100;
  border: 2px dashed var(--pink);
}

.reply-message.correct {
  background: #e8f5e9;
  color: #2e7d32;
}

/* Result card */
.result-card h1 {
  font-family: var(--font-title);
  font-size: 1.75rem;
  color: var(--pink-dark);
  text-align: center;
  margin-bottom: 1rem;
}

.result-score {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.result-message {
  text-align: center;
  color: #555;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.btn-restart {
  background: linear-gradient(135deg, #81c784, #4caf50);
}

/* Responsive - larger screens */
@media (min-width: 480px) {
  .card {
    padding: 2rem;
  }

  .welcome-card h1,
  .result-card h1 {
    font-size: 2rem;
  }

  .question {
    font-size: 1.5rem;
  }
}

/* Reduce motion if user prefers */
@media (prefers-reduced-motion: reduce) {
  .hearts-bg::before,
  .hearts-bg::after {
    animation: none;
  }

  .option.wrong {
    animation: none;
  }
}
