/* Light Mode & Refined Styles for FavQuiz */
:root {
  --bg-main: #ffffff;
  --bg-sub: #f3f0ff; /* Light soft purple tint matching screenshot */
  --bg-card: #ffffff;
  --bg-card-hover: #f8f6ff;
  --accent-primary: #5c52d4; /* Purple header accent matching screenshot */
  --accent-secondary: #796ef1;
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --text-main: #1e1b4b;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(92, 82, 212, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 35px -5px rgba(30, 27, 75, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --font-family: 'Noto Sans JP', 'Outfit', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Background Soft Glows */
.bg-glow {
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, rgba(236, 72, 153, 0.05) 50%, rgba(255, 255, 255, 0) 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(80px);
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header Navbar */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 0;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.35rem;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--accent-primary);
}

.nav-cta {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
}

/* Hero Section */
.hero {
  padding: 160px 0 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 30px;
  font-size: 0.875rem;
  color: var(--accent-primary);
  font-weight: 700;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text-main);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  background: var(--text-main);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}

.btn-store:hover {
  background: #1e293b;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
}

.btn-store svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.btn-store .btn-text small {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
  font-weight: 400;
  text-transform: uppercase;
}

.btn-store .btn-text span {
  font-size: 1.1rem;
}

/* App Mockup Visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mockup-frame {
  width: 290px;
  border-radius: 40px;
  box-shadow: var(--shadow-lg), 0 20px 40px rgba(99, 102, 241, 0.15);
  border: 8px solid #ffffff;
  outline: 1px solid var(--border-light);
  overflow: hidden;
  transition: transform 0.5s ease;
  background: #fff;
}

.mockup-frame:hover {
  transform: scale(1.03) rotate(-1deg);
}

.mockup-frame img {
  width: 100%;
  display: block;
}

.floating-badge {
  position: absolute;
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: float 4s ease-in-out infinite alternate;
}

.badge-top-left {
  top: 10%;
  left: -20px;
}

.badge-bottom-right {
  bottom: 12%;
  right: -20px;
  animation-delay: 2s;
}

@keyframes float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

/* Stats Section */
.stats-section {
  padding: 50px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-sub);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

/* Features Grid */
.section-padding {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 60px;
}

.section-title h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 24px;
}

.feature-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Interactive Mini Quiz Demo Widget */
.demo-quiz-section {
  background: var(--bg-sub);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.quiz-widget-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.quiz-category-tag {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

.quiz-progress-num {
  font-weight: 700;
  color: var(--accent-secondary);
}

.quiz-question {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 28px;
  min-height: 60px;
  color: var(--text-main);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.option-btn {
  background: var(--bg-sub);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.option-btn:hover:not(:disabled) {
  background: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
  transform: translateX(6px);
}

.option-btn.correct {
  background: #dcfce7 !important;
  border-color: #22c55e !important;
  color: #15803d !important;
}

.option-btn.wrong {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
}

.quiz-main-content {
  outline: none;
}

/* Quiz Right-side Explanation Box */
.quiz-explanation-side {
  background: #f8f6ff;
  border: 1.5px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateX(15px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  outline: none;
}

.quiz-explanation-side.show {
  opacity: 1;
  transform: translateX(0);
}

.explanation-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(92, 82, 212, 0.12);
  color: var(--accent-primary);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 4px 14px;
  border-radius: 20px;
  align-self: flex-start;
  margin-bottom: 16px;
}

.explanation-text {
  color: var(--text-main);
  font-size: 0.98rem;
  line-height: 1.75;
  margin-bottom: 24px;
  flex-grow: 1;
}

.btn-next {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(92, 82, 212, 0.25);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: flex-start;
}

.btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(92, 82, 212, 0.4);
}

@media (max-width: 850px) {
  .quiz-layout-grid.has-explanation {
    grid-template-columns: 1fr;
  }
}

.quiz-result {
  text-align: center;
  padding: 20px 0;
  display: none;
  outline: none;
}

.quiz-result h3 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.btn-restart {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 20px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Reviews Grid */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.rating {
  color: var(--accent-amber);
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.review-card p {
  color: var(--text-main);
  font-size: 0.95rem;
  margin-bottom: 20px;
  font-style: italic;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.user-details h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.user-details span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* FAQ Accordion */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.faq-question {
  padding: 20px 24px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active .faq-toggle-icon {
  transform: rotate(180deg);
}

.faq-toggle-icon {
  transition: transform 0.3s;
  color: var(--text-muted);
}

/* CTA Download Banner */
.cta-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.08));
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
}

.cta-banner h2 {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-banner p {
  color: var(--text-muted);
  font-size: 1.15rem;
  margin-bottom: 36px;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-light);
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--bg-sub);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

/* Responsive */
@media (max-width: 992px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-buttons {
    justify-content: center;
  }
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  .features-grid, .reviews-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2.5rem;
  }
  nav ul {
    display: none;
  }
}
