/* ======================================================
   LE MONDE MANGA D'OLIVIA - Design System & Styling
   ====================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --font-title: 'Fredoka', cursive, sans-serif;
  --font-body: 'Poppins', sans-serif;

  /* Palette de couleurs dark mode vibrant par défaut */
  --bg-main: #0f0e17;
  --bg-secondary: #161524;
  --bg-card: rgba(26, 24, 44, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --border-glass: rgba(255, 255, 255, 0.12);
  
  --text-main: #fffffe;
  --text-muted: #a7a9be;
  --text-highlight: #ff8906;

  --accent-pink: #ff65a3;
  --accent-purple: #8a4fff;
  --accent-teal: #00d2ff;
  --accent-yellow: #ffc837;
  --accent-red: #ff3344;

  --gradient-primary: linear-gradient(135deg, #ff65a3 0%, #8a4fff 100%);
  --gradient-secondary: linear-gradient(135deg, #00d2ff 0%, #8a4fff 100%);
  --gradient-gold: linear-gradient(135deg, #ffc837 0%, #ff8906 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));

  --shadow-glow: 0 8px 32px 0 rgba(138, 79, 255, 0.35);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-full: 9999px;

  --transition-fast: 0.25s ease;
  --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Base resets & box sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 101, 163, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(138, 79, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(0, 210, 255, 0.05) 0%, transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-purple);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-pink);
}

/* Typography elements */
h1, h2, h3, h4, .brand-logo {
  font-family: var(--font-title);
  letter-spacing: 0.5px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
  object-fit: cover;
}

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

/* ======================================================
   HEADER & FLOATING GLASS NAVIGATION
   ====================================================== */
.header-wrapper {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 16px;
  pointer-events: none;
}

.navbar {
  pointer-events: auto;
  max-width: 1050px;
  margin: 0 auto;
  padding: 10px 24px;
  background: rgba(20, 18, 36, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.45),
    0 0 25px rgba(255, 101, 163, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.brand-logo {
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  position: relative;
}

.brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(255, 101, 163, 0.5);
  animation: floatLogo 3s ease-in-out infinite alternate;
}

@keyframes floatLogo {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-3px) rotate(6deg); }
}

.brand-title {
  background: linear-gradient(135deg, #ffffff 0%, #ffc5df 50%, #c49eff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  background: rgba(255, 255, 255, 0.04);
  padding: 5px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-link {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.nav-link .nav-icon {
  font-size: 1.05rem;
  transition: transform 0.3s ease;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.nav-link:hover .nav-icon {
  transform: scale(1.2);
}

.nav-link.active {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 101, 163, 0.45);
}

.nav-link.active .nav-icon {
  transform: scale(1.1);
}

.nav-extra-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid var(--accent-teal);
  color: var(--accent-teal);
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-bounce);
  text-decoration: none;
}

.nav-extra-btn:hover {
  background: var(--accent-teal);
  color: #0f0e17;
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.4);
  transform: translateY(-2px);
}

/* ======================================================
   HERO SECTION
   ====================================================== */
.hero {
  padding: 140px 0 70px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 101, 163, 0.15);
  border: 1px solid rgba(255, 101, 163, 0.3);
  color: var(--accent-pink);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
  animation: pulse 2s infinite alternate;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 101, 163, 0.4); }
  100% { transform: scale(1.03); box-shadow: 0 0 15px rgba(255, 101, 163, 0.6); }
}

.hero-title {
  font-size: 3.2rem;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  max-width: 540px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition-bounce);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 35px rgba(138, 79, 255, 0.5);
}

.btn-secondary {
  background: var(--bg-glass);
  color: #fff;
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.3);
}

.hero-image-wrapper {
  position: relative;
}

.hero-img-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-glass);
  transform: rotate(2deg);
  transition: var(--transition-bounce);
}

.hero-img-card:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-img-card img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.hero-floating-card {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  padding: 16px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
  display: flex;
  align-items: center;
  gap: 14px;
  backdrop-filter: blur(10px);
}

.floating-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

/* ======================================================
   FEATURED MANGA CARDS
   ====================================================== */
.section-title-wrap {
  text-align: center;
  margin-bottom: 50px;
}

.section-tag {
  color: var(--accent-teal);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  color: #fff;
}

.manga-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.manga-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition-bounce);
  display: flex;
  flex-direction: column;
  position: relative;
}

.manga-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 101, 163, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 101, 163, 0.2);
}

.manga-img-box {
  position: relative;
  height: 260px;
  overflow: hidden;
}

.manga-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.manga-card:hover .manga-img-box img {
  transform: scale(1.08);
}

.manga-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(15, 14, 23, 0.85);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-yellow);
  border: 1px solid rgba(255, 200, 55, 0.3);
}

.manga-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.manga-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.manga-title {
  font-size: 1.5rem;
  color: #fff;
  line-height: 1.25;
}

.manga-rating {
  color: var(--accent-yellow);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.manga-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.manga-quote {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--accent-pink);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  font-size: 0.88rem;
  color: #e0e0e0;
  margin-bottom: 20px;
}

.manga-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-glass);
}

.like-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.like-btn:hover, .like-btn.liked {
  background: rgba(255, 101, 163, 0.2);
  border-color: var(--accent-pink);
  color: var(--accent-pink);
}

.like-btn.liked .heart-icon {
  transform: scale(1.3);
}

/* ======================================================
   INTERACTIVE QUIZ & TRIVIA SECTION
   ====================================================== */
.quiz-section {
  padding: 80px 0;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  margin: 60px 0;
  position: relative;
  overflow: hidden;
}

.quiz-box {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  padding: 0 20px;
}

.quiz-question {
  font-size: 1.4rem;
  margin-bottom: 30px;
  color: #fff;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.quiz-opt {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-bounce);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiz-opt:hover {
  background: rgba(138, 79, 255, 0.2);
  border-color: var(--accent-purple);
  transform: translateY(-2px);
}

.quiz-result {
  margin-top: 20px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--accent-purple);
  box-shadow: var(--shadow-glow);
  color: #fff;
  display: none;
  animation: fadeIn 0.4s ease;
  text-align: left;
}

/* Progress Bar & Multi-Step Quiz */
.quiz-progress-wrapper {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 24px;
}

.quiz-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 8px;
}

.quiz-progress-fill {
  height: 100%;
  width: 33%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.quiz-step-indicator {
  font-size: 0.85rem;
  color: var(--accent-teal);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.quiz-badge-featured {
  display: inline-block;
  background: rgba(255, 101, 163, 0.2);
  border: 1px solid var(--accent-pink);
  color: var(--accent-pink);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.quiz-badge-recom {
  display: inline-block;
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid var(--accent-teal);
  color: var(--accent-teal);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}

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

/* ======================================================
   PAGE: A PROPOS DE OLIVIA
   ====================================================== */
.profile-hero {
  padding: 140px 0 60px;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: center;
}

.profile-img-container {
  position: relative;
}

.profile-avatar {
  width: 100%;
  height: 380px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
  border: 3px solid var(--accent-pink);
}

.profile-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}

.info-item {
  background: rgba(255, 255, 255, 0.04);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.info-label {
  font-size: 0.85rem;
  color: var(--accent-teal);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.info-val {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.family-box {
  background: rgba(255, 101, 163, 0.08);
  border-left: 4px solid var(--accent-pink);
  padding: 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-top: 24px;
}

.family-title {
  color: var(--accent-pink);
  font-size: 1.2rem;
  margin-bottom: 8px;
}

/* ======================================================
   MEMORY GAME
   ====================================================== */
.memory-section {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.memory-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.memory-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.memory-stat-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 700px;
  margin: 0 auto;
  perspective: 1000px;
}

.memory-card {
  height: 140px;
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius-md);
  position: relative;
  outline: none;
}

.memory-card:focus-visible {
  outline: 2px solid var(--accent-pink);
}

.memory-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: var(--radius-md);
}

.memory-card.flipped .memory-card-inner,
.memory-card.matched .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card.matched {
  cursor: default;
}

.memory-card.matched .memory-card-inner {
  animation: matchPulse 0.5s ease;
}

@keyframes matchPulse {
  0% { transform: scale(1) rotateY(180deg); }
  50% { transform: scale(1.06) rotateY(180deg); filter: drop-shadow(0 0 14px var(--accent-pink)); }
  100% { transform: scale(1) rotateY(180deg); }
}

.memory-card-front,
.memory-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Back of card (visible initially) */
.memory-card-front {
  background: linear-gradient(135deg, rgba(138, 79, 255, 0.25) 0%, rgba(255, 101, 163, 0.2) 100%), var(--bg-secondary);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: var(--transition-fast);
}

.memory-card:hover .memory-card-front {
  border-color: var(--accent-pink);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 101, 163, 0.3);
}

.memory-back-pattern {
  font-size: 2.2rem;
  filter: drop-shadow(0 2px 8px rgba(255, 101, 163, 0.4));
  transition: transform 0.3s ease;
}

.memory-card:hover .memory-back-pattern {
  transform: scale(1.15) rotate(10deg);
}

.memory-back-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Face of card (revealed upon flip) */
.memory-card-back {
  transform: rotateY(180deg);
  background: var(--bg-secondary);
  border: 2px solid var(--accent-pink);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  position: relative;
}

.memory-card-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(15, 14, 23, 0.88);
  backdrop-filter: blur(4px);
  color: var(--accent-teal);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.25);
  z-index: 2;
  pointer-events: none;
  max-width: 85%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.memory-card-img {
  width: 100%;
  height: 105px;
  object-fit: cover;
}

.memory-card-title {
  padding: 4px 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  color: #fff;
  background: rgba(15, 14, 23, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Win Overlay */
.memory-win-banner {
  margin-top: 30px;
  padding: 30px;
  background: linear-gradient(135deg, rgba(255, 101, 163, 0.12), rgba(138, 79, 255, 0.15));
  border: 1px solid var(--accent-pink);
  border-radius: var(--radius-md);
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.win-emoji {
  font-size: 3rem;
  margin-bottom: 8px;
}

@media (max-width: 650px) {
  .memory-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .memory-card {
    height: 110px;
  }
  .memory-card-img {
    height: 80px;
  }
  .memory-card-title {
    font-size: 0.68rem;
    padding: 2px 4px;
  }
  .memory-back-pattern {
    font-size: 1.6rem;
  }
}

@media (max-width: 440px) {
  .memory-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ======================================================
   INTERACTIVE PUZZLE GAME SECTION
   ====================================================== */
.puzzle-section {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.puzzle-box {
  max-width: 900px;
  margin: 0 auto;
}

.puzzle-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.puzzle-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.puzzle-stat-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.puzzle-diff-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  padding: 3px;
  border: 1px solid var(--border-glass);
}

.btn-diff {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-body);
}

.btn-diff.active {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(255, 101, 163, 0.35);
}

.btn-hint {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  transition: var(--transition-fast);
}

.btn-hint.active {
  background: rgba(255, 222, 89, 0.2);
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

/* Image Selector Pills */
.puzzle-selector-wrapper {
  margin-bottom: 24px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.puzzle-selector-label {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-teal);
  font-weight: 600;
  margin-bottom: 10px;
}

.puzzle-selector-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.puzzle-thumb-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 6px 10px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  font-size: 0.85rem;
  font-family: var(--font-body);
  flex-shrink: 0;
}

.puzzle-thumb-btn img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.puzzle-thumb-btn:hover {
  background: rgba(255, 101, 163, 0.15);
  border-color: rgba(255, 101, 163, 0.5);
}

.puzzle-thumb-btn.active {
  background: rgba(255, 101, 163, 0.25);
  border-color: var(--accent-pink);
  box-shadow: 0 0 12px rgba(255, 101, 163, 0.35);
}

/* Puzzle Play Area */
.puzzle-play-area {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 28px;
  align-items: start;
}

.puzzle-board-container {
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 12px;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.puzzle-grid {
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 1;
  gap: 4px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.puzzle-grid.grid-3 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
}

.puzzle-grid.grid-4 {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
}

.puzzle-piece {
  position: relative;
  cursor: pointer;
  border-radius: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  user-select: none;
  background-repeat: no-repeat;
  outline: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.puzzle-piece:hover {
  transform: scale(0.97);
  filter: brightness(1.12);
  border-color: rgba(255, 255, 255, 0.4);
}

.puzzle-piece.selected {
  outline: 3px solid var(--accent-pink);
  box-shadow: 0 0 18px var(--accent-pink);
  transform: scale(1.02);
  z-index: 5;
  animation: pulseSelected 1s infinite alternate;
}

@keyframes pulseSelected {
  0% { box-shadow: 0 0 8px var(--accent-pink); }
  100% { box-shadow: 0 0 20px var(--accent-pink); }
}

.puzzle-piece-number {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.show-numbers .puzzle-piece-number {
  opacity: 1;
}

/* Preview Card */
.puzzle-preview-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.puzzle-preview-img-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--accent-teal);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.puzzle-preview-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Win Banner */
.puzzle-win-banner {
  margin-top: 30px;
  padding: 30px;
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.15), rgba(138, 79, 255, 0.2));
  border: 1px solid var(--accent-teal);
  border-radius: var(--radius-md);
  text-align: center;
  animation: fadeIn 0.4s ease;
}

@media (max-width: 768px) {
  .puzzle-play-area {
    grid-template-columns: 1fr;
  }
  .puzzle-preview-card {
    max-width: 220px;
    margin: 0 auto;
  }
}

/* ======================================================
   INTERACTIVE CHERCHE ET TROUVE SECTION
   ====================================================== */
.find-section {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.find-box {
  max-width: 950px;
  margin: 0 auto;
}

.find-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.find-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.find-stat-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Targets Checklist */
.find-targets-wrapper {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.find-targets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.find-targets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}

.find-target-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: #fff;
  transition: var(--transition-fast);
  user-select: none;
}

.find-target-card.found {
  background: rgba(0, 255, 170, 0.12);
  border-color: rgba(0, 255, 170, 0.5);
  color: #a3ffdc;
}

.find-target-card.found .find-target-check {
  background: #00ffaa;
  color: #000;
  border-color: #00ffaa;
}

.find-target-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.find-target-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  overflow: hidden;
}

.find-target-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.find-target-manga {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Scene Container */
.find-scene-container {
  position: relative;
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

.find-scene-wrapper {
  position: relative;
  width: 100%;
  line-height: 0;
}

.find-scene-img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.find-hotspots-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

/* Hotspot item */
.find-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, background-color 0.2s ease;
  z-index: 10;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(2px);
  border: 1px dashed rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.find-hotspot:hover {
  transform: translate(-50%, -50%) scale(1.18);
  background: rgba(255, 222, 89, 0.3);
  border-color: var(--accent-yellow);
}

.find-hotspot-icon {
  font-size: 1.45rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8));
  transition: transform 0.3s ease;
  user-select: none;
}

/* Found state */
.find-hotspot.found {
  pointer-events: none;
  border: 2px solid #00ffaa;
  background: rgba(0, 255, 170, 0.35);
  box-shadow: 0 0 16px #00ffaa;
  animation: foundBurst 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.find-hotspot.found .find-hotspot-icon {
  transform: scale(1.15);
}

@keyframes foundBurst {
  0% { transform: translate(-50%, -50%) scale(0.5); }
  50% { transform: translate(-50%, -50%) scale(1.35); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Hint pulse animation */
.find-hotspot.hint-pulse {
  animation: hintRadar 1.5s infinite;
  border: 2px solid var(--accent-yellow);
  background: rgba(255, 222, 89, 0.45);
}

@keyframes hintRadar {
  0% { box-shadow: 0 0 0 0 rgba(255, 222, 89, 0.8); transform: translate(-50%, -50%) scale(1); }
  70% { box-shadow: 0 0 0 24px rgba(255, 222, 89, 0); transform: translate(-50%, -50%) scale(1.25); }
  100% { box-shadow: 0 0 0 0 rgba(255, 222, 89, 0); transform: translate(-50%, -50%) scale(1); }
}

/* Floating toast notification */
.find-toast {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 14, 23, 0.94);
  border: 1px solid var(--accent-yellow);
  color: #fff;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  z-index: 25;
  pointer-events: none;
  animation: fadeIn 0.3s ease;
  white-space: nowrap;
}

/* Win Banner */
.find-win-banner {
  margin-top: 30px;
  padding: 30px;
  background: linear-gradient(135deg, rgba(255, 222, 89, 0.15), rgba(0, 210, 255, 0.15));
  border: 1px solid var(--accent-yellow);
  border-radius: var(--radius-md);
  text-align: center;
  animation: fadeIn 0.4s ease;
}

/* ======================================================
   FOOTER
   ====================================================== */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-glass);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 80px;
}

footer span {
  color: var(--accent-pink);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-subtitle {
    margin: 0 auto 30px;
  }
  .hero-buttons {
    justify-content: center;
  }
  .profile-card {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .profile-details-grid {
    grid-template-columns: 1fr;
  }
  .quiz-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .nav-links {
    gap: 4px;
  }
  .nav-link {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}
