/* ============================
   SDG 14: Leben unter Wasser
   Style Sheet
   ============================ */

/* ===== FONTS & RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ocean-deep:   #0a2d5c;
  --ocean-mid:    #0d47a1;
  --ocean-light:  #1565c0;
  --ocean-teal:   #006064;
  --ocean-cyan:   #00acc1;
  --ocean-bright: #29b6f6;
  --coral:        #ff6f61;
  --coral-light:  #ff8a80;
  --sand:         #fff9e6;
  --sand-dark:    #fff3c4;
  --sun-yellow:   #ffd600;
  --green-sea:    #00c853;
  --purple-sea:   #7b1fa2;
  --white:        #ffffff;
  --text-dark:    #1a237e;
  --text-mid:     #0d47a1;
  --shadow:       0 8px 32px rgba(10,45,92,0.15);
  --shadow-lg:    0 16px 48px rgba(10,45,92,0.25);
  --radius:       20px;
  --radius-lg:    32px;
}

body {
  font-family: 'Nunito', 'Baloo 2', sans-serif;
  background: linear-gradient(180deg, #e0f4ff 0%, #b3e0ff 30%, #e8f5e9 100%);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===== BUBBLES ===== */
.bubbles {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bubble {
  position: absolute;
  bottom: -100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.35);
  animation: floatUp linear infinite;
}
.bubble:nth-child(1)  { width:20px; height:20px; left:5%;  animation-duration:8s;  animation-delay:0s; }
.bubble:nth-child(2)  { width:35px; height:35px; left:15%; animation-duration:11s; animation-delay:2s; }
.bubble:nth-child(3)  { width:14px; height:14px; left:25%; animation-duration:7s;  animation-delay:1s; }
.bubble:nth-child(4)  { width:28px; height:28px; left:38%; animation-duration:13s; animation-delay:4s; }
.bubble:nth-child(5)  { width:18px; height:18px; left:52%; animation-duration:9s;  animation-delay:0.5s; }
.bubble:nth-child(6)  { width:40px; height:40px; left:63%; animation-duration:14s; animation-delay:3s; }
.bubble:nth-child(7)  { width:22px; height:22px; left:72%; animation-duration:10s; animation-delay:1.5s; }
.bubble:nth-child(8)  { width:12px; height:12px; left:82%; animation-duration:8s;  animation-delay:5s; }
.bubble:nth-child(9)  { width:30px; height:30px; left:90%; animation-duration:12s; animation-delay:2.5s; }
.bubble:nth-child(10) { width:16px; height:16px; left:44%; animation-duration:9s;  animation-delay:6s; }

@keyframes floatUp {
  0%   { transform: translateY(0) scale(1); opacity: 0.7; }
  80%  { opacity: 0.5; }
  100% { transform: translateY(-110vh) scale(1.1); opacity: 0; }
}

/* ===== SWIMMING FISH ===== */
.fish-deco {
  position: fixed;
  font-size: 2.5rem;
  z-index: 1;
  pointer-events: none;
  animation: swim linear infinite;
}
.fish-1 { top: 18%; animation-duration:18s; animation-delay:0s; }
.fish-2 { top: 45%; animation-duration:22s; animation-delay:6s; font-size:2rem; }
.fish-3 { top: 72%; animation-duration:15s; animation-delay:11s; font-size:1.8rem; }

@keyframes swim {
  0%   { left: -80px; transform: scaleX(1); }
  49%  { left: calc(100vw + 80px); transform: scaleX(1); }
  50%  { left: calc(100vw + 80px); transform: scaleX(-1); }
  99%  { left: -80px; transform: scaleX(-1); }
  100% { left: -80px; transform: scaleX(1); }
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--ocean-deep) 0%, var(--ocean-mid) 50%, var(--ocean-cyan) 100%);
  color: white;
  padding: 80px 24px 120px;
  text-align: center;
  overflow: hidden;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(ellipse at 60% 40%, rgba(41,182,246,0.2) 0%, transparent 60%);
  animation: shimmer 6s ease-in-out infinite alternate;
}

@keyframes shimmer {
  0%   { transform: translate(0,0); }
  100% { transform: translate(30px, 20px); }
}

.hero-content { position: relative; z-index: 3; }

.sdg-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.5);
  color: white;
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 6px 20px;
  border-radius: 50px;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: pulse 2.5s ease-in-out infinite;
}

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

.hero h1 {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
  font-size: 1.4rem;
  font-weight: 600;
  opacity: 0.95;
  margin-bottom: 20px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero-emoji-row {
  font-size: 2.2rem;
  margin-bottom: 32px;
  animation: wiggle 3s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-2deg); }
  50%       { transform: rotate(2deg); }
}

.hero-image-wrap {
  position: relative;
  z-index: 3;
  max-width: 800px;
  width: 90%;
  animation: floatImg 4s ease-in-out infinite;
}

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

.hero-img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(41,182,246,0.4);
  border: 4px solid rgba(255,255,255,0.3);
}

.btn-hero {
  display: inline-block;
  background: linear-gradient(135deg, var(--sun-yellow), #ffab00);
  color: var(--ocean-deep);
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  padding: 16px 44px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(255,214,0,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
  animation: bounceBtn 2s ease-in-out infinite;
}

@keyframes bounceBtn {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.btn-hero:hover { transform: scale(1.07) translateY(-4px); box-shadow: 0 12px 36px rgba(255,214,0,0.6); }

/* ===== WAVES ===== */
.wave-bottom {
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 80px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80'%3E%3Cpath fill='%23e8f5ff' d='M0,40 C360,80 720,0 1080,40 C1260,60 1360,50 1440,40 L1440,80 L0,80 Z'/%3E%3C/svg%3E") center bottom no-repeat;
  background-size: cover;
  z-index: 5;
}

/* ===== SECTIONS ===== */
.section {
  padding: 80px 0;
  position: relative;
  z-index: 2;
}

.section-light  { background: linear-gradient(180deg, #e8f5ff 0%, #f0fbff 100%); }
.section-ocean  { background: linear-gradient(160deg, #0d47a1 0%, #006064 100%); color: white; }
.section-ocean .section-intro { color: rgba(255,255,255,0.85); }
.section-danger { background: linear-gradient(160deg, #37474f 0%, #263238 100%); color: white; }
.section-danger .section-intro { color: rgba(255,255,255,0.85); }
.section-action { background: linear-gradient(160deg, #e8f5e9 0%, #c8e6c9 100%); }
.section-quiz   { background: linear-gradient(160deg, #f3e5f5 0%, #e1bee7 100%); }
.section-facts  { background: linear-gradient(160deg, #fff9c4 0%, #fff3e0 100%); }
.section-game   { background: linear-gradient(160deg, #e0f2f1 0%, #b2dfdb 100%); }
.section-pledge { background: linear-gradient(160deg, #0a2d5c 0%, #1565c0 100%); color: white; }

.section-tag {
  display: inline-block;
  background: rgba(41,182,246,0.18);
  border: 2px solid rgba(41,182,246,0.4);
  color: var(--ocean-mid);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 50px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-ocean .section-tag,
.section-danger .section-tag,
.section-pledge .section-tag {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.4);
}

h2 {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--ocean-deep);
}

.section-ocean h2, .section-danger h2, .section-pledge h2 { color: white; }

.section-intro {
  font-size: 1.15rem;
  max-width: 680px;
  margin-bottom: 40px;
  color: #37474f;
}

/* ===== INFO CARDS ===== */
.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
}

.info-card {
  background: white;
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  border-top: 5px solid transparent;
}

.info-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.card-blue  { border-top-color: var(--ocean-bright); }
.card-teal  { border-top-color: var(--ocean-teal); }
.card-cyan  { border-top-color: var(--ocean-cyan); }

.card-icon  { font-size: 3rem; margin-bottom: 12px; }
.info-card h3 { font-family: 'Baloo 2', sans-serif; font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; color: var(--ocean-deep); }
.info-card p  { font-size: 1rem; color: #455a64; line-height: 1.6; }

/* ===== FUN FACT BOX ===== */
.fun-fact-box {
  background: linear-gradient(135deg, #fff9e6, #fff3c4);
  border-radius: var(--radius);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow);
  border-left: 6px solid var(--sun-yellow);
}

.fun-fact-emoji { font-size: 2.5rem; flex-shrink: 0; }
.fun-fact-box p { font-size: 1.1rem; color: var(--ocean-deep); line-height: 1.6; }

/* ===== ANIMAL GRID ===== */
.animal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

.animal-card {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  border: 2px solid rgba(255,255,255,0.2);
  color: white;
  backdrop-filter: blur(8px);
}

.animal-card:hover {
  transform: translateY(-6px) scale(1.03);
  background: rgba(255,255,255,0.2);
}

.animal-card .animal-emoji { font-size: 3.5rem; display: block; margin-bottom: 8px; }
.animal-card .animal-name { font-family: 'Baloo 2', sans-serif; font-size: 1.1rem; font-weight: 700; }
.animal-card .animal-desc {
  font-size: 0.85rem;
  margin-top: 8px;
  color: rgba(255,255,255,0.85);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  line-height: 1.5;
}
.animal-card.open .animal-desc { max-height: 120px; }
.animal-card.open { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.5); }

/* ===== IMPORTANCE GRID ===== */
.importance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.importance-item {
  background: white;
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.25s;
}
.importance-item:hover { transform: translateY(-6px); }
.importance-icon { font-size: 3rem; margin-bottom: 12px; }
.importance-item h3 { font-family: 'Baloo 2', sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--ocean-deep); margin-bottom: 8px; }
.importance-item p { font-size: 0.95rem; color: #455a64; line-height: 1.6; }

/* ===== DANGER SECTION ===== */
.danger-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 768px) { .danger-layout { grid-template-columns: 1fr; } }

.danger-image-wrap img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 3px solid rgba(255,255,255,0.15);
}

.danger-img { width: 100%; border-radius: var(--radius); }

.danger-cards { display: flex; flex-direction: column; gap: 16px; }

.danger-card {
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  transition: background 0.2s;
}
.danger-card:hover { background: rgba(255,255,255,0.15); }
.danger-icon { font-size: 2rem; flex-shrink: 0; }
.danger-card h3 { font-family: 'Baloo 2', sans-serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; color: white; }
.danger-card p { font-size: 0.9rem; color: rgba(255,255,255,0.8); line-height: 1.5; }

/* ===== CHECKLIST ===== */
.checklist-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 768px) { .checklist-wrap { grid-template-columns: 1fr; } }

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

.check-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  border: 3px solid transparent;
}
.check-item:hover { transform: translateX(6px); }
.check-item.checked {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border-color: var(--green-sea);
}

.check-box {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 3px solid #b0bec5;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: all 0.2s;
  background: white;
}
.check-item.checked .check-box {
  background: var(--green-sea);
  border-color: var(--green-sea);
  color: white;
}

.check-text { font-size: 1rem; font-weight: 600; color: var(--ocean-deep); }
.check-emoji { font-size: 1.4rem; }

.checklist-image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  margin-bottom: 20px;
}

.progress-box {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}
.progress-label { font-size: 0.9rem; font-weight: 600; color: #607d8b; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; }
.stars-display { font-size: 1.6rem; margin-bottom: 6px; }
.progress-count { font-family: 'Baloo 2', sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--ocean-deep); margin-bottom: 12px; }
.progress-bar-bg { background: #e0e0e0; border-radius: 50px; height: 14px; overflow: hidden; }
.progress-bar-fill {
  background: linear-gradient(90deg, var(--green-sea), #69f0ae);
  height: 100%;
  border-radius: 50px;
  width: 0%;
  transition: width 0.5s ease;
}

.hero-message {
  margin-top: 30px;
  background: linear-gradient(135deg, #fff9c4, #fff59d);
  border-radius: var(--radius);
  padding: 20px 32px;
  text-align: center;
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ocean-deep);
  box-shadow: var(--shadow);
  border: 2px solid var(--sun-yellow);
}

/* ===== QUIZ ===== */
.quiz-container {
  max-width: 700px;
  margin: 0 auto;
}

.quiz-question-card {
  background: white;
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 20px;
}

.quiz-number {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--purple-sea);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.quiz-q-text {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ocean-deep);
  margin-bottom: 24px;
}

.quiz-emoji-big { font-size: 3rem; display: block; margin-bottom: 12px; }

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

.quiz-option {
  background: #f5f5f5;
  border: 3px solid #e0e0e0;
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  color: var(--ocean-deep);
  font-family: 'Nunito', sans-serif;
}
.quiz-option:hover:not(:disabled) { background: #e3f2fd; border-color: var(--ocean-bright); transform: translateX(4px); }
.quiz-option.correct { background: #e8f5e9; border-color: var(--green-sea); color: #1b5e20; }
.quiz-option.wrong   { background: #ffebee; border-color: #e53935; color: #b71c1c; }
.quiz-option:disabled { cursor: default; }

.quiz-feedback {
  margin-top: 16px;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  display: none;
}
.quiz-feedback.show { display: block; }
.quiz-feedback.correct-fb { background: #e8f5e9; color: #1b5e20; border: 2px solid var(--green-sea); }
.quiz-feedback.wrong-fb   { background: #ffebee; color: #b71c1c; border: 2px solid #e53935; }

.quiz-nav { margin-top: 24px; display: flex; gap: 12px; justify-content: center; }

.btn-next {
  background: linear-gradient(135deg, var(--ocean-mid), var(--ocean-bright));
  color: white;
  border: none;
  border-radius: 50px;
  padding: 14px 36px;
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(13,71,161,0.3);
}
.btn-next:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(13,71,161,0.4); }

.quiz-progress {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}
.quiz-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #b0bec5;
  transition: background 0.3s;
}
.quiz-dot.active  { background: var(--purple-sea); }
.quiz-dot.done    { background: var(--green-sea); }

.quiz-result {
  background: white;
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.quiz-result h3 { font-family: 'Baloo 2', sans-serif; font-size: 2rem; font-weight: 800; color: var(--ocean-deep); margin-bottom: 12px; }
.quiz-result .result-emoji { font-size: 4rem; margin-bottom: 16px; }
.quiz-score { font-size: 3rem; font-weight: 800; color: var(--purple-sea); margin-bottom: 8px; }

/* ===== FACTS CAROUSEL ===== */
.facts-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 220px;
}

.fact-slide {
  background: white;
  border-radius: var(--radius);
  padding: 40px 48px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  display: none;
  animation: fadeIn 0.4s ease;
}
.fact-slide.active { display: flex; flex-direction: column; align-items: center; }

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

.fact-animal-emoji { font-size: 5rem; margin-bottom: 16px; }
.fact-title { font-family: 'Baloo 2', sans-serif; font-size: 1.5rem; font-weight: 800; color: var(--ocean-deep); margin-bottom: 12px; }
.fact-text  { font-size: 1.1rem; color: #37474f; line-height: 1.7; max-width: 600px; }

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.carousel-btn {
  background: linear-gradient(135deg, var(--ocean-mid), var(--ocean-bright));
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px; height: 48px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s;
  box-shadow: var(--shadow);
}
.carousel-btn:hover { transform: scale(1.1); }

.carousel-dots { display: flex; gap: 8px; }
.carousel-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #b0bec5;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.carousel-dot.active { background: var(--sun-yellow); transform: scale(1.3); }

/* ===== MEMORY GAME ===== */
.game-info-bar {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.game-stat {
  background: white;
  border-radius: 50px;
  padding: 10px 24px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ocean-deep);
  box-shadow: var(--shadow);
}

.btn-restart {
  background: linear-gradient(135deg, var(--coral), #ff8a80);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 24px;
  font-family: 'Baloo 2', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s;
}
.btn-restart:hover { transform: scale(1.05); }

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

@media (max-width: 480px) { .memory-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; } }

.memory-card {
  aspect-ratio: 1;
  border-radius: 16px;
  cursor: pointer;
  perspective: 800px;
  transition: transform 0.1s;
}
.memory-card:hover:not(.flipped):not(.matched) { transform: scale(1.05); }

.card-inner {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.4s ease;
}
.memory-card.flipped .card-inner  { transform: rotateY(180deg); }
.memory-card.matched .card-inner  { transform: rotateY(180deg); }

.card-front, .card-back {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.card-front {
  background: linear-gradient(135deg, var(--ocean-mid), var(--ocean-bright));
  color: white;
  font-size: 1.8rem;
}

.card-back {
  background: white;
  transform: rotateY(180deg);
}

.memory-card.matched .card-back {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  animation: matchPop 0.3s ease;
}

@keyframes matchPop {
  0%   { transform: rotateY(180deg) scale(1); }
  50%  { transform: rotateY(180deg) scale(1.15); }
  100% { transform: rotateY(180deg) scale(1); }
}

.win-message {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(6px);
}
.win-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: 60px 48px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.4s ease;
}
@keyframes popIn {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.win-emoji { font-size: 5rem; margin-bottom: 16px; }
.win-content h3 { font-family: 'Baloo 2', sans-serif; font-size: 2.5rem; font-weight: 800; color: var(--ocean-deep); margin-bottom: 12px; }
.win-content p  { font-size: 1.2rem; color: #455a64; margin-bottom: 28px; }

/* ===== PLEDGE ===== */
.pledge-container { max-width: 700px; text-align: center; }
.pledge-container p { font-size: 1.1rem; color: rgba(255,255,255,0.85); margin-bottom: 32px; }
.pledge-card { background: rgba(255,255,255,0.1); border-radius: var(--radius-lg); padding: 36px; backdrop-filter: blur(12px); border: 2px solid rgba(255,255,255,0.25); box-shadow: var(--shadow-lg); }

.pledge-header {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.name-input {
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 10px;
  padding: 6px 14px;
  color: white;
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  width: 150px;
  outline: none;
  text-align: center;
}
.name-input::placeholder { color: rgba(255,255,255,0.6); }

.pledge-textarea {
  width: 100%;
  min-height: 120px;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 14px;
  padding: 16px;
  color: white;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  resize: vertical;
  outline: none;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}
.pledge-textarea::placeholder { color: rgba(255,255,255,0.55); }
.pledge-textarea:focus { border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.2); }

.btn-pledge {
  background: linear-gradient(135deg, var(--sun-yellow), #ffab00);
  color: var(--ocean-deep);
  border: none;
  border-radius: 50px;
  padding: 16px 40px;
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255,214,0,0.4);
  transition: transform 0.2s;
}
.btn-pledge:hover { transform: scale(1.05); }

.pledge-result {
  margin-top: 24px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius);
  padding: 24px;
  border: 2px solid rgba(255,255,255,0.4);
}
.pledge-result h3 { font-family: 'Baloo 2', sans-serif; font-size: 1.4rem; color: var(--sun-yellow); margin-bottom: 8px; }
.pledge-result p { color: rgba(255,255,255,0.9); font-size: 1.05rem; line-height: 1.6; }

/* ===== FOOTER ===== */
.footer { background: var(--ocean-deep); color: white; padding: 48px 24px 32px; text-align: center; position: relative; }
.wave-footer {
  position: absolute;
  top: -2px; left: 0; right: 0; height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath fill='%230a2d5c' d='M0,30 C360,60 720,0 1080,30 C1260,45 1360,38 1440,30 L1440,60 L0,60 Z'/%3E%3C/svg%3E") center top no-repeat;
  background-size: cover;
}
.footer-emoji { font-size: 1.5rem; margin-bottom: 16px; letter-spacing: 4px; }
.footer p { font-size: 1rem; margin-bottom: 6px; color: rgba(255,255,255,0.85); }
.footer-small { font-size: 0.8rem; color: rgba(255,255,255,0.5); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero { padding: 60px 16px 100px; min-height: auto; }
  .memory-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .card-front, .card-back { font-size: 1.4rem; }
  .danger-layout { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .animal-grid { grid-template-columns: repeat(2, 1fr); }
  .importance-grid { grid-template-columns: repeat(2, 1fr); }
  .game-info-bar { justify-content: center; }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
