@font-face {
  font-family: 'Comic Helvetic';
  src: url('./assets/fonts/ComicHelvetic_Heavy.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'Comic Helvetic';
  src: url('./assets/fonts/ComicHelvetic_Medium.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

/* Outfit font - loaded locally (previously from Google Fonts CDN) */
@font-face {
  font-family: 'Outfit';
  src: url('./assets/fonts/Outfit-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Outfit';
  src: url('./assets/fonts/Outfit-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Outfit';
  src: url('./assets/fonts/Outfit-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --red-team: #e74c3c;
  --blue-team: #3498db;
  --gold: #f1c40f;
  --green: #2ecc71;
  --dark-overlay: rgba(0, 0, 0, 0.6);
  --glass: rgba(255, 255, 255, 0.15);
  --font-main: 'Outfit', sans-serif;
  --font-comic: 'Comic Helvetic', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  /* Prevent selection during frantic clicking */
}

body {
  font-family: var(--font-main);
  background: #1a1a2e;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  position: relative;
}

/* Fixed Aspect Ratio Scaling Container */
#game-scaler {
  width: 1366px;
  height: 768px;
  position: absolute;
  background: #2c3e50;
  overflow: hidden;
}

#app {
  display: flex;
  flex-direction: column;
  width: 1366px;
  height: 768px;
  position: relative;
}

/* --- HUD Top --- */
.game-hud-top {
  height: auto;
  min-height: 120px;
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 2rem;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  pointer-events: none;
}

.game-hud-top>* {
  pointer-events: auto;
}

/* Team Profiles (Clean, no wood) */
/* Team Profiles (Centered Relative) */
/* Team Profiles (Centered Relative) */
.team-profile {
  position: absolute;
  top: 57px;
  /* Adjusted slightly */
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 50;
  width: 300px;
  /* Base width */
}

/* RED TEAM: Avatar Left, Text Right */
/* Locked Anchor: The Avatar's position should be static relative to screen center */
.team-profile.red {
  flex-direction: row;
  text-align: left;
  /* Position the LEFT edge of the profile relative to center */
  left: 50%;
  margin-left: -365px;
  /* Push way to the left */
}

/* BLUE TEAM: Avatar Right, Text Left */
.team-profile.blue {
  flex-direction: row-reverse;
  text-align: right;
  /* Position the RIGHT edge of the profile relative to center */
  right: 50%;
  margin-right: -365px;
  /* Push way to the right */
}

/* Remove old profile-inner wrapper logic if distinct styling needed, 
   but usually cleaner to target direct children */
.profile-inner {
  display: contents;
  /* Remove layout influence */
}

.avatar-frame img {
  width: 48px;
  height: 48px;
  border-radius: 7px;
  border: 3px solid #fff;
  background: #fff;
}

.team-profile.red .avatar-frame img {
  background: #ffcccc;
}

.team-profile.blue .avatar-frame img {
  background: #cceeff;
}

.team-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.team-name {
  font-family: var(--font-comic);
  font-weight: bold;
  font-size: 1rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.money-container {
  display: flex;
  align-items: center;
  gap: 7px;
}

.team-profile.blue .money-container {
  flex-direction: row-reverse;
  align-self: flex-end;
}

/* Coin icon hidden but takes space */
.coin-icon {
  visibility: hidden;
  width: 10px;
  height: 10px;
}

.money-container span {
  font-family: var(--font-comic);
  color: #f1c40f;
  font-weight: bold;
  font-size: 0.8rem;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
  position: relative;
  top: -1px;
}

/* Center Area */
.battle-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  width: auto;
}

.game-title {
  display: none;
  /* Hide title to clean up HUD? Or keep small? user said "center top panel". */
}

/* Battle Bar (Simplified) */
.battle-bar-outer {
  width: 100%;
  max-width: 330px;
  height: 24px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 2px;
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0;
  top: 60px;
  /* Move Bar Down */
  z-index: 20;
  /* Overlay on top */
}

.progress-track {
  width: 100%;
  height: 100%;
  background: var(--blue-team);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.battle-bar-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.progress-fill.red-fill {
  background: var(--red-team);
  height: 100%;
  box-shadow: inset -2px 0 5px rgba(0, 0, 0, 0.3);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vs-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-comic);
  font-style: italic;
  font-weight: 900;
  font-size: 1rem;
  color: #fff;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
  z-index: 5;
}

/* Central Wooden Panel for Timer/Day */
.center-wood-panel {
  background: url('./assets/panels/panel_score.png') no-repeat center center/100% 100%;
  width: 750px;
  height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 10px;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
  margin-top: -40px;
  /* Move Image Up and Behind */
  position: relative;
  z-index: 1;
}

/* Timer & Day Pills */
.time-day-container {
  display: flex;
  flex-direction: row-reverse;
  /* Side by side */
  align-items: center;
  justify-content: center;
  /* gap: removed for manual positioning below */
  margin-top: 0px;
}

.hud-pill {
  /* Removed background, now just text container */
  background: transparent;
  padding: 0;
  min-width: auto;
  height: auto;
  filter: none;
}

.hud-pill span {
  font-family: var(--font-comic);
  color: #fff;
  /* Wood is brown/light, white text works with shadow */
  font-weight: bold;
  font-size: 1.2rem;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
}

#game-timer {
  font-size: 1rem !important;
  line-height: 1;
  color: #f1c40f;
  /* Gold */
  /* Adjust Position Individually */
  position: relative;
  left: 18px;
  /* Geser Timer (Kanan) */
  top: -3px;
}

.hud-pill .day-badge {
  font-size: 1rem !important;
  color: #f1c40f !important;
  /* Gold color for Day */
  /* Adjust Position Individually */
  position: relative;
  right: 27px;
  /* Geser Hari (Kiri) */
  top: -1px;
}


/* --- Battle Main Area --- */
/* --- Battle Main Area --- */
.battle-field {
  /* Enforce 16:9 ratio so background elements stay aligned */
  width: 100%;
  max-height: 100%;
  aspect-ratio: 16/9;
  margin: auto;
  /* Center vertically/horizontally */

  display: flex;
  position: relative;
  background: url('./assets/panels/backgorund-panel.webp') no-repeat center bottom/cover;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  /* Visual border */
}

.team-zone {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* Align controls to bottom */
  align-items: center;
  overflow: hidden;
}

.red-zone {
  background: transparent;
}

.blue-zone {
  background: transparent;
}

.divider-line {
  display: none;
}

/* Crowd & Popups */
.crowd-area {
  position: absolute;
  top: 15%;
  bottom: 25%;
  width: 100%;
  /* Temporary styling for dev */
  background-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.05) 2px, transparent 2px);
  background-size: 20px 20px;
  z-index: 30;
}

.customer {
  position: absolute;
  width: 187px;
  height: 281px;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  transition: all 0.3s;
  cursor: pointer;
  display: flex;
  justify-content: center;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.3));
  z-index: 100;
  /* Multi-touch: hapus delay tap & cegah menu klik-kanan */
  touch-action: manipulation;
  -webkit-touch-callout: none;
  user-select: none;
}

.customer.red-team-cust {
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 5px #e74c3c) drop-shadow(0 0 10px #e74c3c);
}

.customer.blue-team-cust {
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 5px #3498db) drop-shadow(0 0 10px #3498db);
}

/* Order Popup Bubble */
.order-popup {
  position: absolute;
  top: -60px;
  background: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 50;
  pointer-events: auto;
  /* Multi-touch: hapus delay dan cegah zoom serta menu klik-kanan */
  touch-action: manipulation;
  -webkit-touch-callout: none;
  user-select: none;
}

.order-popup::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #fff;
}

.order-text {
  font-weight: 800;
  color: #2c3e50;
  font-size: 0.9rem;
}

.order-timer-bar {
  width: 100%;
  height: 4px;
  background: #eee;
  margin-top: 4px;
  border-radius: 2px;
  overflow: hidden;
}

.order-timer-fill {
  width: 100%;
  height: 100%;
  background: var(--red-team);
  /* Turns red as it expires */
  animation: timerShrink linear forwards;
}

@keyframes timerShrink {
  from {
    width: 100%;
    background: #2ecc71;
  }

  to {
    width: 0%;
    background: #c0392b;
  }
}

@keyframes popIn {
  from {
    transform: scale(0) translateY(20px);
    opacity: 0;
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Gerobak & Stock */
.gerobak-container {
  position: relative;
  width: 200px;
  height: 150px;
  background: #8e44ad;
  /* Placeholder */
  margin-bottom: 2rem;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.red .gerobak-container {
  background: #c0392b;
}

/* Stock Display (Redesigned & Scaled 25%) */
.stock-display {
  position: static;
  display: flex;
  flex-direction: column;
  width: 175px;
  /* Increased width */
  height: auto;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: -5px;
  z-index: 200;
  /* Ensure visual priority over customers */
}

.red-zone .stock-display {
  margin-left: auto;
  margin-right: -1.7rem;
}

.blue-zone .stock-display {
  margin-right: auto;
  margin-left: -1.7rem;
  z-index: 5;
}

.stock-header {
  background: #f1c40f;
  color: transparent;
  /* Text hidden, handled by overlay label */
  height: 35px;
  /* Increased height */
  border: 2px solid #000;
  border-bottom: 2px solid #000;
  border-radius: 8px 8px 0 0;
  width: 100%;
}

.stock-content {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 50px;
  /* Increased height */
  border: 2px solid #000;
  border-top: none;
  border-radius: 0 0 8px 8px;
}

/* Merge Styling: Red (Left Side of Union) */
.stock-display.red-stock .stock-header {
  border-top-right-radius: 0;
  border-right: none;
  /* No divider in header */
}

.stock-display.red-stock .stock-content {
  border-bottom-right-radius: 0;
  border-right-width: 1px;
  /* Keep divider in content */
}

/* Merge Styling: Blue (Right Side of Union) */
.stock-display.blue-stock .stock-header {
  border-top-left-radius: 0;
  border-left: none;
  /* No divider in header */
}

.stock-display.blue-stock .stock-content {
  border-bottom-left-radius: 0;
  border-left-width: 1px;
  /* Keep divider in content */
}

.stock-display .value {
  font-size: 1.8rem;
  /* Increased font */
  font-weight: 900;
  color: #000;
}

.stock-icon {
  font-size: 1.5rem;
  /* Increased icon */
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

.stock-display .label {
  display: none;
}

/* Shared Header Label Independent Element */
.stock-label-overlay {
  position: absolute;
  bottom: 68px;
  /* Centered in yellow header */
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-family: var(--font-comic);
  font-size: 1rem;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  z-index: 300;
  pointer-events: none;
  white-space: nowrap;
  width: 200px;
  text-align: center;
  line-height: 35px;
  /* Match header height for vertical centering */
}

/* Blue Clock Icon Style */
.habit-icon.blue-clock {
  filter: hue-rotate(200deg);
  /* Adjust Red to Blue */
}

/* Tint Red Icon (Emoji) */
.red-stock .stock-icon {
  filter: sepia(1) saturate(5) hue-rotate(-50deg) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

/* Controls */
/* Controls */
.controls-area {
  width: 100%;
  padding: 1.5rem;
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  /* Align bottom to ensure stock boxes line up */
  gap: 1rem;
  /* Overlay removed */
}

/* Reverse Blue Team Controls removed - using standard row with reordered HTML */

.btn-action-img {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s;
}

.btn-action-img:active {
  transform: scale(0.95);
}

.btn-action-img img {
  height: 45px;
  width: auto;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.2));
}

.btn-action-img:active img {
  filter: none;
  transform: translateY(4px);
}

/* Settings top right */
/* Game Top Right Buttons */
.game-top-buttons {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 200;
  /* Above HUD */
}

.btn-game {
  background-color: transparent;
  width: 50px;
  /* Slightly smaller than home */
  height: 50px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.btn-game:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.4));
}

.btn-game.fullscreen {
  background-image: url('./assets/buttons/fullscreen.png');
}

.btn-game.fullscreen.active {
  background-image: url('./assets/buttons/fullscreen_exit.png');
}

.btn-game.sound {
  background-image: url('./assets/buttons/unmute.png');
}

.btn-game.sound.muted {
  background-image: url('./assets/buttons/mute.png');
}

.btn-game.exit {
  background-image: url('./assets/buttons/exit.png');
}

/* Responsive text for small timer */
.day-badge {
  font-size: 0.9rem;
}

/* --- Home Screen & Utilities --- */
.hidden {
  display: none !important;
}

#home-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 1366px;
  height: 768px;
  display: flex;
  justify-content: center;
  z-index: 2000;
  color: #fff;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ... (existing styles) ... */

/* Duplicate .home-content removed */

/* Old .btn-start-image removed */

.btn-start-image:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.4));
}

.btn-start-image:active {
  transform: scale(0.95);
}

.btn-pulse {
  animation: pulseBtn 1.5s infinite;
}

@keyframes pulseBtn {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Cleaned up Home Screen Styles and Assets */
.home-bg-animate {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('./assets/panels/background.webp') no-repeat center bottom/cover;
  z-index: 0;
}

.home-overlay {
  display: none;
}

/* --- LOGO STYLES (KIRI ATAS) --- */
.logos-top-left {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2010;
  display: flex;
  /* gap dihapus agar diatur individual */
  align-items: center;
}

.home-logo {
  height: 60px;
  /* Default Size */
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* --- ATUR UKURAN & JARAK LOGO DI SINI --- */
#logo-1 {
  height: 90px;
  /* Ubah ukuran Logo 1 */
  margin-right: -20px;
}

#logo-2 {
  height: 65px;
  /* Ubah ukuran Logo 2 */
  margin-right: -2px;
}

#logo-3 {
  height: 60px;
  /* Ubah ukuran Logo 3 */
  margin-right: 2px;
}

#logo-4 {
  height: 55px;
  /* Ubah ukuran Logo 4 */
  margin-right: 2px;
}

#logo-5 {
  height: 52px;
  /* Ubah ukuran Logo 5 */
  margin-right: 0px;
}


/* --- CAPAIAN PEMBELAJARAN (KIRI BAWAH GEROBAK BAKSO - TAMPILAN DISCLAIMER) --- */
.home-cp-disclaimer {
  position: absolute;
  bottom: 42px;
  left: 42px;
  z-index: 2010;
  max-width: 440px;
  pointer-events: none; /* Tidak mengganggu klik atau interaksi game */
}

.cp-disclaimer-title {
  font-family: var(--font-main, sans-serif);
  font-weight: 800;
  font-size: 13px;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.95), 0 0 6px rgba(0, 0, 0, 0.85);
  margin-bottom: 2px;
}

.cp-disclaimer-body {
  font-family: var(--font-main, sans-serif);
  font-size: 11px;
  line-height: 1.35;
  color: #f1f2f6;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.95), 0 0 5px rgba(0, 0, 0, 0.85);
}

.cp-disclaimer-body strong {
  color: #ffffff;
  font-weight: 700;
}

/* --- DESIGNER BADGE (KANAN BAWAH) --- */
.home-designer-badge {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 2010;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

#designer-badge {
  height: 95px;
}



.settings-top-right {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  gap: 0.2rem;
}

.icon-btn-large {
  background-color: transparent;
  width: 60px;
  height: 60px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.icon-btn-large:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

/* Specific Top Right Buttons */
.btn-fullscreen-img {
  background-image: url('./assets/buttons/fullscreen.png');
}

.btn-fullscreen-img.active {
  background-image: url('./assets/buttons/fullscreen_exit.png');
}

.btn-settings-img {
  background-image: url('./assets/buttons/setting.png');
}

.btn-sound-img {
  background-image: url('./assets/buttons/unmute.png');
}

/* Default Unmuted */
.btn-sound-img.muted {
  background-image: url('./assets/buttons/mute.png');
}

/* Exit button removed */

.home-content {
  position: absolute;
  bottom: 29%;
  left: 0;
  z-index: 5;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 0;
  animation: popIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* New Button Image Style */
.btn-start-image {
  background: url('./assets/buttons/mulaipermainan.png') no-repeat center center/contain;
  background-color: transparent;
  width: 300px;
  height: 100px;
  border: none;
  cursor: pointer;
  transition: transform 0.1s;
  animation: pulseBtn 2s infinite;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.3));
}

.btn-start-image:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.4));
}

.btn-start-image:active {
  transform: scale(0.95);
}

/* Animations continue from earlier in file */

/* Mode Selection Container */
.mode-selection {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 62.4%;
  transform: translateX(-50%);
}

/* Base Style for Mode Buttons */
.btn-mode-image {
  background-color: transparent;
  width: 200px;
  /* Smaller than the main start button */
  height: 80px;
  border: none;
  cursor: pointer;
  transition: transform 0.1s;
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.3));
}

.btn-mode-image:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.4));
}

.btn-mode-image:active {
  transform: scale(0.95);
}

/* Specific Images */
.btn-mode-image.start {
  background: url('./assets/buttons/start.png') no-repeat center center/contain;
}

/* --- Setup Screen (Multiplayer Input) --- */
#setup-screen,
#settings-screen,
#objectives-screen,
#tutorial-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 1366px;
  height: 768px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  overflow: hidden;
}

.bokeh-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('./assets/panels/background.webp') no-repeat center bottom/cover;
  filter: blur(10px) brightness(0.8);
  transform: scale(1.1);
  /* Prevent blurred edges showing white */
  z-index: 0;
}

.setup-content {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: fadeIn 0.5s ease-out;
}

.setup-title {
  font-family: var(--font-comic);
  font-size: 3.5rem;
  /* Slightly larger */
  color: var(--gold);
  text-shadow: 2px 2px 0 #000;
  -webkit-text-stroke: 1px #000;
  font-weight: bold;
  /* Uses Heavy variant */
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  margin-top: 2rem;
  /* Push down */
}

.setup-forms {
  display: flex;
  width: 100%;
  gap: 3rem;
  justify-content: center;
}

.team-input-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border: 4px solid transparent;
  transition: transform 0.2s;
}

#setup-screen .setup-content {
  position: relative;
  width: 95%;
  max-width: 1000px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 2.5rem 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 100;
  animation: fadeIn 0.5s ease-out;
}

.setup-body-split {
  display: flex;
  width: 100%;
  gap: 2rem;
  margin-top: 0.5rem;
}

.team-panel-side {
  flex: 1;
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  border: 2px solid #e8ecf1;
  border-radius: 16px;
  padding: 1.8rem 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.team-panel-side:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.team-panel-side.red {
  border-color: #fbd5d0;
  border-top: 5px solid var(--red-team);
}

.team-panel-side.blue {
  border-color: #d4e6f1;
  border-top: 5px solid var(--blue-team);
}

.team-badge.red-badge {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  align-self: flex-start;
  margin-bottom: 0;
}

.team-badge.blue-badge {
  background: linear-gradient(135deg, #3498db, #2980b9);
  align-self: flex-start;
  margin-bottom: 0;
}

.team-panel-side .team-header {
  font-family: var(--font-comic);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.5rem;
  font-weight: 700;
  border-bottom: 2px solid #e8ecf1;
  padding-bottom: 0.8rem;
  margin-top: -2px;
}

.team-panel-side.red .team-header {
  color: var(--red-team);
}

.team-panel-side.blue .team-header {
  color: var(--blue-team);
}

.team-panel-side .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.team-panel-side .form-group label {
  font-family: var(--font-comic);
  font-size: 1rem;
  font-weight: 700;
  color: #34495e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.team-panel-side .form-group input {
  padding: 0.8rem 1rem;
  border: 2px solid #e8ecf1;
  border-radius: 12px;
  font-size: 1.1rem;
  font-family: var(--font-comic);
  background: #f8f9fa;
  outline: none;
  transition: all 0.2s;
  color: #2c3e50;
}

.team-panel-side.red .form-group input:focus {
  border-color: var(--red-team);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.15);
}

.team-panel-side.blue .form-group input:focus {
  border-color: var(--blue-team);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
}

.team-header {
  font-family: var(--font-comic);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 2rem;
  font-weight: normal;
  text-transform: uppercase;
  border-bottom: 2px solid #eee;
  padding-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: var(--font-comic);
  font-size: 1.2rem;
  font-weight: normal;
  color: #555;
  text-transform: uppercase;
}

.form-group input {
  padding: 0.8rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1.2rem;
  font-family: var(--font-comic);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: #f1c40f;
}

.btn-start-battle {
  background: url('./assets/buttons/start.png') no-repeat center center/contain;
  background-color: transparent;
  border: none;
  width: 300px;
  height: 100px;
  cursor: pointer;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
  transition: transform 0.1s;
  margin-top: 0;
}

.btn-start-battle:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.4));
}

.btn-start-battle:active {
  transform: scale(0.95);
}

.btn-back {
  position: absolute;
  top: 2rem;
  left: 2rem;
  background: url('./assets/buttons/back.png') no-repeat center center/contain;
  background-color: transparent;
  width: 60px;
  height: 60px;
  border: none;
  cursor: pointer;
  z-index: 20;
  transition: transform 0.2s;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.btn-back:hover {
  background-color: transparent;
  /* Override previous hover */
  transform: scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

/* Steam/Smoke Animation */
.steam-container {
  position: absolute;
  width: 50px;
  height: 80px;
  z-index: 25;
  /* Between BG and customers */
  pointer-events: none;
}

.red-steam {
  left: 25%;
  /* Shifted right */
  bottom: 35%;
  /* Estimated height */
}

.blue-steam {
  right: 25%;
  /* Shifted left */
  bottom: 35%;
}

.home-steam {
  left: calc(31% - 7cm);
  bottom: 45%;
  z-index: 1;
}

/* Thicker steam for home screen */
.home-steam .vapor {
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(6px);
}

.home-steam .vapor:nth-child(2) {
  width: 60px;
  height: 60px;
}


.vapor {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 30px;
  height: 30px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0;
  transform: translateX(-50%);
  animation: rise 2.5s infinite ease-out;
}

.vapor:nth-child(1) {
  animation-delay: 0s;
}

.vapor:nth-child(2) {
  animation-delay: 0.8s;
  width: 40px;
  height: 40px;
}

.vapor:nth-child(3) {
  animation-delay: 1.6s;
  width: 25px;
  height: 25px;
}

@keyframes rise {
  0% {
    bottom: 0;
    opacity: 0;
    transform: translateX(-50%) scale(0.5);
  }

  30% {
    opacity: 0.8;
  }

  100% {
    bottom: 120px;
    opacity: 0;
    transform: translateX(-50%) scale(2.5);
  }
}

/* Coin Animation (Wrapper for X, Inner for Y) */
.coin-wrapper {
  position: absolute;
  z-index: 200;
  pointer-events: none;
  width: 20px;
  height: 20px;
  will-change: transform;
}

.flying-coin {
  width: 100%;
  height: 100%;
  background: radial-gradient(#f1c40f, #d4ac0d);
  border: 1px solid #b7950b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  will-change: transform;
}

.flying-coin::after {
  content: "Rp";
  color: #fff;
  font-family: var(--font-comic);
  font-weight: bold;
  font-size: 8px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}

/* --- Settings Screen --- */
.team-input-card.gold {
  border-color: #f1c40f;
  border-width: 4px;
  /* Thicker border for settings */
}

/* Ensure two-column layout for settings */
.settings-columns {
  display: flex;
  gap: 2rem;
  width: 100%;
}

.settings-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  /* Space between rows */
}

.form-row {
  display: flex;
  gap: 2rem;
  width: 100%;
}

.form-row .form-group {
  flex: 1;
}

/* Adjust select input */
.form-group select {
  padding: 0.8rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1.2rem;
  font-family: var(--font-comic);
  outline: none;
  background: white;
  cursor: pointer;
}

.form-group select:focus {
  border-color: #f1c40f;
}

/* --- New Settings Layout --- */
.settings-columns {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  width: 100%;
  justify-content: center;
}

.settings-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: flex-start;
}

/* Ensure the card adapts */
/* Ensure the card adapts */
.team-input-card.settings-layout {
  width: 980px !important;
  /* Increased width */
  max-width: 95vw;
  padding: 0 !important;
  /* Remove padding to let internal layout control it */
  display: block;
  overflow: hidden;
}

/* Force Column Layout for Settings Screen forms wrapper */
#settings-screen .setup-forms {
  flex-direction: column !important;
  align-items: center;
  gap: 20px;
}

#settings-screen .btn-save-large {
  transform: scale(1.1);
  /* Make it pop */
}

/* Fix Labels alignment in col */
.settings-col .form-group {
  width: 100%;
  margin: 0;
}

@media (max-width: 768px) {
  .settings-columns {
    flex-direction: column;
  }
}

/* Save Button with Image */
.btn-save-image {
  background: url('./assets/buttons/save.png') no-repeat center center/contain;
  background-color: transparent;
  border: none;
  width: 300px;
  height: 100px;
  cursor: pointer;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
  transition: transform 0.1s;
  margin-top: 1rem;
}

.btn-save-image:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.4));
}

.btn-save-image:active {
  transform: scale(0.95);
}

/* Custom Notification (Toast) */
.toast-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(46, 204, 113, 0.95);
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-family: var(--font-comic);
  font-size: 1.2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 3000;
  opacity: 0;
  animation: toastFadeInOut 3s forwards;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-notification::before {
  content: '✅';
  font-size: 1.5rem;
}

@keyframes toastFadeInOut {
  0% {
    opacity: 0;
    transform: translate(-50%, -20px);
  }

  10% {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  80% {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
}

/* Overlay for In-Game Modals (Transparent Blur) */
.modal-overlay .bokeh-bg {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  filter: none;
  /* Remove the image blur filter */
}

/* --- Modals & Overlays --- */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 1366px;
  height: 768px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2500;
}

.modal-content {
  position: relative;
  z-index: 10;
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 90%;
}

.result-card {
  width: 600px;
  border: 4px solid var(--gold);
}

.confirmation-card {
  width: 500px;
  text-align: center;
}

.modal-title {
  font-family: var(--font-comic);
  font-size: 2.5rem;
  color: var(--gold);
  text-shadow: 2px 2px 0 #000;
  -webkit-text-stroke: 1px #000;
  margin: 0;
}

.winner-display {
  text-align: center;
}

#winner-text {
  font-family: var(--font-comic);
  font-size: 2rem;
  margin-top: 10px;
  color: #2c3e50;
}

.score-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  width: 100%;
  margin: 1rem 0;
}

.team-score-card {
  text-align: center;
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 12px;
  min-width: 150px;
}

.team-score-card h4 {
  font-family: var(--font-comic);
  color: #7f8c8d;
  margin-bottom: 0.5rem;
}

.team-score-card.red h4 {
  color: var(--red-team);
}

.team-score-card.blue h4 {
  color: var(--blue-team);
}

.team-score-card span {
  font-family: var(--font-main);
  font-weight: 900;
  font-size: 1.5rem;
  color: #2c3e50;
}

.vs-divider {
  font-family: var(--font-comic);
  font-weight: 900;
  font-size: 2rem;
  color: #bdc3c7;
}

/* Action Buttons */
.modal-actions {
  display: flex;
  gap: 1rem;
}

.btn-primary-action {
  background: var(--green);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-family: var(--font-comic);
  font-size: 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 0 #27ae60;
  transition: transform 0.1s;
}

.btn-primary-action:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #27ae60;
}

.btn-secondary-action {
  background: #95a5a6;
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-family: var(--font-comic);
  font-size: 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 0 #7f8c8d;
}

.btn-danger-action {
  background: var(--red-team);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-family: var(--font-comic);
  font-size: 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 0 #c0392b;
}

.btn-secondary-action:active,
.btn-danger-action:active {
  transform: translateY(4px);
  box-shadow: none;
}

.confirmation-card p {
  font-size: 1.2rem;
  color: #7f8c8d;
}

/* Habit Tracker Styles */
.habit-tracker {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  border-radius: 30px;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  z-index: 2100;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.habit-tracker.left-side {
  left: 2%;
  /* Adjusted to 2% from edge */
}

.habit-tracker.right-side {
  right: 2%;
  /* Adjusted to 2% from edge */
}

.habit-item {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  border: 2px solid transparent;
}

.habit-icon {
  font-size: 22px;
  opacity: 0.5;
  filter: grayscale(0.8);
  transition: all 0.3s ease;
  user-select: none;
}

/* Hover State */
.habit-item:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

/* Active State (Habit Performed) */
/* Scoring States */
/* Good (Green) */
.habit-item.good {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  box-shadow: 0 0 15px rgba(46, 204, 113, 0.6);
  transform: scale(1.15);
  border-color: #fff;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Average (Yellow - Original Active) */
.habit-item.average {
  background: linear-gradient(135deg, #FFD700, #FDB931);
  box-shadow: 0 0 15px rgba(253, 185, 49, 0.6);
  transform: scale(1.15);
  border-color: #fff;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Bad (Red) */
.habit-item.bad {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  box-shadow: 0 0 15px rgba(231, 76, 60, 0.6);
  transform: scale(1.15);
  border-color: #fff;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.habit-item.good .habit-icon,
.habit-item.average .habit-icon,
.habit-item.bad .habit-icon {
  opacity: 1;
  filter: grayscale(0);
}

/* Tooltip on Hover */
/* Tooltip on Hover - Animated Rounded Box - FIXED */
/* Tooltip HTML Element (Rich Text) */
.habit-tooltip {
  position: absolute;
  background: white;
  color: #2c3e50;
  padding: 8px 16px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  bottom: auto;
  z-index: 9999;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  font-family: 'Outfit', sans-serif;
  width: max-content;
  visibility: hidden;
  text-align: center;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.habit-tooltip strong {
  font-size: 14px;
  font-weight: 800;
  color: #2c3e50;
}

.habit-tooltip small {
  font-size: 11px;
  font-weight: 600;
  color: #7f8c8d;
  /* Lighter/Grey */
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Red Team - Left Side (Slide Right) */
.habit-tracker.left-side .habit-item .habit-tooltip {
  left: 50%;
  top: 50%;
  transform: translateY(-50%) translateX(-20px) scale(0.8);
}

.habit-tracker.left-side .habit-item:hover .habit-tooltip {
  left: 125%;
  /* Move out explicitly */
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0) scale(1);
}

/* Blue Team - Right Side (Slide Left) */
.habit-tracker.right-side .habit-item .habit-tooltip {
  right: 50%;
  top: 50%;
  transform: translateY(-50%) translateX(20px) scale(0.8);
}

.habit-tracker.right-side .habit-item:hover .habit-tooltip {
  right: 125%;
  /* Move out explicitly */
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0) scale(1);
}

/* Ensure Containers Allow Overflow for Tooltips */
.battle-field,
.team-zone,
.habit-tracker,
.habit-tracker.left-side,
.habit-tracker.right-side {
  overflow: visible !important;
}

/* Mobile Responsiveness for Habits */
@media (max-width: 768px) {
  .habit-tracker {
    width: 40px;
    padding: 5px 0;
    gap: 8px;
  }

  .habit-tracker.left-side {
    left: 5px;
  }

  .habit-tracker.right-side {
    right: 5px;
  }

  .habit-item {
    width: 32px;
    height: 32px;
  }

  .habit-icon {
    font-size: 16px;
  }

  .habit-item::after {
    display: none;
    /* Hide tooltips on mobile to save space */
  }
}

/* Day Screen Styles (Split Layout) */
#day-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 1366px;
  height: 768px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2500;
  color: #fff;
  overflow: hidden;
}

.day-screen-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 95%;
  max-width: 1200px;
  position: relative;
  z-index: 20;
  animation: fadeIn 0.5s ease-out;
}

.day-header-center {
  text-align: center;
  margin-bottom: 2rem;
}

.day-title-main {
  font-family: var(--font-comic);
  font-size: 3.5rem;
  color: #f1c40f;
  text-shadow: 0 4px 0 #c0392b;
  margin-bottom: 0.5rem;
}

.day-subtitle-main {
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Split View */
.day-split-view {
  display: flex;
  justify-content: center;
  gap: 130px;
  width: 100%;
  align-items: stretch;
  position: relative;
}

.day-team-panel {
  flex: 1;
  max-width: 450px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s, border-color 0.3s;
}

.day-team-panel:hover {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

.red-panel {
  border-color: #e74c3c;
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.25);
}

.blue-panel {
  border-color: #3498db;
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.25);
}

.dt-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
  width: 100%;
  justify-content: center;
}

.dt-avatar-frame {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  background: #fff;
}

.dt-avatar-frame img {
  width: 100%;
  height: 100%;
}

.dt-header h3 {
  font-family: var(--font-comic);
  font-size: 1.8rem;
  margin: 0;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
  line-height: 1.1;
}

.dt-text-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.dt-team-name {
  font-family: var(--font-main);
  font-size: 1rem;
  color: #ddd;
  font-weight: normal;
  margin-top: 4px;
}

.red-panel h3 {
  color: #e74c3c;
}

.blue-panel h3 {
  color: #3498db;
}

/* ===== Red Team Reversed Layout (User Request) ===== */
/* Tim Merah: tulisan rata kanan & pilihan disebelah kiri rata kiri */
.red-panel .dt-header {
  flex-direction: row-reverse;
}

.red-panel .dt-text-group {
  align-items: flex-end;
  text-align: right;
}

.red-panel .habit-row-item {
  flex-direction: row-reverse;
}

.red-panel .h-left {
  flex-direction: row-reverse;
  gap: 1rem;
  justify-content: flex-start;
}

.red-panel .h-text {
  align-items: flex-end;
  text-align: right;
}

.red-panel .h-right {
  justify-content: flex-start;
}

.red-panel .custom-select-wrapper {
  align-items: flex-start;
}

.red-panel .csd-display {
  text-align: left;
}

.red-panel .csd-panel {
  left: 0;
  right: auto;
}

.red-panel .custom-checkbox {
  margin-left: 6px;
}
/* ===== End Red Team Reversed Layout ===== */

/* Compact List */
.habits-list-compact {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
}

.habit-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Space between Left (Info) and Right (Input) */
  gap: 1rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.8rem 1rem;
  border-radius: 10px;
  transition: background 0.2s;
}

.h-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.habit-row-item:hover {
  background: rgba(255, 255, 255, 0.2);
}

.habit-row-item .h-icon {
  font-size: 2rem;
}

.h-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.habit-row-item .h-name {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  line-height: 1.2;
}

.habit-row-item .h-desc {
  font-family: var(--font-main);
  font-size: 0.8rem;
  color: #f1c40f;
  opacity: 0.8;
}

/* Inputs */
.h-right {
  display: flex;
  align-items: center;
  position: relative; /* Agar panel dropdown bisa absolute di dalamnya */
}

/* ===== CUSTOM DROPDOWN (Pengganti <select> native untuk multi-touch) ===== */
.custom-select-wrapper {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  touch-action: manipulation;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Tampilan tombol dropdown */
.csd-display {
  background: rgba(0, 0, 0, 0.45);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.55);
  padding: 5px 10px 5px 8px;
  border-radius: 7px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  cursor: pointer;
  min-width: 130px;
  white-space: nowrap;
  position: relative;
  touch-action: manipulation;
  transition: border-color 0.2s, background 0.2s;
}
.csd-display::after {
  content: ' ▾';
  font-size: 0.75rem;
  opacity: 0.7;
}
.csd-display.selected {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.6);
}
.csd-display:active {
  background: rgba(255, 255, 255, 0.12);
}

/* Panel daftar pilihan */
.csd-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: rgba(30, 30, 50, 0.97);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  z-index: 9999;        /* Di atas semua elemen lain */
  min-width: 140px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  overflow: hidden;
  touch-action: manipulation;
}
.csd-panel.hidden {
  display: none;
}
/* Panel muncul ke ATAS untuk 2 item dropdown terbawah agar tidak terpotong */
.csd-panel.csd-panel-up {
  top: auto;
  bottom: calc(100% + 4px);
  box-shadow: 0 -8px 24px rgba(0,0,0,0.5);
}

/* Item di dalam panel */
.csd-item {
  padding: 9px 14px;
  color: #eee;
  font-family: var(--font-main);
  font-size: 0.88rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s;
}
.csd-item:not(:last-child) {
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.csd-item:active,
.csd-item:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
/* ===== END CUSTOM DROPDOWN ===== */

/* Checkbox */
.custom-checkbox {
  display: block;
  position: relative;
  padding-left: 0;
  cursor: pointer;
  font-size: 22px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  width: 24px;
  height: 24px;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 24px;
  width: 24px;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 6px;
}

.custom-checkbox:hover input~.checkmark {
  background-color: rgba(0, 0, 0, 0.5);
}

.custom-checkbox input:checked~.checkmark {
  background-color: #2ecc71;
  border-color: #2ecc71;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.custom-checkbox input:checked~.checkmark:after {
  display: block;
}

.custom-checkbox .checkmark:after {
  left: 8px;
  top: 4px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 3px 3px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}

/* ===== Connected Timer Bridge (Links Red and Blue Cards) ===== */
.day-timer-bridge {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 146px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 35;
  pointer-events: none;
}

/* Wings linking center timer to card borders */
.timer-bridge-wing {
  display: flex;
  align-items: center;
  flex: 1;
  height: 100%;
}

.wing-left {
  justify-content: flex-end;
}

.wing-right {
  justify-content: flex-start;
}

/* Anchors clamping onto card borders */
.bridge-anchor {
  width: 12px;
  height: 38px;
  border-radius: 4px;
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.anchor-red {
  background: linear-gradient(135deg, #ff6b6b 0%, #c0392b 100%);
  border: 2px solid #ff7675;
  box-shadow: 0 0 14px rgba(231, 76, 60, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.anchor-blue {
  background: linear-gradient(135deg, #54a0ff 0%, #2980b9 100%);
  border: 2px solid #74b9ff;
  box-shadow: 0 0 14px rgba(52, 152, 219, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Metallic Beams */
.bridge-beam {
  height: 12px;
  flex: 1;
  background: linear-gradient(180deg, #3d4458 0%, #1e2230 50%, #111420 100%);
  border-top: 1.5px solid rgba(255, 255, 255, 0.35);
  border-bottom: 1.5px solid rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  padding: 0 2px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
  position: relative;
}

.beam-energy {
  width: 100%;
  height: 3px;
  border-radius: 2px;
}

.beam-red .beam-energy {
  background: linear-gradient(90deg, #e74c3c 0%, #f39c12 100%);
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.9);
}

.beam-blue .beam-energy {
  background: linear-gradient(90deg, #f39c12 0%, #3498db 100%);
  box-shadow: 0 0 8px rgba(52, 152, 219, 0.9);
}

/* Coupling brackets where beam meets timer rim */
.bridge-connector-ring {
  width: 6px;
  height: 22px;
  border-radius: 3px;
  background: linear-gradient(180deg, #f9ca24, #f39c12);
  border: 1px solid #ffeaa7;
  box-shadow: 0 0 8px rgba(241, 196, 15, 0.6);
  flex-shrink: 0;
  z-index: 6;
}

/* Central Circular Timer Unit */
#day-timer-container {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #1e2538 0%, #0d111d 85%);
  border: 3px solid #f1c40f;
  box-shadow:
    0 0 22px rgba(241, 196, 15, 0.45),
    0 8px 24px rgba(0, 0, 0, 0.7),
    inset 0 0 14px rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  z-index: 10;
  pointer-events: auto;
}

.timer-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 7;
}

.timer-circle-fg {
  fill: none;
  stroke: #f1c40f;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 5px rgba(241, 196, 15, 0.8));
  transition: stroke-dashoffset 1s linear;
}

.timer-content-inner {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  margin-top: 1px;
}

.timer-text {
  position: static;
  font-family: var(--font-comic);
  font-size: 2.1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 10px rgba(241, 196, 15, 0.6), 0 2px 4px rgba(0, 0, 0, 0.9);
}

.timer-label {
  font-family: var(--font-main);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #f1c40f;
  opacity: 0.85;
  margin-top: 1px;
  text-transform: uppercase;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Learning Screen Styles --- */
#learning-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 1366px;
  height: 768px;
  z-index: 2200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  /* Space between title and card */
}

#learning-screen.hidden {
  display: none !important;
}

.learning-title-overlay {
  z-index: 120;
  margin-top: -10px;
  margin-bottom: 8px;
  text-align: center;
  transform: scale(1.15);
}

.learning-content {
  position: relative;
  width: 95%;
  max-width: 1100px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 2.5rem 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 100;
  animation: fadeIn 0.5s ease-out;
}

.learning-scroll-box {
  width: 100%;
  max-height: 58vh;
  overflow-y: auto;
  background: transparent;
  border: none;
  padding: 0.5rem 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) #eee;
}

.learning-scroll-box::-webkit-scrollbar {
  width: 8px;
}

.learning-scroll-box::-webkit-scrollbar-track {
  background: #eee;
  border-radius: 4px;
}

.learning-scroll-box::-webkit-scrollbar-thumb {
  background-color: var(--gold);
  border-radius: 4px;
}

/* Learning Card Model (Matching Tutorial Card) */
.tutorial-step-badge.learning-badge {
  background: linear-gradient(135deg, #16a085, #1abc9c);
}

.learning-card .dist-examples {
  background: #fdfefe;
  border-left: 3px solid #3498db;
  padding: 8px 14px;
  border-radius: 0 8px 8px 0;
  margin: 10px 0;
}

.learning-card .dist-examples p {
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.learning-card .dist-examples p:last-child {
  margin-bottom: 0;
}

.learning-card .game-context-box {
  background: linear-gradient(135deg, #e8f8f5, #f0fdf4);
  border: 1px solid #a3e4d7;
  border-left: 5px solid #16a085;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  margin-top: 10px;
}

.learning-card .game-context-box strong {
  display: block;
  font-family: var(--font-comic);
  color: #16a085;
  margin-bottom: 0.3rem;
  font-size: 1.05rem;
}

.learning-card .game-context-box p {
  margin: 0;
  font-size: 0.95rem;
  color: #34495e;
  line-height: 1.5;
}

.learning-card .profit-calc {
  background: #ffffff;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.learning-card .calc-example h4 {
  font-family: var(--font-comic);
  color: #2c3e50;
  font-size: 0.95rem;
  margin: 4px 0;
}

.learning-card .calc-row {
  font-family: var(--font-main);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: 4px;
}

.learning-card .highlight {
  color: #27ae60;
  font-weight: 700;
}

.learning-card .habit-indicators {
  list-style: none;
  padding-left: 0;
  display: flex;
  gap: 16px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.learning-card .habit-list {
  padding-left: 1.2rem;
  margin: 6px 0 0 0;
}

.learning-card .habit-list li {
  margin-bottom: 6px;
}

.learning-card .habit-list em {
  display: inline;
  background: transparent;
  border: none;
  padding: 0;
  color: #7f8c8d;
  font-style: italic;
}

.learning-actions {
  display: none;
}

/* Next Button (Top Right - Shared) */
.btn-next {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: url('./assets/buttons/next.png') no-repeat center center/contain;
  background-color: transparent;
  width: 60px;
  height: 60px;
  border: none;
  cursor: pointer;
  z-index: 110;
  transition: transform 0.2s;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.btn-next:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

/* Vertical Tab Layout */
.settings-layout-tabs {
  display: flex !important;
  width: 100%;
  height: 480px;
  /* Increased height for credits */
  /* Fixed height for consistency */
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  flex-direction: row !important;
  /* Force row */
}

.settings-sidebar {
  width: 30%;
  min-width: 150px;
  background: #f8f9fa;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
}

.tab-btn {
  padding: 15px 20px;
  text-align: left;
  border: none;
  background: transparent;
  width: 100%;
  cursor: pointer;
  font-family: 'Comic Neue', cursive, sans-serif;
  /* Hardcode font just in case */
  font-weight: bold;
  font-size: 1rem;
  color: #555;
  transition: all 0.2s;
  border-bottom: 1px solid #eee;
}

.tab-btn:hover {
  background: #e9ecef;
}

.tab-btn.active {
  background: #fff;
  color: #f1c40f;
  /* Gold accent */
  border-left: 5px solid #f1c40f;
  border-right: none;
  position: relative;
  z-index: 2;
  margin-right: -1px;
  /* Overlap border */
}

.settings-content-area {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  position: relative;
  background: #fff;
}

.tab-pane {
  display: none;
  /* Hide by default */
  animation: fadeIn 0.3s;
}

.tab-pane.active {
  display: block !important;
}

.tab-title {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f1c40f;
  color: #333;
}

/* Adjust form groups for single column flow in tabs */
.tab-pane .form-group {
  margin-bottom: 15px;
}

.tab-pane .form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  color: #555;
}

.tab-pane .form-group input,
.tab-pane .form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* --- MERGED TEMP STYLES --- */

/* Source: temp_strict_spacing.css */
/* Strict Spacing Fix */
.calc-example p {
  margin-bottom: 0px !important;
  padding-bottom: 2px !important;
}

.calc-total {
  margin-top: 2px !important;
  padding-top: 4px !important;
  border-top: 1px dashed #bbb;
  line-height: 1.3;
}

/* Source: temp_font_fix.css */
/* Strategy Section Font Fix */
.strategy-section li {
  font-size: 1.1rem !important;
  /* Match standard learning-section p size */
}

/* Source: temp_dist_styles.css */
/* Distribution Examples Spacing */
.dist-examples p {
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

/* Source: temp_strategy_styles.css */
/* Strategy Section Styles */
.strategy-section {
  border-top: 2px dashed #bbb;
  padding-top: 1.5rem;
  margin-top: 2rem;
  background: #fdfefe;
}

.strategy-section h3 {
  color: #d35400;
  /* Distinct orange/red color */
  text-align: center;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.strategy-section ul {
  list-style: none;
  padding: 0;
}

.strategy-section li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
  font-family: var(--font-main);
  color: #34495e;
  line-height: 1.5;
}

.strategy-section li::before {
  content: "★";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-size: 1.2rem;
}

.strategy-section strong {
  color: #c0392b;
  font-weight: 700;
}

/* Source: temp_profit_calc.css */
/* Profit Calculation Styles */
.profit-calc {
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.6);
  padding: 1rem;
  border-radius: 8px;
  border: 1px dashed #16a085;
}

.profit-calc p {
  margin-bottom: 0.5rem;
}

.calc-example {
  background: #fff;
  padding: 0.8rem;
  border-radius: 6px;
  margin-top: 0.5rem;
}

.calc-example h4 {
  font-family: var(--font-main);
  color: #2c3e50;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  text-decoration: underline;
}

.calc-example ul {
  list-style: none;
  padding-left: 0.5rem;
  margin-bottom: 0.5rem;
}

.calc-example li {
  font-family: var(--font-main);
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.calc-example .highlight {
  color: #27ae60;
  font-weight: bold;
  font-size: 1.1rem;
}

.calc-total {
  border-top: 2px solid #eee;
  padding-top: 0.5rem;
  font-weight: bold;
  color: #2c3e50;
  width: 100%;
  text-align: right;
}

/* Source: temp_habits_styles_retry.css */
/* Habits Section Styling */
.habits-section {
  border-top: 2px dashed #bbb;
  padding-top: 1.5rem;
  margin-top: 2rem;
  background: #fdfefe;
}

.habits-section h3 {
  color: #8e44ad;
  /* Purple for habits */
  text-align: center;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Indicators */
.habit-indicators {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem !important;
}

.habit-indicators li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem !important;
  background: #f4f6f7;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.dot.green {
  background: #2ecc71;
  box-shadow: 0 0 5px #2ecc71;
}

.dot.yellow {
  background: #f1c40f;
  box-shadow: 0 0 5px #f1c40f;
}

.dot.red {
  background: #e74c3c;
  box-shadow: 0 0 5px #e74c3c;
}

/* Habit List */
.habit-list {
  padding-left: 0;
  list-style: none;
}

.habit-list li {
  font-family: var(--font-main) !important;
  font-size: 1.1rem !important;
  line-height: 1.6 !important;
  color: #2c3e50 !important;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.habit-list strong {
  min-width: 150px;
  /* Wider to accommodate emoji */
  display: inline-block;
  color: #2980b9;
}

.habit-list em {
  display: inline;
  background: none;
  padding: 0;
  border: none;
  font-style: italic;
  color: #e67e22;
  font-weight: bold;
}

/* Source: temp_learning_context.css */
/* Game Context Box in Learning Screen */
.game-context-box {
  background: #e8f6f3;
  /* Light Teal/Greenish to match 'game' vibe or safe color */
  border-left: 5px solid var(--green);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 0.8rem;
}

.game-context-box strong {
  display: block;
  font-family: var(--font-comic);
  color: #16a085;
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
}

.game-context-box p {
  margin: 0;
  font-size: 1rem;
  color: #34495e;
  line-height: 1.5;
}

/* Source: temp_style_inline.css */
/* Inline Form Row */
.form-row-inline {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.form-row-inline .form-group {
  flex: 1;
}

.form-row-inline .form-group input {
  width: 100%;
  /* Ensure input takes full width of its half */
}

/* Source: temp_list_fix.css */
/* Fix Strategy List styling to match Paragraphs exactly */
.learning-section ul {
  padding-left: 1.2rem;
  /* Indent list slightly */
  margin-bottom: 1rem;
}

.learning-section li {
  font-family: var(--font-main);
  color: #2c3e50;
  /* Same color as p */
  line-height: 1.6;
  /* Same line-height as p */
  font-size: 1.1rem;
  /* Same font-size as p */
  margin-bottom: 0.8rem;
  /* Spacing between list items */
}

/* Source: temp_spacing.css */
/* Tight Profit Calc Spacing */
.profit-calc p {
  margin-bottom: 0.2rem;
  /* Reduced from 0.5rem */
}

.calc-example p {
  margin-bottom: 0;
  /* Remove bottom margin for lines inside calc box */
}

/* Ensure the total top border is close to previous line */
.calc-total {
  margin-top: 0.2rem !important;
  padding-top: 0.2rem !important;
  border-top: 1px dashed #ccc;
}

/* Source: temp_calc_layout.css */
/* Updated layout for calculation row */
.calc-row {
  font-family: var(--font-main);
  color: #555;
  font-size: 1rem;
  /* Slightly larger than before */
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Ensure the total text stands out */
.calc-total {
  margin-top: 0.5rem;
  border-top: 1px dashed #ccc;
  /* Changed to dashed for lighter feel */
  padding-top: 0.5rem;
  color: #2c3e50;
  font-size: 1rem;
}

/* Source: temp_force_match.css */
/* FORCE EXACT MATCH */
.strategy-section ul,
.strategy-section li {
  font-family: var(--font-main) !important;
  font-size: 1.1rem !important;
  /* EXACT match to learning-section p */
  line-height: 1.6 !important;
  /* EXACT match to learning-section p */
  color: #2c3e50 !important;
}

.strategy-section li {
  margin-bottom: 0.8rem;
}

/* Habit Tooltip Refinement */
.habit-tooltip {
  text-align: left !important;
  padding: 8px 12px !important;
  line-height: 1.2 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  align-items: flex-start !important;
  white-space: nowrap !important;
  /* Prevent wrapping in weird ways */
}

.ht-title {
  font-weight: bold;
  font-size: 1rem;
  color: #2c3e50;
  margin: 0;
  padding: 0;
  text-align: left;
  display: block;
}

.ht-data {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
  padding: 0;
  text-align: left;
  display: block;
}

/* --- REFLECTION SCREEN STYLES --- */
.reflection-card {
  width: 95% !important;
  max-width: 1200px !important;
  max-height: 90vh;
  /* Prevent overflowing screen */
  display: flex !important;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  /* Header/Footer static, body scroll */
  padding: 0 !important;
  /* Reset default padding */
  background: white;
  border-radius: 15px;
  position: relative;
}

.reflection-card .modal-title {
  margin-top: 1.5rem;
  flex-shrink: 0;
}

.reflection-split {
  display: flex;
  width: 95%;
  gap: 2rem;
  margin: 1rem 0;
  flex: 1;
  overflow-y: auto;
  /* Scrollable content area */
  padding: 1rem;
}

.modal-actions-finish {
  padding: 1.5rem;
  width: 100%;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-shrink: 0;
  /* Sticky bottom look */
  border-radius: 0 0 15px 15px;
}

.ref-col {
  flex: 1;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 1.5rem;
  padding-bottom: 2rem;
  border: 4px solid #000;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  height: auto;
  min-height: fit-content;
}

.ref-col.red-ref {
  border-color: #e74c3c;
}

.ref-col.blue-ref {
  border-color: #3498db;
}

/* --- CREDITS STYLES (CLI) --- */
.cli-terminal {
  background: #1e1e1e;
  color: #ccc;
  font-family: 'Consolas', 'Courier New', monospace;
  padding: 15px;
  border-radius: 6px;
  border: 2px solid #555;
  height: 350px;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.4;
}

.cli-line {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cli-prompt {
  color: #0f0;
  font-weight: bold;
}

.cli-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #0f0;
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.cli-section {
  margin-bottom: 15px;
  border-left: 2px solid #444;
  padding-left: 10px;
}

.cli-key {
  color: #5dade2;
  font-weight: bold;
  letter-spacing: 1px;
}

.cli-val {
  color: #ddd;
}

.cli-sub {
  font-size: 0.8rem;
  color: #777;
  font-style: italic;
}

.ref-team-title {
  font-family: var(--font-comic);
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
  text-decoration: underline;
}

.ref-col.red-ref .ref-team-title {
  color: #c0392b;
}

.ref-col.blue-ref .ref-team-title {
  color: #2980b9;
}

.ref-details {
  font-family: var(--font-main);
  text-align: left;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
}

.ref-details ul {
  padding-left: 20px;
  list-style-type: none;
}

.ref-details li {
  margin-bottom: 8px;
  position: relative;
}

.ref-details li::before {
  padding: 8px 12px !important;
  line-height: 1.2 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  align-items: flex-start !important;
  white-space: nowrap !important;
  /* Prevent wrapping in weird ways */
}

.ht-title {
  font-weight: bold;
  font-size: 1rem;
  color: #2c3e50;
  margin: 0;
  padding: 0;
  text-align: left;
  display: block;
}

.ht-data {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
  padding: 0;
  text-align: left;
  display: block;
}

/* --- REFLECTION SCREEN STYLES --- */
.reflection-card {
  width: 95% !important;
  max-width: 1200px !important;
  max-height: 90vh;
  /* Prevent overflowing screen */
  display: flex !important;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  /* Header/Footer static, body scroll */
  padding: 0 !important;
  /* Reset default padding */
  background: white;
  border-radius: 15px;
  position: relative;
}

.reflection-card .modal-title {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

.reflection-main-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex: 1;
  overflow-y: auto;
  padding: 0 1rem;
}

.reflection-split {
  display: flex;
  width: 100%;
  gap: 2rem;
  margin: 1rem 0;
  flex-shrink: 0;
  padding: 1rem 0;
}

.modal-actions-finish {
  padding: 1.5rem;
  width: 100%;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-shrink: 0;
  /* Sticky bottom look */
  border-radius: 0 0 15px 15px;
}

.ref-col {
  flex: 1;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 1.5rem;
  padding-bottom: 2rem;
  border: 4px solid #000;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  height: auto;
  min-height: fit-content;
}

.ref-col.red-ref {
  border-color: #e74c3c;
}

.ref-col.blue-ref {
  border-color: #3498db;
}

/* --- CREDITS STYLES (CLI) --- */
.cli-terminal {
  background: #1e1e1e;
  color: #ccc;
  font-family: 'Consolas', 'Courier New', monospace;
  padding: 15px;
  border-radius: 6px;
  border: 2px solid #555;
  height: 350px;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.4;
}

.cli-line {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cli-prompt {
  color: #0f0;
  font-weight: bold;
}

.cli-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #0f0;
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.cli-section {
  margin-bottom: 15px;
  border-left: 2px solid #444;
  padding-left: 10px;
}

.cli-key {
  color: #5dade2;
  font-weight: bold;
  letter-spacing: 1px;
}

.cli-val {
  color: #ddd;
}

.cli-sub {
  font-size: 0.8rem;
  color: #777;
  font-style: italic;
}

.ref-team-title {
  font-family: var(--font-comic);
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
  text-decoration: underline;
}

.ref-col.red-ref .ref-team-title {
  color: #c0392b;
}

.ref-col.blue-ref .ref-team-title {
  color: #2980b9;
}

.ref-details {
  font-family: var(--font-main);
  text-align: left;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
}

.ref-details ul {
  padding-left: 20px;
  list-style-type: none;
}

.ref-details li {
  margin-bottom: 8px;
  position: relative;
}

.ref-details li::before {
  content: "👉";
  position: absolute;
  left: -25px;
}

/* Responsiveness for Reflection */
@media (max-width: 768px) {
  .reflection-split {
    flex-direction: column;
  }
}
/* Optimasi Multi-Touch */
button, .btn-action-img, .habit-item { touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; }

/* ===== DAILY WINNER BANNER ===== */
.daily-winner-banner {
  margin: 0 0 14px 0;
}
.dwb-inner {
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(240,240,255,0.9));
  border: 3px solid #f1c40f;
  border-radius: 14px;
  padding: 12px 20px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.dwb-day {
  font-family: var(--font-comic);
  font-size: 0.85rem;
  font-weight: bold;
  color: #888;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.dwb-label {
  font-family: var(--font-main);
  font-size: 0.8rem;
  color: #aaa;
  margin-bottom: 4px;
}
.dwb-winner {
  font-family: var(--font-comic);
  font-size: 1.8rem;
  font-weight: 900;
  text-shadow: 1px 2px 0 rgba(0,0,0,0.1);
  margin-bottom: 8px;
}
.dwb-scores {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  flex-wrap: wrap;
}
.dwb-vs {
  color: #bbb;
  font-size: 0.75rem;
}
.dwb-saldo {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #777;
  font-family: var(--font-main);
}

/* ===== REKAP SEMUA HARI ===== */
.all-days-recap {
  margin: 0 0 14px 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.97), rgba(230,240,255,0.95));
  border: 2px solid rgba(100,100,200,0.25);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.recap-header {
  font-family: var(--font-comic);
  font-size: 1.05rem;
  font-weight: 900;
  color: #333;
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.recap-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-main);
  font-size: 0.82rem;
}
.recap-table thead tr {
  background: rgba(50, 50, 100, 0.08);
}
.recap-table th {
  padding: 6px 8px;
  text-align: center;
  font-weight: 700;
  font-size: 0.8rem;
  border-bottom: 2px solid rgba(0,0,0,0.1);
}
.recap-table td {
  padding: 5px 8px;
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.recap-table tbody tr:hover {
  background: rgba(100,100,200,0.05);
}
.recap-day { font-weight: 600; color: #555; }
.recap-red  { color: #c0392b; font-weight: 600; }
.recap-blue { color: #2980b9; font-weight: 600; }
.recap-winner { font-weight: 700; font-size: 0.78rem; }
.recap-total-row {
  background: rgba(50,50,100,0.06);
}
.recap-total-row td {
  padding: 7px 8px;
  border-top: 2px solid rgba(0,0,0,0.12);
  font-size: 0.85rem;
}
.recap-wins {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 10px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  flex-wrap: wrap;
}
.recap-champion {
  text-align: center;
  font-family: var(--font-comic);
  font-size: 1.1rem;
  font-weight: 900;
  margin-top: 10px;
  padding: 8px;
  background: rgba(241,196,15,0.12);
  border-radius: 8px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.08);
}
/* ===== END REKAP ===== */

/* ===== TUJUAN PEMBELAJARAN SCREEN ===== */
#objectives-screen {
  flex-direction: column;
  z-index: 2100;
}

#objectives-screen.hidden,
#tutorial-screen.hidden {
  display: none !important;
}

.objectives-title-overlay,
.tutorial-title-overlay {
  z-index: 120;
  margin-top: -10px;
  margin-bottom: 8px;
  text-align: center;
  transform: scale(1.15);
}

.objectives-content,
.tutorial-content {
  position: relative;
  width: 95%;
  max-width: 1100px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 2.5rem 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 100;
  animation: fadeIn 0.5s ease-out;
}

.objectives-scroll-box,
.tutorial-scroll-box {
  width: 100%;
  max-height: 58vh;
  overflow-y: auto;
  padding: 0.5rem 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) #eee;
}

.objectives-scroll-box::-webkit-scrollbar,
.tutorial-scroll-box::-webkit-scrollbar {
  width: 8px;
}

.objectives-scroll-box::-webkit-scrollbar-track,
.tutorial-scroll-box::-webkit-scrollbar-track {
  background: #eee;
  border-radius: 4px;
}

.objectives-scroll-box::-webkit-scrollbar-thumb,
.tutorial-scroll-box::-webkit-scrollbar-thumb {
  background-color: var(--gold);
  border-radius: 4px;
}

/* --- Objectives Cards --- */
.objectives-card {
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  border: 2px solid #e8ecf1;
  border-radius: 16px;
  padding: 1.5rem 1.8rem;
  margin-bottom: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.objectives-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.objectives-card:last-child {
  margin-bottom: 0;
}

.objectives-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.objectives-icon {
  font-size: 2rem;
  line-height: 1;
}

.objectives-header h3 {
  font-family: var(--font-comic);
  color: #2c3e50;
  font-size: 1.25rem;
  margin: 0;
}

.objectives-card p {
  font-family: var(--font-main);
  color: #34495e;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
}

.objectives-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 16px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

/* TP List */
.tp-list {
  padding-left: 1.2rem;
  margin: 0;
  list-style: none;
  counter-reset: tp-counter;
}

.tp-list li {
  font-family: var(--font-main);
  color: #34495e;
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 10px;
  padding-left: 8px;
  counter-increment: tp-counter;
  position: relative;
}

.tp-list li::before {
  content: counter(tp-counter) ".";
  position: absolute;
  left: -18px;
  color: #3498db;
  font-weight: 900;
  font-family: var(--font-main);
}

.tp-list li strong {
  color: #c0392b;
}

/* Competency Grid */
.competency-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.competency-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0f4f8;
  border-radius: 10px;
  padding: 10px 14px;
}

.competency-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  font-family: var(--font-comic);
  font-size: 0.9rem;
  font-weight: 900;
  border-radius: 50%;
  flex-shrink: 0;
}

.competency-item span:last-child {
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: #2c3e50;
  line-height: 1.4;
}

/* Highlight card */
.objectives-card.highlight-card,
.tutorial-card.highlight-card {
  background: linear-gradient(135deg, #fff8e1, #fffde7);
  border-color: var(--gold);
  border-width: 2px;
}

/* ===== PANDUAN BERMAIN / TUTORIAL SCREEN ===== */
#tutorial-screen {
  flex-direction: column;
  z-index: 2100;
}

/* --- Tutorial Cards --- */
.tutorial-card {
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  border: 2px solid #e8ecf1;
  border-radius: 16px;
  padding: 1.3rem 1.8rem;
  margin-bottom: 0.8rem;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tutorial-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.tutorial-card:last-child {
  margin-bottom: 0;
}

.tutorial-step-badge {
  display: inline-block;
  padding: 4px 14px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
  font-family: var(--font-comic);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 20px;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.tutorial-card h3 {
  font-family: var(--font-comic);
  color: #2c3e50;
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.tutorial-card p {
  font-family: var(--font-main);
  color: #34495e;
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
}

.tutorial-card ul {
  padding-left: 1.3rem;
  margin: 0;
}

.tutorial-card li {
  font-family: var(--font-main);
  color: #34495e;
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 4px;
}

.tutorial-card li strong {
  color: #c0392b;
}

/* Reuse dot indicators from learning section */
.tutorial-card .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  vertical-align: middle;
}

.tutorial-card .dot.green { background: var(--green); }
.tutorial-card .dot.yellow { background: var(--gold); }
.tutorial-card .dot.red { background: var(--red-team); }
/* ===== END TUJUAN & PANDUAN ===== */
