.jungle-wrap { padding: 0; overflow: hidden; }
.jungle { position: relative; height: 180px; background: linear-gradient(180deg,#b9e7ff 0,#e7fff2 100%); overflow: hidden; }
.jlayer { position: absolute; inset: 0; background-repeat: repeat-x; background-size: cover; opacity: .95; }
.jlayer.sky { background-image: none; }
.jlayer.hills { opacity: .7; }
.jlayer.trees { opacity: .9; }
.jlayer.grass { opacity: 1; }
.jungle .jlayer { animation: scrollX 60s linear infinite; }
@keyframes scrollX { 0% { background-position: 0 0; } 100% { background-position: 1000px 0; } }

/* Big moving animals (background herd) */
.herd { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.beast { position: absolute; bottom: 20px; width: 160px; height: 160px; background-size: contain; background-repeat: no-repeat; background-position: center bottom; filter: drop-shadow(0 12px 18px rgba(0,0,0,.18)); opacity: .95; }
.beast.left { animation: roamL 22s linear infinite; left: -200px; }
.beast.right { animation: roamR 24s linear infinite; right: -220px; transform: scaleX(-1); }
@keyframes roamL { 0% { left: -220px; } 100% { left: calc(100% + 220px); } }
@keyframes roamR { 0% { right: -240px; } 100% { right: calc(100% + 240px); } }
:root {
	--bg: #f7fbff;
	--primary: #6b8afd;
	--primary-dark: #4d69da;
	--accent: #ffcb6b;
	--success: #37c871;
	--danger: #ff6b6b;
	--ink: #2c2c3a;
	--card: #ffffff;
	--shadow: 0 10px 30px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
	margin: 0;
	font-family: 'Baloo 2', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Comic Neue', sans-serif;
	color: var(--ink);
	/* Background image with soft gradient overlay */
	background:
		linear-gradient(180deg, rgba(234,243,255,.12) 0%, rgba(252,252,252,.12) 120%),
		url('assets/images/animals/bg.png');
	background-size: cover;
	background-position: center top;
	background-attachment: scroll;
	background-repeat: no-repeat;
}

/* Fullscreen background video */
.bg-video { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; object-fit: cover; z-index: -2; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
	.bg-video { display: none; }
}

/* Overlay: improves contrast over moving backgrounds */
.bg-overlay { position: fixed; inset: 0; z-index: -1; pointer-events: none; background:
	linear-gradient(180deg, rgba(255,255,255,.20) 0%, rgba(255,255,255,.10) 40%, rgba(255,255,255,.20) 100%),
	radial-gradient(ellipse at 50% 120%, rgba(0,0,0,.18), transparent 50%),
	radial-gradient(ellipse at -20% -20%, rgba(255,255,255,.25), transparent 40%),
	radial-gradient(ellipse at 120% -20%, rgba(255,255,255,.25), transparent 40%);
}
/* Stronger blur on setup and quiz pages for readability */
body[data-page="setup"] .bg-overlay,
body[data-page="quiz"] .bg-overlay {
	backdrop-filter: blur(8px) saturate(1.05);
	background:
		linear-gradient(180deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,.16) 50%, rgba(255,255,255,.28) 100%),
		radial-gradient(ellipse at 50% 120%, rgba(0,0,0,.22), transparent 55%),
		radial-gradient(ellipse at -20% -20%, rgba(255,255,255,.28), transparent 42%),
		radial-gradient(ellipse at 120% -20%, rgba(255,255,255,.28), transparent 42%);
}

/* Improve background fit across aspect ratios */
@media (min-aspect-ratio: 16/9) {
	body {
		background-position: center;
	}
}
@media (max-aspect-ratio: 3/4) {
	body {
		background-position: center top;
	}
}

.site-header { position: relative; overflow: hidden; padding: 32px 16px 16px; text-align: center; }
.title { margin: 0; font-weight: 800; font-size: 42px; color: var(--primary-dark); letter-spacing: 0.5px; }
/* Gradient text and soft rounded background for titles on all pages */
.site-header .title {
    background: linear-gradient(90deg, #ff7bbd, #ffb36b, #ffe36b, #8be67b, #6bd9ff, #8e8bff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 14px rgba(0,0,0,.18);
    position: relative;
    display: inline-block;
    padding: 6px 14px;
}
/* Soft rounded translucent backdrop */
.site-header .title::before {
    content: '';
    position: absolute;
    inset: -6px -12px;
    background: linear-gradient(135deg, rgba(255,255,255,.88), rgba(255,245,215,.78));
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
    z-index: -1;
    backdrop-filter: blur(6px) saturate(1.05);
}
.subtitle { margin: 6px 0 0; color: #3a2a44;
	opacity: 0.9; font-weight: 700; position: relative; display: inline-block; padding: 6px 12px; border-radius: 12px; background: linear-gradient(135deg, rgba(255,255,255,.65), rgba(255,255,255,.35)); box-shadow: 0 6px 16px rgba(0,0,0,.08); }

.sky { height: 150px; position: absolute; inset: 0 0 auto 0; pointer-events: none; }
.sun { position: absolute; right: 40px; top: 30px; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff6b5, #ffd34e);
	box-shadow: 0 0 60px rgba(255, 204, 0, 0.45); animation: floatY 6s ease-in-out infinite; }
.cloud { position: absolute; background: #fff; border-radius: 50px; box-shadow: var(--shadow); opacity: 0.9; }
.cloud-1 { width: 180px; height: 60px; left: -200px; top: 40px; animation: cloudMove 40s linear infinite; }
.cloud-2 { width: 140px; height: 50px; left: -160px; top: 90px; animation: cloudMove 55s linear infinite 7s; }
.cloud-3 { width: 200px; height: 70px; left: -210px; top: 20px; animation: cloudMove 70s linear infinite 12s; }
@keyframes cloudMove { 0% { transform: translateX(0); } 100% { transform: translateX(140vw); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes bounce {
	0%, 100% { transform: translateY(0) scale(1); }
	50% { transform: translateY(-10px) scale(1.03); }
}
@keyframes wiggle {
	0%, 100% { transform: rotate(0deg); }
	25% { transform: rotate(6deg); }
	75% { transform: rotate(-6deg); }
}

.container { max-width: 960px; margin: 0 auto; padding: 16px; }
.screen { display: none; }
.screen.active { display: block; }

.card {
	background: rgba(255,255,255,.18);
	border-radius: 18px;
	box-shadow: 0 12px 30px rgba(0,0,0,.10);
	padding: 20px;
	margin: 16px auto;
	max-width: 760px;
	backdrop-filter: blur(6px);
	border: 1px solid rgba(255,255,255,.35);
}

.btn { border: 0; background: linear-gradient(135deg, #6b8afd, #71e39a); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 800; cursor: pointer; transition: transform .12s ease, filter .2s ease; position: relative; overflow: hidden; }
.btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.18), rgba(255,255,255,0) 40%, rgba(255,255,255,.18)); transform: translateX(-100%); transition: transform .6s ease; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:hover::after { transform: translateX(100%); }
.btn:active { transform: translateY(0); }
.btn-lg { font-size: 20px; padding: 14px 22px; }
.btn-secondary { background: #e3e8ff; color: var(--primary-dark); }
.btn-secondary:hover { background: #d6deff; }
.btn-back { background: #ffe6a8; color: #975a00; }
.btn-back:hover { background: #ffd978; }

.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

.subject-grid { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 12px; }
@media (max-width: 720px) { .subject-grid { grid-template-columns: repeat(2, 1fr); } }
.subject-pill { background: linear-gradient(180deg, #fff6fb, #ffe9f3); color: #c2185b; border: 2px dashed #ffb7d5; padding: 14px; border-radius: 18px; font-weight: 900; cursor: pointer; transition: transform .12s ease, box-shadow .2s ease; box-shadow: 0 8px 18px rgba(255, 150, 200, .18); }
.subject-pill:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(255, 150, 200, .26); }
.subject-pill:focus { outline: none; box-shadow: 0 0 0 3px rgba(255, 150, 200, .35); }
/* Disabled state for subject buttons */
.subject-pill[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none; }

.hidden { display: none; }

.mascot-row { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 8px 0 16px; }
.mascot { width: 72px; height: 72px; display: grid; place-items: center; font-size: 40px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.1)); animation: floatY 5s ease-in-out infinite; }
.mascot.bounce { animation: bounce 1.6s ease-in-out infinite; }
.mascot.wiggle { animation: wiggle 1.5s ease-in-out infinite; }
.mascot-svg { width: 72px; height: 72px; }
.m-face { fill: #ffe088; stroke: #f0b400; stroke-width: 3; }
.m-eye { fill: #333; }
.m-smile { fill: none; stroke: #cc5500; stroke-width: 4; stroke-linecap: round; }
/* Mascot eyes blink */
.mascot-svg .m-eye { transform-origin: center; animation: blink 4s infinite; }
.mascot-svg .m-eye:nth-of-type(2) { animation-delay: .2s; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.05); } }

.quiz-header { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.badge { background: linear-gradient(135deg, #ecf2ff, #e5ffe9); color: #2f3fb0; padding: 10px 14px; border-radius: 999px; font-weight: 900; box-shadow: 0 6px 16px rgba(0,0,0,.08); border: 1px solid rgba(255,255,255,.6); }

.quiz-card { position: relative; text-align: center; border: 4px solid #ff8ba0; border-radius: 20px; background: #fff; }
.quiz-card::before { content: '?'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 240px; line-height: 1; color: rgba(255, 139, 160, .18); font-weight: 900; pointer-events: none; }
.quiz-card-ribbon { position: absolute; left: 16px; top: -14px; background: #ff8ba0; color: #fff; font-weight: 900; padding: 6px 12px; border-radius: 10px; box-shadow: 0 6px 14px rgba(0,0,0,.12); letter-spacing: .5px; }
.quiz-card { animation: floatY 7s ease-in-out infinite; }
.question-number { font-weight: 900; color: #5e6dff; margin-bottom: 6px; text-shadow: 0 2px 10px rgba(0,0,0,.08); }
.question-text-wrapper { display: flex; flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 8px 0 10px; position: relative; width: 100%; }
.question-text { font-size: 22px; font-weight: 900; padding: 12px 16px; border-radius: 14px; background-color: #667eea; background: linear-gradient(135deg, #667eea, #764ba2); color: #ffffff; box-shadow: 0 8px 18px rgba(0,0,0,.15); flex: 1; text-shadow: 0 2px 4px rgba(0,0,0,.2); min-width: 0; order: 1; }
.question-image-right { width: 60px; height: 60px; min-width: 60px; max-width: 60px; flex-shrink: 0; position: relative; align-self: flex-start; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.85)); box-shadow: 0 6px 16px rgba(0,0,0,.12); display: flex; align-items: center; justify-content: center; order: 2; margin-left: auto; }
.question-image-right img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
@keyframes floatO {
	0%, 100% { 
		transform: translateY(0) translateX(0) rotate(0deg); 
	}
	25% { 
		transform: translateY(-15px) translateX(5px) rotate(2deg); 
	}
	50% { 
		transform: translateY(-10px) translateX(-5px) rotate(-2deg); 
	}
	75% { 
		transform: translateY(-15px) translateX(5px) rotate(2deg); 
	}
}
.options { display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap: 12px; margin-top: 6px; }
@media (max-width: 640px) { .options { grid-template-columns: 1fr; } }
.option {
	background: #fff;
	border: 3px solid #e6eaff;
	border-radius: 16px;
	padding: 14px 16px;
	font-weight: 800;
	cursor: pointer;
	transition: transform .08s ease, border-color .2s ease, box-shadow .2s ease;
	box-shadow: var(--shadow);
}
.option .option-caption { margin-top: 4px; font-weight: 900; }
.option .option-img { max-width: 100%; max-height: 120px; }
.option:hover { transform: translateY(-2px); border-color: #cfd7ff; }
.option.correct { border-color: var(--success); box-shadow: 0 0 0 3px rgba(55, 200, 113, .2); }
.option.wrong { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 107, 107, .2); }

.progress { height: 10px; border-radius: 999px; background: #ebefff; overflow: hidden; margin: 10px auto; max-width: 760px; }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, #71e39a, #6b8afd); transition: width .3s ease; }

.result-card { text-align: center; }

.confetti { position: fixed; inset: 0; pointer-events: none; }

/* Celebration modal (works with Bootstrap modal) */
.celebrate-content { position: relative; background: linear-gradient(135deg, #ffffff, #fff4d6); border: 4px solid #71e39a; border-radius: 18px; padding: 18px 22px; box-shadow: 0 18px 40px rgba(0,0,0,.18); min-width: 260px; text-align: center; overflow: hidden; }
.celebrate-text { font-weight: 900; font-size: 24px; color: #2c5e2f; text-shadow: 0 2px 10px rgba(0,0,0,.08); animation: popIn .35s ease-out; }
.poppers { position: absolute; inset: 0; pointer-events: none; }
.popper { position: absolute; width: 10px; height: 10px; background: currentColor; border-radius: 2px; opacity: .95; transform: translate(-50%, -50%) scale(0); animation: popBurst .9s ease-out forwards; }
.popper.p1 { left: 18%; top: 70%; color: #ff7bbd; animation-delay: .0s; }
.popper.p2 { left: 50%; top: 80%; color: #6bd9ff; animation-delay: .05s; }
.popper.p3 { left: 82%; top: 72%; color: #8be67b; animation-delay: .1s; }
@keyframes popBurst {
	0% { transform: translate(-50%, -50%) scale(0) rotate(0); filter: brightness(1); }
	40% { transform: translate(-50%, -140%) scale(1.6) rotate(20deg); }
	70% { transform: translate(-50%, -200%) scale(1) rotate(-18deg); }
	100% { transform: translate(-50%, -260%) scale(.9) rotate(0); opacity: 0; }
}

/* Gentle floating particles for a magical feel */
.particles { position: fixed; inset: 0; pointer-events: none; opacity: .55; background-repeat: no-repeat; }
.particles { 
	background-image:
		radial-gradient(circle at 10% 20%, rgba(255,255,255,.9) 0 3px, transparent 4px),
		radial-gradient(circle at 30% 80%, rgba(255,255,255,.7) 0 2px, transparent 3px),
		radial-gradient(circle at 70% 30%, rgba(255,255,255,.85) 0 3px, transparent 4px),
		radial-gradient(circle at 85% 60%, rgba(255,255,255,.8) 0 2px, transparent 3px),
		radial-gradient(circle at 50% 50%, rgba(255,255,255,.75) 0 2px, transparent 3px),
		radial-gradient(circle at 20% 60%, rgba(255,255,255,.8) 0 2px, transparent 3px);
	animation: particlesDrift 20s linear infinite;
}
@keyframes particlesDrift {
	0% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
	100% { background-position: 200px -150px, -160px -120px, 140px 110px, -200px 160px, 120px -90px, -130px 140px; }
}

/* Forms */
.form-row { display: flex; align-items: center; gap: 12px; margin: 10px 0; justify-content: center; }
label { font-weight: 800; }
.input { padding: 10px 12px; border-radius: 12px; border: 2px dashed #cfd7ff; background: #fff; font-weight: 700; }

/* Hero */
.hero { position: relative; background: transparent; border-radius: 20px; padding: 18px 16px 16px; text-align: center; margin-bottom: 10px; box-shadow: none; overflow: hidden; }
.rainbow-frame { background:
	conic-gradient(from 0deg, #ff7676, #ffb36b, #ffe36b, #8be67b, #6bd9ff, #8e8bff, #ff8bf1, #ff7676);
	padding: 6px; border-radius: 22px;
}
.rainbow-frame > .hero-title, .rainbow-frame > .hero-letters, .rainbow-frame > .hero-sub { position: relative; z-index: 1; }
.hero .dots { position: absolute; inset: 6px; border-radius: 16px; border: 0; pointer-events: none; }
.hero-title { margin: 8px 0 4px; font-size: 34px; font-weight: 900; color: #1e1e2d; text-shadow: 0 6px 24px rgba(0,0,0,.18), 0 2px 0 rgba(255,255,255,.6); }
.hero-sub { margin: 6px 0 8px; font-weight: 800; color: #2e2e44; opacity: .85; }
.hero-letters { display: flex; gap: 10px; justify-content: center; align-items: end; margin: 6px 0; }
.rainbow-arc-svg { width: min(720px, 92%); height: auto; display: block; margin: 8px auto 0; filter: drop-shadow(0 8px 18px rgba(0,0,0,.12)); }
.hill { position: relative; height: 48px; margin: 10px auto 0; max-width: 760px; border-radius: 0 0 18px 18px; }
.hill::before { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: -10px; width: 90%; height: 70px; background: radial-gradient(ellipse at 50% -10%, rgba(0,0,0,.18), transparent 60%), linear-gradient(180deg, #e3f7e7, #bfeec9); border-radius: 50%/100% 100% 0 0; filter: blur(.4px); }

/* Big cute animals row */
.big-animals { display: flex; gap: 16px; justify-content: center; align-items: end; margin: 10px 0 0; }
.big-animal { width: clamp(90px, 18vw, 140px); height: clamp(90px, 18vw, 140px); filter: drop-shadow(0 10px 18px rgba(0,0,0,.15)); animation: floatY 6s ease-in-out infinite; }
.big-animal.a2 { animation-delay: .2s; }
.big-animal.a3 { animation-delay: .4s; }
.big-animal.a4 { animation-delay: .6s; }
.letter { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; font-size: 32px; font-weight: 900; color: #fff; text-transform: lowercase; box-shadow: var(--shadow); animation: bounce 1.8s ease-in-out infinite; }
.letter.l1 { background: #ff7bbd; }
.letter.l2 { background: #6bd9ff; animation-delay: .2s; }
.letter.l3 { background: #8be67b; animation-delay: .4s; }
.letter.l4 { background: #ffc36b; animation-delay: .6s; }

/* Quiz right container */
.quiz-right { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px; margin-top: 12px; }

/* Question media */
.question-media { min-height: 200px; width: 100%; max-width: 500px; margin: 12px auto; display: flex; align-items: center; justify-content: center; position: relative; }
.question-media img { max-width: 100%; max-height: 300px; width: auto; height: auto; display: block; object-fit: contain; border-radius: 12px; }
.question-media > div { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: nowrap; width: 100%; overflow-x: auto; }

/* Buddy */
.buddy { line-height: 1; margin: 12px auto 14px; width: 220px; height: 220px; display: grid; place-items: center; border-radius: 16px; background: #fff8e6; box-shadow: var(--shadow); overflow: hidden; }
.buddy img { width: 100%; height: 100%; object-fit: contain; display: block; image-rendering: auto; }
.buddy img[src*="happy.gif"], .buddy img[src*="better luck"] { image-rendering: auto; }
.buddy.talk { animation: wiggle 0.6s ease-in-out infinite; }
.buddy.happy { background: #e9ffef; }
.buddy.sad { background: #ffe9e9; }
.gif-icon { width: 22px; height: 22px; vertical-align: -4px; }

/* Cartoon parade */
.parade { position: fixed; left: 0; right: 0; bottom: 6px; pointer-events: none; height: 48px; display: flex; gap: 18px; align-items: flex-end; justify-content: center; opacity: .9; }
.parade .actor { filter: drop-shadow(0 6px 8px rgba(0,0,0,.15)); animation: moveAcross 22s linear infinite; }
.animal { width: 48px; height: 48px; }

/* Sparkles in hero */
.sparkles { position: absolute; inset: 8px; border-radius: 14px; pointer-events: none; background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.9) 0 6px, transparent 7px), radial-gradient(circle at 80% 60%, rgba(255,255,255,.9) 0 5px, transparent 6px), radial-gradient(circle at 40% 80%, rgba(255,255,255,.9) 0 4px, transparent 5px), radial-gradient(circle at 60% 20%, rgba(255,255,255,.85) 0 4px, transparent 6px), radial-gradient(circle at 30% 70%, rgba(255,255,255,.85) 0 3px, transparent 5px); background-size: 200px 120px, 180px 140px, 220px 160px, 160px 120px, 140px 120px; animation: sparkleShift 6s linear infinite; }
@keyframes sparkleShift { 0% { background-position: 0 0, 0 0, 0 0; } 100% { background-position: 200px 120px, -180px -140px, 220px -160px; } }

/* Pop in on load */
.pop-in { animation: popIn .6s ease-out; }
@keyframes popIn { 0% { transform: scale(.94); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* Sticker stage (uses images/ PNGs) */
.sticker-stage { position: relative; height: 230px; overflow: hidden; display: grid; place-items: end center; background: linear-gradient(180deg, #fff 0, #f7fbff 60%, #e3f7e7 60%, #c9efcf 100%); }
.sticker-stage::before { content: ''; position: absolute; inset: auto 0 0 0; height: 56px; background: radial-gradient(ellipse at 50% 0, rgba(0,0,0,.1), transparent 60%); opacity: .4; pointer-events: none; }
.sticker { position: absolute; bottom: 12px; max-height: 140px; max-width: 140px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.14)); transform-origin: 50% 100%; animation: sway 4.5s ease-in-out infinite; transition: transform .2s ease; }
.sticker:hover { transform: scale(1.04) translateY(-2px); }
@keyframes sway { 0%, 100% { transform: rotate(-2deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-6px); } }
.parade .a1 { animation-duration: 24s; }
.parade .a2 { animation-duration: 18s; }
.parade .a3 { animation-duration: 26s; }
.parade .a4 { animation-duration: 16s; }
.parade .a5 { animation-duration: 20s; }
.parade .a6 { animation-duration: 28s; }
.parade .a7 { animation-duration: 22s; }
.parade .a8 { animation-duration: 14s; }
@keyframes moveAcross {
	0% { transform: translateX(-55vw) translateY(0) rotate(0deg); }
	25% { transform: translateX(-10vw) translateY(-2px) rotate(3deg); }
	50% { transform: translateX(20vw) translateY(0) rotate(-3deg); }
	75% { transform: translateX(55vw) translateY(-3px) rotate(2deg); }
	100% { transform: translateX(95vw) translateY(0) rotate(0deg); }
}

/* Buddy dance */
.dance { animation: dance 0.8s ease-in-out 2; }
@keyframes dance {
	0%, 100% { transform: translateY(0) rotate(0); }
	25% { transform: translateY(-6px) rotate(6deg); }
	50% { transform: translateY(0) rotate(-6deg); }
	75% { transform: translateY(-6px) rotate(6deg); }
}


/* Landscape-optimized layout: bigger card and image */
@media (orientation: landscape) {
    .card.quiz-card { display: grid; grid-template-columns: 1fr auto; align-items: stretch; gap: 16px; text-align: left; }
    .quiz-left { display: grid; grid-template-rows: auto auto 1fr; align-content: start; gap: 10px; }
    .quiz-right { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px; min-height: 320px; }
    .question-media { min-height: 200px; max-width: 360px; }
    .question-media img { max-height: 60vh; }
    .buddy { width: auto; height: 100%; max-height: 70vh; margin: 0; border-radius: 16px; }
    .buddy img { width: 100%; height: 100%; object-fit: contain; }
    .question-text { font-size: 26px; }
    .question-image-right { width: 70px; height: 70px; min-width: 70px; max-width: 70px; flex-shrink: 0; order: 2; }
    .options { grid-template-columns: repeat(2, minmax(200px, 1fr)); }
}
