/* ===========================
   GLOBAL & RESETS
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  overflow-x: hidden;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ===========================
   NAVBAR
   =========================== */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===========================
   HERO
   =========================== */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-gradient-text {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 50%, #fda4af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Wave Text Effect */
#hero-title {
  overflow: visible;
}

.wave-char {
  display: inline-block;
  transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: default;
  will-change: transform;
}

.hero-gradient-char {
  color: #ef4444;
  background: linear-gradient(135deg, #ef4444, #f87171, #fda4af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Quiz CTA Button */
.btn-quiz-cta {
  position: relative;
  overflow: hidden;
  z-index: 0;
  transition: color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.btn-quiz-cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.25) 0%, rgba(248, 113, 113, 0.15) 50%, rgba(251, 113, 133, 0.08) 100%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.btn-quiz-cta:hover::before {
  width: 400px;
  height: 400px;
}

.btn-quiz-cta:hover {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}

.scroll-indicator {
  animation: fadeInUp 1s ease 1.5s both;
}

/* Desktop: show mouse, hide hand */
.scroll-mouse { display: flex !important; }
.scroll-hand { display: none !important; }

/* Tablet & mobile: hide mouse, show hand */
@media (max-width: 1024px) {
  .scroll-mouse { display: none !important; }
  .scroll-hand { display: flex !important; flex-direction: column; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ===========================
   MARQUEE / INFINITE SCROLL
   =========================== */
/* ===========================
   FLOATING 3D BOX IMAGES (About)
   =========================== */
.about-section {
  position: relative;
  perspective: 900px;
  min-height: 75vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.floating-img {
  position: absolute;
  z-index: 10;
  cursor: pointer;
  transition: transform 0.5s ease;
  will-change: transform;
}

/* === 3D Box Structure === */
.box3d {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

/* All faces share base style */
.box3d-face {
  position: absolute;
  backface-visibility: hidden;
}

/* Front face — the image */
.box3d-front {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 2;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.box3d-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.floating-img:hover .box3d-front img {
  transform: scale(1.06);
}

/* Right side face — depth illusion */
.box3d-right {
  width: 22px;
  height: 100%;
  right: -22px;
  top: 0;
  background: linear-gradient(to right, #3a2028, #2a1620, #1a0f12);
  border-radius: 0 8px 8px 0;
  transform: rotateY(90deg);
  transform-origin: left center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: none;
}

/* Bottom face — depth illusion */
.box3d-bottom {
  width: 100%;
  height: 22px;
  bottom: -22px;
  left: 0;
  background: linear-gradient(to bottom, #3a2028, #2a1620, #1a0f12);
  border-radius: 0 0 8px 8px;
  transform: rotateX(-90deg);
  transform-origin: top center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: none;
}

/* Hover — bring to front */
.floating-img:hover {
  z-index: 30;
}

/* ==============================================
   Zigzag layout: far & near alternate vertically
   so no two images share the same vertical zone.
   LEFT  = right: calc(50% + ...)
   RIGHT = left:  calc(50% + ...)
   ============================================== */

/* ---- LEFT SIDE — zigzag: FAR(560) → NEAR(400) alternating ---- */

/* L1: hidden on desktop */
.floating-img--1 {
  display: none;
}

/* L2: top, NEAR */
.floating-img--7 {
  width: 135px;
  height: 135px;
  top: 16%;
  right: calc(50% + 410px);
  animation: floatFast 5.8s ease-in-out infinite;
}
.floating-img--7 .box3d {
  transform: rotateX(-12deg) rotateY(18deg);
}
.floating-img--7:hover .box3d {
  transform: rotateX(-3deg) rotateY(5deg) scale(1.1);
}

/* L3: upper-mid, FAR */
.floating-img--9 {
  width: 145px;
  height: 120px;
  top: 28%;
  right: calc(50% + 550px);
  animation: floatSlow 6.8s ease-in-out infinite;
}
.floating-img--9 .box3d {
  transform: rotateX(-8deg) rotateY(26deg);
}
.floating-img--9:hover .box3d {
  transform: rotateX(-2deg) rotateY(8deg) scale(1.08);
}

/* L4: mid, NEAR */
.floating-img--5 {
  width: 130px;
  height: 130px;
  top: 42%;
  right: calc(50% + 420px);
  animation: floatMedium 6.5s ease-in-out infinite;
}
.floating-img--5 .box3d {
  transform: rotateX(-7deg) rotateY(30deg);
}
.floating-img--5:hover .box3d {
  transform: rotateX(-2deg) rotateY(10deg) scale(1.1);
}

/* L5: lower, FAR */
.floating-img--11 {
  width: 140px;
  height: 115px;
  top: 56%;
  right: calc(50% + 540px);
  animation: floatFast 6.2s ease-in-out infinite reverse;
}
.floating-img--11 .box3d {
  transform: rotateX(10deg) rotateY(20deg);
}
.floating-img--11:hover .box3d {
  transform: rotateX(3deg) rotateY(6deg) scale(1.08);
}
.floating-img--11 .box3d-bottom {
  bottom: auto;
  top: -22px;
  transform: rotateX(90deg);
  transform-origin: bottom center;
  background: linear-gradient(to top, #2a1a1e, #1a0f12);
}

/* L6: bottom, NEAR */
.floating-img--3 {
  width: 140px;
  height: 140px;
  top: 70%;
  right: calc(50% + 410px);
  animation: floatFast 5s ease-in-out infinite;
}
.floating-img--3 .box3d {
  transform: rotateX(14deg) rotateY(20deg);
}
.floating-img--3:hover .box3d {
  transform: rotateX(4deg) rotateY(6deg) scale(1.08);
}
.floating-img--3 .box3d-bottom {
  bottom: auto;
  top: -22px;
  transform: rotateX(90deg);
  transform-origin: bottom center;
  background: linear-gradient(to top, #2a1a1e, #1a0f12);
}

/* ---- RIGHT SIDE — zigzag: FAR(560) → NEAR(400) alternating ---- */

/* R1: hidden on desktop */
.floating-img--2 {
  display: none;
}
.floating-img--2 .box3d {
  transform: rotateX(8deg) rotateY(-26deg);
}
.floating-img--2:hover .box3d {
  transform: rotateX(2deg) rotateY(-8deg) scale(1.08);
}
.floating-img--2 .box3d-right {
  right: auto;
  left: -22px;
  transform: rotateY(-90deg);
  transform-origin: right center;
  background: linear-gradient(to left, #2a1a1e, #1a0f12);
}

/* R2: top, NEAR */
.floating-img--10 {
  width: 140px;
  height: 120px;
  top: 16%;
  left: calc(50% + 410px);
  animation: floatMedium 7.5s ease-in-out infinite reverse;
}
.floating-img--10 .box3d {
  transform: rotateX(-8deg) rotateY(-22deg);
}
.floating-img--10:hover .box3d {
  transform: rotateX(-2deg) rotateY(-6deg) scale(1.08);
}
.floating-img--10 .box3d-right {
  right: auto;
  left: -22px;
  transform: rotateY(-90deg);
  transform-origin: right center;
  background: linear-gradient(to left, #2a1a1e, #1a0f12);
}

/* R3: upper-mid, FAR */
.floating-img--6 {
  width: 140px;
  height: 140px;
  top: 28%;
  left: calc(50% + 560px);
  animation: floatFast 5.5s ease-in-out infinite reverse;
}
.floating-img--6 .box3d {
  transform: rotateX(-6deg) rotateY(-30deg);
}
.floating-img--6:hover .box3d {
  transform: rotateX(-2deg) rotateY(-10deg) scale(1.1);
}
.floating-img--6 .box3d-right {
  right: auto;
  left: -22px;
  transform: rotateY(-90deg);
  transform-origin: right center;
  background: linear-gradient(to left, #2a1a1e, #1a0f12);
}

/* R4: mid, NEAR */
.floating-img--12 {
  width: 135px;
  height: 115px;
  top: 42%;
  left: calc(50% + 420px);
  animation: floatSlow 7s ease-in-out infinite;
}
.floating-img--12 .box3d {
  transform: rotateX(8deg) rotateY(-22deg);
}
.floating-img--12:hover .box3d {
  transform: rotateX(2deg) rotateY(-6deg) scale(1.08);
}
.floating-img--12 .box3d-right {
  right: auto;
  left: -22px;
  transform: rotateY(-90deg);
  transform-origin: right center;
  background: linear-gradient(to left, #2a1a1e, #1a0f12);
}
.floating-img--12 .box3d-bottom {
  bottom: auto;
  top: -22px;
  transform: rotateX(90deg);
  transform-origin: bottom center;
  background: linear-gradient(to top, #2a1a1e, #1a0f12);
}

/* R5: lower, FAR */
.floating-img--8 {
  width: 145px;
  height: 120px;
  top: 56%;
  left: calc(50% + 540px);
  animation: floatSlow 7.2s ease-in-out infinite;
}
.floating-img--8 .box3d {
  transform: rotateX(10deg) rotateY(-24deg);
}
.floating-img--8:hover .box3d {
  transform: rotateX(3deg) rotateY(-7deg) scale(1.08);
}
.floating-img--8 .box3d-right {
  right: auto;
  left: -22px;
  transform: rotateY(-90deg);
  transform-origin: right center;
  background: linear-gradient(to left, #2a1a1e, #1a0f12);
}

/* R6: bottom, NEAR */
.floating-img--4 {
  width: 150px;
  height: 125px;
  top: 70%;
  left: calc(50% + 410px);
  animation: floatSlow 8s ease-in-out infinite reverse;
}
.floating-img--4 .box3d {
  transform: rotateX(12deg) rotateY(-22deg);
}
.floating-img--4:hover .box3d {
  transform: rotateX(3deg) rotateY(-6deg) scale(1.08);
}
.floating-img--4 .box3d-right {
  right: auto;
  left: -22px;
  transform: rotateY(-90deg);
  transform-origin: right center;
  background: linear-gradient(to left, #2a1a1e, #1a0f12);
}
.floating-img--4 .box3d-bottom {
  bottom: auto;
  top: -22px;
  transform: rotateX(90deg);
  transform-origin: bottom center;
  background: linear-gradient(to top, #2a1a1e, #1a0f12);
}

/* Float animations */
@keyframes floatSlow {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -16px; }
}
@keyframes floatMedium {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}
@keyframes floatFast {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

/* Responsive — 1280px desktop small */
@media (max-width: 1280px) {
  /* --1 and --2 still hidden on small desktop */
  .floating-img--7  { width: 95px;  height: 95px;  right: calc(50% + 270px); }
  .floating-img--9  { width: 105px; height: 90px;  right: calc(50% + 380px); }
  .floating-img--5  { width: 100px; height: 100px; right: calc(50% + 280px); }
  .floating-img--11 { width: 100px; height: 85px;  right: calc(50% + 370px); }
  .floating-img--3  { width: 105px; height: 105px; right: calc(50% + 270px); }
  .floating-img--10 { width: 100px; height: 90px;  left: calc(50% + 270px); }
  .floating-img--6  { width: 105px; height: 105px; left: calc(50% + 390px); }
  .floating-img--12 { width: 100px; height: 85px;  left: calc(50% + 280px); }
  .floating-img--8  { width: 105px; height: 90px;  left: calc(50% + 370px); }
  .floating-img--4  { width: 110px; height: 95px;  left: calc(50% + 270px); }
}

/* Responsive — tablet & mobile: hide all floating images */
@media (max-width: 1024px) {
  .about-section { min-height: auto; }
  .floating-img { display: none; }
}

/* ===========================
   BERRY CARDS
   =========================== */
.berry-card {
  height: 100%;
}

.berry-card-inner {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  height: 100%;
  display: flex;
  flex-direction: column;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.berry-card-inner > .p-6,
.berry-card-inner > div:last-child:not(.berry-card-img-wrapper) {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.berry-card-inner > div:last-child:not(.berry-card-img-wrapper) > p {
  flex: 1;
}

.berry-card:hover .berry-card-inner {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.5);
}

.berry-card-img-wrapper {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.berry-card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02) translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.berry-card:hover .berry-card-img {
  transform: scale(1.08) translateZ(0);
}

.berry-card-overlay {
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}

.berry-card-img-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}

.berry-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  backdrop-filter: blur(8px);
}

/* ===========================
   MODAL
   =========================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  will-change: opacity;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay.hidden {
  display: none;
}

.modal-container {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  transform: translateY(10px);
  transition: transform 0.2s ease;
  will-change: transform;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-container::-webkit-scrollbar {
  width: 4px;
}

.modal-container::-webkit-scrollbar-track {
  margin-top: 20px;
  margin-bottom: 20px;
}

.modal-container::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 2px;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal-img-wrapper {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-img-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, #141414, transparent);
}

/* Highlight Cards Glow */
.highlight-card {
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.highlight-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.03);
}

.nutrition-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.nutrition-value {
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.nutrition-label {
  font-size: 11px;
  color: #737373;
  margin-top: 2px;
}

.fact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  font-size: 14px;
  color: #d4d4d4;
  line-height: 1.6;
}

.fact-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: #ef4444;
}

/* ===========================
   NUTRITION DROPDOWN
   =========================== */
.nutrisi-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nutrisi-header {
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.nutrisi-row:hover .nutrisi-header {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.04), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.nutrisi-row.open .nutrisi-dropdown {
  max-height: 200px;
}

.nutrisi-row.open .nutrisi-chevron {
  transform: rotate(180deg);
}

.nutrisi-row.open .nutrisi-header {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.nutrisi-row.open .nutrisi-dropdown > div {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.nutrisi-extra-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  text-align: center;
}

/* Nutrition table mobile scroll indicator */
@media (max-width: 640px) {
  .nutrisi-header {
    padding-left: 12px;
    padding-right: 12px;
  }

  .nutrisi-chevron {
    display: none;
  }
}

/* ===========================
   VIDEO SECTION
   =========================== */
.video-wrapper {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  overflow: hidden;
  padding: 6px;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 16px;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* 3D Carousel */
.video-carousel-3d {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  overflow: visible;
}

.video-slide {
  position: absolute;
  top: 0;
  left: 50%;
  width: 70%;
  height: 100%;
  transform: translateX(-50%) scale(0.85);
  opacity: 0;
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
}

.video-slide.active {
  transform: translateX(-50%) scale(1);
  opacity: 1;
  pointer-events: auto;
  z-index: 3;
}

.video-slide.prev {
  transform: translateX(-115%) scale(0.78);
  opacity: 0.5;
  pointer-events: auto;
  z-index: 2;
  cursor: pointer;
}

.video-slide.next {
  transform: translateX(15%) scale(0.78);
  opacity: 0.5;
  pointer-events: auto;
  z-index: 2;
  cursor: pointer;
}

.video-slide.prev:hover,
.video-slide.next:hover {
  opacity: 0.7;
}

.video-slide-label {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
  transition: color 0.4s ease;
}

.video-slide.active .video-slide-label {
  color: rgba(255, 255, 255, 0.9);
}

/* Disable iframe interaction on side slides */
.video-slide.prev .video-wrapper,
.video-slide.next .video-wrapper {
  pointer-events: none;
}

@media (max-width: 768px) {
  .video-slide {
    width: 85%;
  }

  .video-slide.prev {
    transform: translateX(-110%) scale(0.75);
    opacity: 0.35;
  }

  .video-slide.next {
    transform: translateX(10%) scale(0.75);
    opacity: 0.35;
  }
}

.video-dot.active {
  background: white;
  width: 24px;
  border-radius: 9999px;
}

/* ===========================
   BENEFIT DROPDOWN
   =========================== */
.benefit-card {
  align-self: start;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.04), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.benefit-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.benefit-card.open .benefit-dropdown {
  max-height: 800px;
}

.benefit-card.open .benefit-chevron {
  transform: rotate(180deg);
}

.benefit-card.open {
  background: rgba(255, 255, 255, 0.04);
}

/* ===========================
   DIFFICULTY BUTTONS
   =========================== */
.diff-btn {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ===========================
   GAME TABS
   =========================== */
.game-tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #a3a3a3;
}

.game-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #d4d4d4;
}

.game-tab.active {
  background: white;
  color: #0a0a0a;
  border-color: white;
}

/* ===========================
   TTS / CROSSWORD
   =========================== */
.tts-cell {
  width: 38px;
  height: 38px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tts-cell.black {
  background: transparent;
}

.tts-cell.white {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tts-cell.white:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.tts-cell.white.selected {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
}

.tts-cell.white.highlighted {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.tts-cell.correct {
  background: rgba(34, 197, 94, 0.15) !important;
  border-color: rgba(34, 197, 94, 0.4) !important;
}

.tts-cell.wrong {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

.tts-cell-number {
  position: absolute;
  top: 1px;
  left: 3px;
  font-size: 9px;
  font-weight: 700;
  color: #a3a3a3;
  line-height: 1;
  pointer-events: none;
}

.tts-cell input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  caret-color: #ef4444;
  padding: 0;
}

.tts-cell input::selection {
  background: rgba(239, 68, 68, 0.3);
}

.tts-row {
  display: flex;
  gap: 2px;
}

#tts-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tts-clue {
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s ease;
  cursor: pointer;
}

.tts-clue:hover {
  background: rgba(255, 255, 255, 0.04);
}

.tts-clue.active {
  background: rgba(239, 68, 68, 0.08);
  border-left: 2px solid #ef4444;
}

@media (max-width: 640px) {
  .tts-cell {
    width: 32px;
    height: 32px;
  }

  .tts-cell input {
    font-size: 14px;
  }

  .tts-cell-number {
    font-size: 7px;
  }
}

/* ===========================
   QUIZ SECTION
   =========================== */
.quiz-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #fb7185);
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.quiz-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 32px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #d4d4d4;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
}

.quiz-option:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: white;
}

.quiz-option .option-letter {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 600;
  font-size: 13px;
  color: #a3a3a3;
  transition: all 0.25s ease;
}

.quiz-option:hover:not(.disabled) .option-letter {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.quiz-option.correct {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

.quiz-option.correct .option-letter {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.quiz-option.wrong {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.quiz-option.wrong .option-letter {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.quiz-option.disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.quiz-feedback-box {
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.quiz-feedback-box.correct {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.quiz-feedback-box.wrong {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

/* Quiz Result */
.quiz-result-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  padding: 48px 32px;
}

.result-star {
  width: 32px;
  height: 32px;
  transition: all 0.3s ease;
}

.result-star.filled {
  color: #facc15;
  filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.4));
}

.result-star.empty {
  color: #404040;
}

/* ===========================
   MEMORY / FLIP CARD
   =========================== */
.memory-grid {
  display: grid;
  gap: 12px;
  justify-content: center;
}

.memory-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.memory-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.memory-card {
  aspect-ratio: 1;
  perspective: 600px;
  cursor: pointer;
}

.memory-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-style: preserve-3d;
}

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

.memory-card-front,
.memory-card-back {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.memory-card-front {
  background: rgba(255, 255, 255, 0.04);
}

.memory-card-front:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.memory-card-front i {
  color: #525252;
}

.memory-card-back {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(251, 113, 133, 0.08));
  border-color: rgba(239, 68, 68, 0.2);
  transform: rotateY(180deg);
  padding: 16px;
}

.memory-card-back img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.memory-card.matched .memory-card-back {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(74, 222, 128, 0.1));
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.15);
}

.memory-card.matched {
  animation: memory-match-pop 0.4s ease;
}

@keyframes memory-match-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.memory-card.no-match .memory-card-back {
  border-color: rgba(239, 68, 68, 0.5);
}

.memory-card.locked {
  pointer-events: none;
}

@media (max-width: 640px) {
  .memory-grid {
    gap: 8px;
  }

  .memory-card-back {
    padding: 10px;
  }
}

/* ===========================
   RESPONSIVE
   =========================== */

/* Tablet & small desktop */
@media (max-width: 768px) {
  .video-wrapper {
    border-radius: 14px;
    padding: 4px;
  }

  .video-container {
    border-radius: 12px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .quiz-card {
    padding: 20px;
  }

  .modal-img-wrapper {
    height: 180px;
  }

  .quiz-result-card {
    padding: 32px 20px;
  }

  .quiz-option {
    padding: 12px 16px;
    font-size: 14px;
    gap: 10px;
  }

  .quiz-option .option-letter {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .nutrisi-header .flex.items-center.gap-3 {
    gap: 6px;
  }

  .video-wrapper {
    border-radius: 12px;
    padding: 3px;
  }

  .video-container {
    border-radius: 10px;
  }

  .video-slide-label {
    font-size: 11px;
    margin-bottom: 4px;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .tts-cell {
    width: 28px;
    height: 28px;
  }

  .tts-cell input {
    font-size: 12px;
  }

  .tts-cell-number {
    font-size: 6px;
    top: 0;
    left: 2px;
  }

  .tts-row {
    gap: 1px;
  }

  #tts-grid {
    gap: 1px;
  }
}

/* ===========================
   GALLERY POPUP
   =========================== */
.gallery-main-img-wrapper {
  background: rgba(255, 255, 255, 0.03);
}

.gallery-thumb {
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  aspect-ratio: 1;
}

.gallery-thumb:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.gallery-thumb.active {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-thumb:hover img {
  transform: scale(1.08);
}
