/* style.css - Warm coral & rose gold theme */

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

html {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #fff5f5, #fef2f2, #fff7ed, #fdf4ff);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  color: #44403c;
  min-height: 100vh;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  min-height: 100vh;
}

/* Header */
.header {
  width: 100%;
  max-width: 700px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #e11d48, #f472b6, #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Header nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.nav-link {
  color: #e11d48;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 10rem;
  background: rgba(225, 29, 72, 0.06);
  border: 1px solid rgba(225, 29, 72, 0.12);
  transition: all 0.3s ease;
  font-size: 0.9rem;
}
.nav-link:hover {
  background: rgba(225, 29, 72, 0.12);
  transform: translateY(-1px);
}
.lang-btn {
  color: #ea580c;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 10rem;
  background: rgba(234, 88, 12, 0.06);
  border: 1px solid rgba(234, 88, 12, 0.12);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}
.lang-btn:hover {
  background: rgba(234, 88, 12, 0.12);
  transform: translateY(-1px);
}

/* Glass card */
.card {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 1.5rem;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: 1.75rem;
  width: 100%;
  max-width: 700px;
  box-shadow: 0 4px 24px rgba(225, 29, 72, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Fade */
.fade-in { animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Progress */
.progress-bar { margin-bottom: 1.25rem; }
#progress-text {
  display: block;
  font-size: 0.85rem;
  color: #e11d48;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.progress-track {
  width: 100%;
  height: 5px;
  background: rgba(225, 29, 72, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f472b6, #e11d48, #fb923c);
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
}

/* Image */
.image-wrapper {
  width: 100%; max-height: 320px; overflow: hidden;
  border-radius: 0.75rem; margin-bottom: 1rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.02);
}
.image-wrapper img { max-width: 100%; max-height: 320px; object-fit: contain; }
.image-wrapper:empty { display: none; }

/* Question */
.question {
  font-size: 1.1rem;
  margin-bottom: 1.15rem;
  line-height: 1.65;
  font-weight: 600;
  color: #1c1917;
}

/* Options */
.options { list-style: none; display: grid; gap: 0.55rem; }
.options li {
  background: #fff;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1.5px solid #fce7f3;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #44403c;
}
.options li:hover {
  background: #fff1f2;
  border-color: #fda4af;
  transform: translateX(4px);
}
.options li.correct {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
  font-weight: 500;
}
.options li.wrong {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* Explanation */
.explanation {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: #fffbeb;
  border-left: 3px solid #fbbf24;
  border-radius: 0 0.5rem 0.5rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #92400e;
  animation: fadeIn 0.4s ease-out;
}
.explanation strong { color: #d97706; }

/* Buttons */
.btn-group { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.btn {
  flex: 1;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #e11d48, #f472b6);
  border: none;
  border-radius: 10rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}
.btn-secondary {
  background: #fff;
  border: 1.5px solid #fce7f3;
  color: #78716c;
}
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.2);
}
.btn-secondary:hover:not(:disabled) {
  background: #fff1f2;
  border-color: #fda4af;
  color: #44403c;
  box-shadow: none;
}

/* Activation Screen */
.activate-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  width: 100%;
}
.activate-card {
  max-width: 400px;
  text-align: center;
  padding: 2.5rem 2rem !important;
}
.activate-icon {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
  animation: bounce 2s ease infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.activate-title {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, #e11d48, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.4rem;
}
.activate-desc {
  color: #78716c;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.activate-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid #fce7f3;
  border-radius: 0.75rem;
  font-size: 1rem;
  text-align: center;
  letter-spacing: 2px;
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: #1c1917;
  outline: none;
  transition: border-color 0.3s ease;
}
.activate-input:focus {
  border-color: #f472b6;
  box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.1);
}
.activate-input::placeholder {
  color: #d6d3d1;
  letter-spacing: 0;
}
.activate-error {
  color: #e11d48;
  font-size: 0.85rem;
  min-height: 1.5rem;
  margin-top: 0.5rem;
}
.activate-btn {
  width: 100%;
  margin-top: 0.5rem;
}
.shake {
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  50% { transform: translateX(8px); }
  75% { transform: translateX(-4px); }
}
/* Exam Timer */
.exam-timer {
  font-size: 1.4rem;
  font-weight: 700;
  color: #e11d48;
  background: rgba(225, 29, 72, 0.06);
  padding: 0.4rem 1rem;
  border-radius: 10rem;
  border: 1.5px solid rgba(225, 29, 72, 0.15);
  font-family: 'Inter', monospace;
}
.timer-warning {
  animation: pulse 1s ease infinite;
  color: #dc2626;
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Exam Info Cards */
.exam-info {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
}
.exam-info-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  background: rgba(225, 29, 72, 0.04);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  color: #44403c;
}

/* Selected option (exam mode) */
.options li.selected {
  background: #fdf2f8;
  border-color: #f472b6;
  color: #9d174d;
  font-weight: 500;
}

/* Navigation Dots */
.exam-nav-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1.25rem;
  justify-content: center;
}
.nav-dot {
  width: 28px;
  height: 28px;
  border-radius: 0.35rem;
  background: #fff;
  border: 1.5px solid #fce7f3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: #a8a29e;
  cursor: pointer;
  transition: all 0.2s ease;
}
.nav-dot:hover { border-color: #f472b6; }
.dot-active { background: #e11d48; color: #fff; border-color: #e11d48; }
.dot-answered { background: #fce7f3; color: #9d174d; border-color: #f9a8d4; }

/* Back link */
.back-link {
  display: inline-block;
  margin-top: 1rem;
  color: #a8a29e;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.back-link:hover { color: #e11d48; }

@media (max-width: 600px) {
  .header h1 { font-size: 1.4rem; }
  .card { padding: 1.15rem; border-radius: 1.15rem; }
  .question { font-size: 1rem; }
  .options li { padding: 0.7rem 0.85rem; font-size: 0.9rem; }
  .btn { padding: 0.65rem 1rem; font-size: 0.9rem; }
  .activate-card { margin: 0 1rem; padding: 2rem 1.5rem !important; }
  .exam-timer { font-size: 1.1rem; padding: 0.3rem 0.7rem; }
  .nav-dot { width: 24px; height: 24px; font-size: 0.6rem; }
  .header-nav { gap: 0.4rem; }
  .nav-link { padding: 0.4rem 0.6rem; font-size: 0.8rem; }
}
