/* 3D Interland Game Stylesheet - High-End Replicant Visuals */
:root {
  --bg-sky: #82c3f4;
  --text-light: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #e2e8f0;
  --panel-bg: rgba(15, 23, 42, 0.85);
  --border-light: rgba(255, 255, 255, 0.2);
  
  /* Realm Themes */
  --reality-color: #ef4444;
  --reality-bg: rgba(239, 68, 68, 0.15);
  --treasure-color: #f59e0b;
  --treasure-bg: rgba(245, 158, 11, 0.15);
  --mindful-color: #10b981;
  --mindful-bg: rgba(16, 185, 129, 0.15);
  --kind-color: #0ea5e9;
  --kind-bg: rgba(14, 165, 233, 0.15);

  --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-logo: 'Atomic Age', cursive, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-sky);
  color: var(--text-light);
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}

/* Background Canvas */
#canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* UI Overlay Wrapper */
#game-ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: auto;
}

/* Base Screen Style */
.ui-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: scale(0.98);
}

.ui-screen:not(.active) {
  display: none !important;
  pointer-events: none !important;
}

.ui-screen.active {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* 1. LOBBY SCREEN (Matches Google Interland Title & Select Screens) */
#lobby-screen {
  justify-content: center;
  align-items: center;
}

/* Title Screen Hero Area */
.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fadeIn 0.8s ease;
  position: relative;
  z-index: 20;
  pointer-events: auto;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.landing-hero.hidden {
  display: none !important;
  opacity: 0;
  transform: translateY(-24px);
  pointer-events: none !important;
}

.present-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.2rem;
}

.present-google {
  font-family: 'Audiowide', cursive, sans-serif;
  font-size: 1.45rem;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 10px rgba(0, 50, 140, 0.3), 0 0 8px rgba(255, 255, 255, 0.2);
}

.present-sub {
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.03em;
  margin-top: -3px;
  text-shadow: 0 1px 4px rgba(0, 50, 120, 0.2);
}

.game-logo {
  font-family: var(--font-logo);
  font-size: 5.4rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1.05;
  text-shadow: 0 4px 20px rgba(0, 50, 140, 0.3), 0 0 12px rgba(255, 255, 255, 0.25);
}

.tagline-text {
  font-family: var(--font-family);
  font-size: 2.0rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 0.5rem;
  margin-bottom: 2.2rem;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 8px rgba(0, 50, 120, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.tagline-triangle {
  font-size: 0.8rem;
  color: #ffffff;
  display: inline-block;
  transform: translateY(-2px);
}

.btn-ayo-mulai {
  background-color: #4285f4; /* Google Blue */
  color: #ffffff;
  border: none;
  font-family: var(--font-family);
  font-size: 1.2rem;
  font-weight: 800;
  padding: 0.95rem 3.5rem;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  pointer-events: auto !important;
}

.btn-ayo-mulai:hover {
  background-color: #3367d6;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 25px rgba(66, 133, 244, 0.5), 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-ayo-mulai:active {
  transform: translateY(0) scale(0.98);
}

.privacy-link {
  font-size: 0.95rem;
  color: #ffffff;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 1.25rem;
  opacity: 0.85;
  transition: opacity 0.2s;
  pointer-events: auto !important;
}

.privacy-link:hover {
  opacity: 1;
  color: #fef08a;
}

/* Dynamic Island Selectors Screen */
.island-selectors-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 25;
}

.island-selectors-container:not(.active) {
  display: none !important;
  pointer-events: none !important;
}

.island-selectors-container.active {
  display: block !important;
  opacity: 1;
  pointer-events: auto;
}

/* Styled Floating buttons pointing to islands */
.island-tag {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.9);
  color: #0f172a;
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0.75rem 1.6rem;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: auto !important;
}

.tag-icon {
  font-size: 1.3rem;
}

/* Coordinates positioned alongside the 4 3D islands */
.island-tag.kind {
  top: 22%;
  left: 19%;
}
.island-tag.reality {
  bottom: 14%;
  left: 12%;
}
.island-tag.treasure {
  top: 15%;
  right: 15%;
}
.island-tag.mindful {
  bottom: 22%;
  right: 18%;
}

/* Hover effects matching theme colors */
.island-tag:hover {
  transform: translateY(-5px) scale(1.08);
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.3);
}

.island-tag.kind:hover { background-color: var(--kind-color); border-color: var(--kind-color); }
.island-tag.reality:hover { background-color: var(--reality-color); border-color: var(--reality-color); }
.island-tag.treasure:hover { background-color: var(--treasure-color); border-color: var(--treasure-color); }
.island-tag.mindful:hover { background-color: var(--mindful-color); border-color: var(--mindful-color); }

.back-to-title-btn {
  position: absolute;
  bottom: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 1.6rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition);
  pointer-events: auto !important;
}

.back-to-title-btn:hover {
  background-color: rgba(15, 23, 42, 0.95);
  transform: translateX(-50%) translateY(-2px);
  border-color: #fff;
}

/* Footer elements */
.lobby-footer {
  position: absolute;
  bottom: 1.5rem;
  left: 2rem;
  right: 2rem;
  width: calc(100% - 4rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 20;
}

.footer-btn {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: auto !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.footer-btn:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.footer-right-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: auto !important;
}

.footer-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  font-family: inherit;
}

.footer-icon-btn:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* 2. GAME HUD (IN-GAME) */
#hud-screen {
  justify-content: flex-start;
  background: linear-gradient(to bottom, rgba(9, 13, 22, 0.5) 0%, rgba(9, 13, 22, 0) 120px);
}

.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.back-btn {
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text-light);
  font-family: inherit;
  font-weight: 700;
  padding: 0.65rem 1.4rem;
  border-radius: 0.6rem;
  cursor: pointer;
  transition: var(--transition);
  pointer-events: auto !important;
}

.back-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateX(-3px);
}

.hud-center {
  display: flex;
  align-items: center;
}

.hud-realm-badge {
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.45rem 1.25rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.score-display {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.energy-display {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.heart-icon {
  font-size: 1.6rem;
  animation: beat 1.2s infinite alternate;
}

@keyframes beat {
  0% { transform: scale(1); }
  100% { transform: scale(1.15); }
}

.energy-bar-bg {
  width: 130px;
  height: 14px;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.energy-bar-fill {
  height: 100%;
  background: linear-gradient(to right, #ef4444, #10b981);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* In-game Tutorial HUD */
.hud-instructions {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.25rem 2rem;
  border-radius: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  animation: fadeOutTutorial 5s forwards;
  max-width: 440px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
}

.hud-instructions kbd {
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 800;
}

@keyframes fadeOutTutorial {
  0% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -20px); display: none; }
}

/* Touch controls overlay for lane clicking */
.lane-clicker-controls {
  position: absolute;
  top: 80px;
  left: 0;
  width: 100%;
  height: calc(100% - 80px);
  display: flex;
  pointer-events: auto;
}

.lane-btn-left, .lane-btn-right {
  width: 50%;
  height: 100%;
  cursor: pointer;
  pointer-events: auto !important;
}

/* 3. INTERACTIVE QUIZ & ABOUT MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Lighter scrim — glass reads translucent, world stays visible behind */
  background-color: rgba(8, 15, 35, 0.45);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
}

.modal-overlay:not(.active) {
  display: none !important;
  pointer-events: none !important;
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1;
  pointer-events: auto !important;
}

.modal-card {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 1.5rem;
  width: 100%;
  max-width: 580px;
  padding: 2.5rem;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  pointer-events: auto !important;
}

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

.modal-badge {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.modal-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
}

.modal-body {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.question-text {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #f1f5f9;
}

/* ==========================================================================
   PREMIUM APPLE LIQUID GLASS — GENUINE TRANSLUCENT SHEET
   Physics: real backdrop reveal + specular rim + caustic inset light
   ========================================================================== */

.glass-liquid-card {
  /* True translucent glass — low alpha, reveal the world behind */
  background:
    linear-gradient(
      160deg,
      rgba(255, 255, 255, 0.52) 0%,
      rgba(255, 255, 255, 0.22) 45%,
      rgba(200, 225, 255, 0.18) 100%
    );
  backdrop-filter: blur(40px) saturate(180%) brightness(108%);
  -webkit-backdrop-filter: blur(40px) saturate(180%) brightness(108%);

  /* Rim-light: bright top edge (specular), faint bottom edge (refracted light) */
  border: 1px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.88);
  border-left-color: rgba(255, 255, 255, 0.62);
  border-right-color: rgba(255, 255, 255, 0.28);
  border-bottom-color: rgba(255, 255, 255, 0.18);
  border-radius: 28px;

  width: 100%;
  max-width: 520px;
  padding: 1.15rem 1.25rem 1.1rem;

  /* Layered shadow: ambient depth + caustic inner light */
  box-shadow:
    0 32px 72px rgba(0, 20, 60, 0.30),
    0 8px 24px rgba(0, 0, 0, 0.12),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.90),
    inset 0 -1px 0 rgba(255, 255, 255, 0.14),
    inset 1px 0 0 rgba(255, 255, 255, 0.22),
    inset -1px 0 0 rgba(255, 255, 255, 0.10);

  position: relative;
  color: #0c1428;
  transform: translateY(28px) scale(0.97);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.28s ease;
  pointer-events: auto !important;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.glass-liquid-card::-webkit-scrollbar { display: none; }

.modal-overlay.active .glass-liquid-card {
  transform: translateY(0) scale(1);
}

/* Close button — frosted glass pill */
.liquid-close-btn {
  position: absolute;
  top: 0.95rem;
  right: 0.95rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  color: #475569;
}
.liquid-close-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* Hero Box — inner frosted card, lighter than outer */
.liquid-hero-box {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  padding: 0.85rem 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  box-shadow:
    0 4px 16px rgba(14, 165, 233, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03);
  margin-bottom: 0.8rem;
}

.hero-left-content { flex: 1; }

.liquid-hero-title {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: #0c1428;
  line-height: 1.2;
  margin-bottom: 0.18rem;
}

.liquid-hero-subtitle {
  font-size: 0.77rem;
  line-height: 1.4;
  color: #3a4a6b;
  font-weight: 500;
  margin: 0;
}

.hero-sculpture { width: 52px; height: 52px; flex-shrink: 0; }

.mandala-pinwheel {
  width: 100%;
  height: 100%;
  animation: gentleRotate 28s linear infinite;
  filter: drop-shadow(0 4px 12px rgba(79, 70, 229, 0.3));
}

@keyframes gentleRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 4 Pillars List */
.liquid-body-section { margin-bottom: 0.8rem; }

.liquid-section-heading {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.5rem;
  padding-left: 0.1rem;
}

.liquid-pillars-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.liquid-pillar-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.80),
    0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.liquid-pillar-row:hover {
  background: rgba(255, 255, 255, 0.70);
  border-color: rgba(255, 255, 255, 0.90);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 6px 20px rgba(0, 40, 120, 0.07);
  transform: translateX(3px);
}

.pillar-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.90);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05), inset 0 1px 0 #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pillar-icon-box.blue   { background: rgba(219, 239, 255, 0.90); border-color: #bae6fd; }
.pillar-icon-box.amber  { background: rgba(255, 246, 210, 0.90); border-color: #fde68a; }
.pillar-icon-box.emerald{ background: rgba(209, 250, 229, 0.90); border-color: #a7f3d0; }
.pillar-icon-box.rose   { background: rgba(255, 228, 230, 0.90); border-color: #fecdd3; }

.pillar-text-group { flex: 1; }

.pillar-title {
  font-size: 0.80rem;
  font-weight: 800;
  color: #0c1428;
  margin-bottom: 0.08rem;
  letter-spacing: -0.01em;
}

.pillar-desc {
  font-size: 0.72rem;
  line-height: 1.35;
  color: #445275;
  font-weight: 500;
}

/* Footer CTA */
.liquid-sheet-footer {
  display: flex;
  justify-content: center;
  padding-top: 0.25rem;
}

.liquid-action-btn {
  background: linear-gradient(160deg, #1a7fe8 0%, #0055cc 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.62rem 2.6rem;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: -0.01em;
  box-shadow:
    0 6px 20px rgba(0, 85, 204, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.liquid-action-btn:hover {
  background: linear-gradient(160deg, #2589f5 0%, #0062e3 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 10px 28px rgba(0, 85, 204, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
}
.liquid-action-btn:active {
  transform: translateY(0) scale(0.99);
}

@media (max-width: 640px) {
  .glass-liquid-card {
    padding: 1rem 0.9rem;
    border-radius: 22px;
    max-height: 90vh;
  }
  .liquid-hero-box { padding: 0.8rem; border-radius: 14px; }
  .hero-sculpture  { width: 44px; height: 44px; }
  .liquid-hero-title { font-size: 1.15rem; }
  .liquid-action-btn { width: 100%; padding: 0.7rem; }
}

/* ==========================================================================
   SETTINGS MODAL — LANGUAGE SELECTOR (PREMIUM GLASS)
   ========================================================================== */

.settings-sheet { max-width: 548px; }

.settings-top-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.80);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 4px 14px rgba(2, 100, 180, 0.06);
  margin-bottom: 0.85rem;
}

.settings-icon-bubble {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), inset 0 1px 0 #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-title {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #0c1428;
  margin: 0 0 0.1rem;
}

.settings-subtitle {
  font-size: 0.76rem;
  color: #5a6a8a;
  margin: 0;
  font-weight: 500;
}

/* Language grid — 3 columns, tight gap */
.languages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.95rem;
}

@media (max-width: 520px) {
  .languages-grid { grid-template-columns: repeat(2, 1fr); }
}

.lang-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  /* neutral glass tile */
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.60);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 2px 6px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  position: relative;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  overflow: hidden;
}

/* Subtle specular sweep on hover */
.lang-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.18s ease;
  border-radius: inherit;
  pointer-events: none;
}
.lang-card:hover::before { opacity: 1; }

.lang-card:hover {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(255, 255, 255, 0.88);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 6px 16px rgba(0, 0, 0, 0.07);
}

/* Active: Apple-blue tinted glass tile */
.lang-card.active {
  background: linear-gradient(145deg,
    rgba(0, 122, 255, 0.16) 0%,
    rgba(0, 122, 255, 0.06) 100%
  );
  border-color: rgba(0, 122, 255, 0.50);
  box-shadow:
    0 0 0 1px rgba(0, 122, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.80),
    0 4px 14px rgba(0, 85, 204, 0.14);
}

.lang-flag {
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1;
}

.lang-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.lang-name {
  font-size: 0.76rem;
  font-weight: 800;
  color: #0c1428;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.lang-region {
  font-size: 0.63rem;
  color: #6a7da0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* Checkmark — only on active */
.lang-check {
  display: none;
  font-size: 0.72rem;
  font-weight: 900;
  color: #007aff;
  flex-shrink: 0;
  line-height: 1;
}
.lang-card.active .lang-check { display: block; }

.options-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.option-btn {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid #334155;
  color: #e2e8f0;
  padding: 1.1rem 1.35rem;
  border-radius: 0.85rem;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  cursor: pointer;
  transition: var(--transition);
  pointer-events: auto !important;
}

.option-btn:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #64748b;
  color: #fff;
  transform: translateX(5px);
}

.option-btn:disabled {
  cursor: not-allowed;
}

.option-btn.correct {
  background-color: rgba(16, 185, 129, 0.2) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
  font-weight: 800;
}

.option-btn.incorrect {
  background-color: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #f87171 !important;
}

.feedback-container {
  display: none;
  padding: 1.35rem;
  border-radius: 0.85rem;
  animation: fadeIn 0.4s forwards;
  flex-direction: column;
  gap: 1rem;
}

.feedback-container.active {
  display: flex;
}

.feedback-container p {
  font-size: 1rem;
  line-height: 1.55;
}

.feedback-container.correct-style {
  background-color: rgba(16, 185, 129, 0.06);
  border: 1px dashed rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.feedback-container.incorrect-style {
  background-color: rgba(239, 68, 68, 0.06);
  border: 1px dashed rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.next-btn {
  background-color: #2563eb;
  color: #fff;
  border: none;
  padding: 0.85rem 1.75rem;
  border-radius: 0.75rem;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  align-self: flex-end;
  transition: var(--transition);
  pointer-events: auto !important;
}

.next-btn:hover {
  background-color: #1d4ed8;
  transform: translateY(-2px);
}

/* 4. GAME OVER & WIN SCREEN */
#end-screen {
  justify-content: center;
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
}

.end-card {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 1.5rem;
  width: 100%;
  max-width: 500px;
  padding: 3rem 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.5s ease;
  pointer-events: auto !important;
}

.end-icon {
  font-size: 4rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.end-card h2 {
  font-size: 2.25rem;
  font-weight: 900;
  color: #fff;
}

.end-msg {
  color: #94a3b8;
  font-size: 1.05rem;
  line-height: 1.5;
}

.end-stats {
  display: flex;
  gap: 1rem;
  width: 100%;
  margin: 0.5rem 0;
}

.stat-box {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-val {
  font-size: 1.5rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: #fff;
}

.end-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.primary-btn {
  background-color: #2563eb;
  color: #fff;
  border: none;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  padding: 0.95rem 1.6rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  pointer-events: auto !important;
}

.primary-btn:hover {
  background-color: #1d4ed8;
  transform: translateY(-2px);
}

.secondary-btn {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.95rem 1.6rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  pointer-events: auto !important;
}

.secondary-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

/* ==========================================================================
   STUDIO-GRADE GRAPHIC NOVEL / WEBTOON READER (DIGISANTARA CHRONICLES)
   ========================================================================== */
.fullscreen-comic-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 30%, #0d1322 0%, #050811 100%);
  z-index: 9999;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  overflow: hidden;
}

.fullscreen-comic-overlay.active {
  display: flex !important;
  opacity: 1;
}

/* 1. Header Toolbar (Matte Dark Glass) */
.comic-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  z-index: 10;
}

.comic-brand-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.comic-brand-title {
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #38bdf8;
  text-transform: uppercase;
}

.comic-pill-divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #64748b;
}

.comic-chapter-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.02em;
}

.comic-skip-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.comic-skip-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* 2. Comic Reading Stage */
.comic-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  gap: 1.25rem;
}

/* The Main Comic Page Frame */
.comic-page-canvas {
  flex: 1;
  height: calc(100vh - 100px);
  max-height: 780px;
  max-width: 980px;
  background: #090e1a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

/* Comic Real Image (When provided by user) */
.comic-full-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* 3. Illustrated Comic Page Panels (Manga / Webtoon Style) */
.comic-page-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  box-sizing: border-box;
  gap: 0.85rem;
  background: #0b1120;
}

/* Top Major Panel */
.comic-panel-hero {
  flex: 1.4;
  background: #0f172a;
  border: 2px solid #1e293b;
  border-radius: 0.75rem;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
}

.panel-hero-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.comic-narrative-card {
  position: relative;
  z-index: 2;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.85rem 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.comic-kronik-badge {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #f59e0b;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.comic-narrative-text {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #f8fafc;
  font-weight: 500;
  margin: 0;
}

/* Bottom Split Panels */
.comic-panel-split {
  flex: 1;
  display: flex;
  gap: 0.85rem;
}

.comic-sub-panel {
  flex: 1;
  background: #0f172a;
  border: 2px solid #1e293b;
  border-radius: 0.75rem;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.panel-sub-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Authentic Comic Speech Balloon */
.comic-speech-bubble {
  position: relative;
  z-index: 2;
  background: #ffffff;
  color: #0f172a;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.4;
  max-width: 90%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.comic-speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 24px;
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: #ffffff transparent;
  display: block;
  width: 0;
}

/* Sound Effect / Action Punch Text */
.comic-sfx-text {
  position: absolute;
  top: 15%;
  right: 10%;
  font-size: 1.8rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.05em;
  color: #fbbf24;
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
  transform: rotate(-12deg);
  z-index: 3;
  pointer-events: none;
}

/* 4. Elegant Side Nav Chevrons */
.comic-nav-paddle {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.comic-nav-paddle:hover:not(:disabled) {
  background: #2563eb;
  border-color: #3b82f6;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.5);
}

.comic-nav-paddle:disabled {
  opacity: 0.15;
  cursor: not-allowed;
}

/* 5. Bottom Navigation Bar */
.comic-bottombar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  z-index: 10;
}

.comic-progress-track {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comic-step-pill {
  height: 6px;
  width: 28px;
  border-radius: 999px;
  background: #1e293b;
  cursor: pointer;
  transition: all 0.3s ease;
}

.comic-step-pill.active {
  width: 50px;
  background: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

.comic-action-primary {
  background: #2563eb;
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 0.65rem 1.6rem;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.comic-action-primary:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
}

.comic-action-primary.launch-mode {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.45);
}

.comic-action-primary.launch-mode:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.6);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   MOBILE & TOUCH DESIGN SYSTEM (IMPECCABLE & TASTE STANDARDS)
   ========================================================================== */

/* 1. Sleek Mobile In-Game Touch Controls */
.mobile-touch-bar {
  display: none;
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 440px;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  z-index: 50;
  pointer-events: auto;
}

@media (pointer: coarse), (max-width: 768px) {
  .mobile-touch-bar {
    display: flex;
  }
  .lane-clicker-controls {
    display: none;
  }
}

.touch-ctrl-btn {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transition: all 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.touch-ctrl-btn:active {
  background: #2563eb;
  border-color: #38bdf8;
  transform: scale(0.93);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.6);
}

.touch-ctrl-btn.left,
.touch-ctrl-btn.right {
  width: 66px;
  height: 66px;
  flex-shrink: 0;
}

.touch-ctrl-btn.jump {
  flex: 1;
  height: 66px;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.8), rgba(16, 185, 129, 0.8));
  border-color: rgba(255, 255, 255, 0.3);
}

/* 2. Responsive Breakpoint - Tablets & Small Laptops (<= 900px) */
@media (max-width: 900px) {
  .game-logo {
    font-size: clamp(3rem, 8vw, 4.5rem);
  }
  .tagline-text {
    font-size: 1.25rem;
  }
  .comic-page-canvas {
    height: calc(100vh - 120px);
    max-height: 680px;
  }
}

/* 3. Responsive Breakpoint - Mobile Phones (<= 640px) */
@media (max-width: 640px) {
  /* Title & Hero */
  .landing-hero {
    padding: 1.5rem 1rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .present-box {
    padding: 0.35rem 0.9rem;
    gap: 0.4rem;
  }
  .present-google {
    font-size: 0.85rem;
  }
  .present-sub {
    font-size: 0.75rem;
  }
  .game-logo {
    font-size: clamp(2.3rem, 10vw, 3.4rem);
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
  }
  .tagline-text {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }
  .btn-ayo-mulai {
    width: 100%;
    max-width: 300px;
    padding: 0.95rem 1.5rem;
    font-size: 1.05rem;
    border-radius: 999px;
  }
  .privacy-link {
    font-size: 0.85rem;
    margin-top: 1rem;
  }
  .lobby-footer {
    bottom: 0.85rem;
    padding: 0 1rem;
  }
  .footer-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  /* In-Game HUD */
  .hud-top {
    padding: 0.5rem 0.75rem;
    gap: 0.4rem;
  }
  .back-btn {
    padding: 0.4rem 0.65rem;
    font-size: 0.78rem;
    border-radius: 0.5rem;
  }
  .hud-realm-badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.6rem;
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hud-right {
    gap: 0.35rem;
  }
  .score-display {
    font-size: 0.72rem;
    padding: 0.3rem 0.55rem;
  }
  .energy-display {
    padding: 0.3rem 0.55rem;
  }
  .energy-bar-bg {
    width: 55px;
    height: 9px;
  }
  .hud-instructions {
    top: 4.2rem;
    width: calc(100% - 1.5rem);
    padding: 0.65rem 0.85rem;
    font-size: 0.78rem;
    line-height: 1.4;
  }

  /* Comic Reader */
  .fullscreen-comic-overlay {
    padding: 0.6rem 0.6rem 0.85rem;
  }
  .comic-nav-paddle {
    display: none;
  }
  .comic-stage {
    gap: 0;
  }
  .comic-page-canvas {
    height: calc(100vh - 75px);
    max-height: none;
    border-radius: 0.75rem;
  }
  .comic-page-content {
    padding: 0.65rem;
    gap: 0.5rem;
  }
  .comic-panel-hero {
    flex: 1.15;
  }
  .comic-narrative-card {
    padding: 0.55rem 0.75rem;
  }
  .comic-kronik-badge {
    font-size: 0.62rem;
  }
  .comic-narrative-text {
    font-size: 0.8rem;
    line-height: 1.4;
  }
  .comic-panel-split {
    gap: 0.5rem;
  }
  .comic-sub-panel {
    padding: 0.4rem;
  }
  .comic-speech-bubble {
    font-size: 0.72rem;
    padding: 0.45rem 0.6rem;
    border-radius: 0.75rem;
  }
  .comic-speech-bubble::after {
    bottom: -5px;
    left: 12px;
    border-width: 5px 5px 0;
  }
  .comic-sfx-text {
    font-size: 1.1rem;
    top: 6%;
    right: 6%;
  }
  .comic-bottombar {
    padding-top: 0.4rem;
  }
  .comic-step-pill {
    width: 22px;
    height: 5px;
  }
  .comic-step-pill.active {
    width: 38px;
  }
  .comic-action-primary {
    padding: 0.55rem 1.15rem;
    font-size: 0.82rem;
  }

  /* Modals */
  .modal-overlay {
    padding: 0.75rem;
  }
  .modal-card {
    padding: 1.25rem 1rem;
    max-height: 90vh;
    border-radius: 1rem;
  }
  .modal-header h2 {
    font-size: 1.25rem;
  }
  .modal-badge {
    font-size: 0.65rem;
  }
  .question-text {
    font-size: 0.92rem;
    line-height: 1.45;
  }
  .option-btn {
    padding: 0.75rem 0.9rem;
    font-size: 0.85rem;
    min-height: 48px;
  }
  .feedback-container {
    padding: 0.75rem;
  }
  .feedback-container p {
    font-size: 0.82rem;
  }
  .end-card {
    padding: 1.5rem 1rem;
    max-height: 90vh;
  }
  .end-icon {
    font-size: 3rem;
  }
  .end-card h2 {
    font-size: 1.4rem;
  }
  .end-msg {
    font-size: 0.85rem;
  }
  .end-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .stat-box {
    padding: 0.6rem 0.8rem;
  }
  .end-buttons {
    flex-direction: column;
    width: 100%;
    gap: 0.6rem;
  }
  .primary-btn,
  .secondary-btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 0.9rem;
  }
}

/* ==========================================================================
   4. DEDICATED MOBILE LANDSCAPE MODE (max-height <= 520px)
   Console / Gamepad Controller Ergonomics & Horizontal Webtoon Split
   ========================================================================== */
@media (orientation: landscape) and (max-height: 520px) {
  /* Title & Lobby */
  .landing-hero {
    padding: 0.35rem 1rem;
    gap: 0.2rem;
  }
  .present-box {
    padding: 0.15rem 0.6rem;
    margin-bottom: 0.15rem;
  }
  .present-google { font-size: 0.75rem; }
  .present-sub { font-size: 0.68rem; }
  .game-logo {
    font-size: clamp(1.6rem, 7vh, 2.4rem);
    margin-bottom: 0.1rem;
  }
  .tagline-text {
    font-size: 0.78rem;
    margin-bottom: 0.6rem;
  }
  .btn-ayo-mulai {
    padding: 0.5rem 1.6rem;
    font-size: 0.88rem;
    min-height: 38px;
  }
  .privacy-link {
    font-size: 0.72rem;
    margin-top: 0.35rem;
  }
  .lobby-footer {
    bottom: 0.3rem;
    padding: 0 1rem;
  }
  .footer-btn {
    font-size: 0.72rem;
    padding: 0.25rem 0.6rem;
  }

  /* In-Game HUD in Landscape */
  .hud-top {
    padding: 0.3rem 0.8rem;
    gap: 0.5rem;
  }
  .back-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }
  .hud-realm-badge {
    font-size: 0.62rem;
    padding: 0.25rem 0.55rem;
  }
  .score-display, .energy-display {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
  }
  .hud-instructions {
    top: 3.2rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.72rem;
  }

  /* Mobile Gamepad Touch Controls (Left & Right Thumb Grip) */
  .mobile-touch-bar {
    position: absolute;
    bottom: 0.85rem;
    left: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    padding: 0 1.25rem;
    box-sizing: border-box;
    justify-content: space-between;
    pointer-events: none;
  }

  .touch-ctrl-btn {
    pointer-events: auto;
  }

  .touch-ctrl-btn.left,
  .touch-ctrl-btn.right {
    width: 54px;
    height: 54px;
    border-radius: 1rem;
  }

  .touch-ctrl-btn.jump {
    flex: none;
    width: 130px;
    height: 54px;
    border-radius: 1rem;
    font-size: 0.85rem;
  }

  /* Comic Reader Side-by-Side Landscape Split */
  .fullscreen-comic-overlay {
    padding: 0.4rem 0.8rem;
  }
  .comic-page-canvas {
    height: calc(100vh - 48px);
  }
  .comic-page-content {
    flex-direction: row;
    padding: 0.5rem;
    gap: 0.6rem;
  }
  .comic-panel-hero {
    flex: 1.25;
    height: 100%;
  }
  .comic-narrative-card {
    padding: 0.45rem 0.7rem;
  }
  .comic-narrative-text {
    font-size: 0.76rem;
    line-height: 1.35;
  }
  .comic-panel-split {
    flex: 1;
    flex-direction: column;
    height: 100%;
    gap: 0.5rem;
  }
  .comic-sub-panel {
    flex: 1;
    padding: 0.4rem;
  }
  .comic-speech-bubble {
    font-size: 0.72rem;
    padding: 0.4rem 0.6rem;
  }
  .comic-bottombar {
    padding-top: 0.25rem;
  }
  .comic-step-pill {
    width: 18px;
    height: 4px;
  }
  .comic-step-pill.active {
    width: 32px;
  }
  .comic-action-primary {
    padding: 0.4rem 1.1rem;
    font-size: 0.78rem;
  }

  /* Modals in Landscape (Compact & 2-Col Option Grid) */
  .modal-overlay {
    padding: 0.5rem;
  }
  .modal-card {
    padding: 0.85rem 1.25rem;
    max-height: 94vh;
  }
  .modal-header h2 {
    font-size: 1.1rem;
  }
  .question-text {
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
  }
  .options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }
  .option-btn {
    padding: 0.55rem 0.8rem;
    font-size: 0.78rem;
    min-height: 40px;
  }
  .end-card {
    padding: 0.85rem 1.25rem;
    max-height: 94vh;
  }
  .end-icon {
    font-size: 2.2rem;
  }
  .end-card h2 {
    font-size: 1.15rem;
  }
  .end-msg {
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
  }
  .end-stats {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
  }
  .end-buttons {
    flex-direction: row;
    gap: 0.5rem;
  }
  .primary-btn, .secondary-btn {
    padding: 0.55rem 1rem;
    font-size: 0.8rem;
  }
}
