/* ==========================================================================
   SISTEM KOMPUTER - STYLESHEET v2.0
   Adventure Game Map, Immersive UI, Touch & Whiteboard Friendly
   ========================================================================== */

:root {
  --bg-main: #0d1117;
  --bg-surface: #161b22;
  --bg-card: #1c2433;
  --bg-subtle: #21262d;
  --border-subtle: #30363d;
  --border-glow: rgba(99, 102, 241, 0.4);

  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --text-inverse: #0d1117;

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.15);
  --primary-glow: 0 0 20px rgba(99, 102, 241, 0.4);

  --team-a: #f97316;
  --team-a-light: rgba(249, 115, 22, 0.15);
  --team-a-border: rgba(249, 115, 22, 0.4);
  --team-a-glow: 0 0 16px rgba(249, 115, 22, 0.35);

  --team-b: #06b6d4;
  --team-b-light: rgba(6, 182, 212, 0.15);
  --team-b-border: rgba(6, 182, 212, 0.4);
  --team-b-glow: 0 0 16px rgba(6, 182, 212, 0.35);

  --success: #22c55e;
  --success-light: rgba(34, 197, 94, 0.15);
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.15);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.15);

  --gold: #fbbf24;
  --gold-glow: 0 0 20px rgba(251, 191, 36, 0.4);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-xl: 0 16px 40px rgba(0,0,0,0.6);

  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: hidden;
  user-select: none;
}

/* =============================================================================
   TOP NAVIGATION
   ============================================================================= */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-group { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.brand-logo {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: white;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--primary-glow);
}

.brand-text h1 {
  font-size: 1.05rem; font-weight: 800;
  letter-spacing: -0.02em; color: var(--text-primary); line-height: 1.1;
}

.badge-bab {
  font-size: 0.68rem; font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 2px 8px; border-radius: var(--radius-full);
  display: inline-block;
}

.team-score-bar {
  display: flex; align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 4px; border-radius: var(--radius-full); gap: 6px;
}

.team-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: var(--radius-full);
  transition: var(--transition); cursor: pointer;
}

.team-a-pill { background: var(--team-a-light); border: 1px solid var(--team-a-border); }
.team-b-pill { background: var(--team-b-light); border: 1px solid var(--team-b-border); }
.team-avatar { font-size: 1.2rem; line-height: 1; }
.team-info { display: flex; flex-direction: column; }
.team-info.right-align { text-align: right; }
.team-name { font-size: 0.75rem; font-weight: 700; color: var(--text-secondary); line-height: 1.1; }
.team-score-num { font-size: 0.9rem; font-weight: 800; color: var(--text-primary); line-height: 1.1; }
.vs-divider { font-size: 0.65rem; font-weight: 800; color: var(--text-muted); }

.top-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.icon-btn {
  background: var(--bg-subtle); border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px; height: 36px; border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}
.icon-btn:hover { background: var(--bg-card); color: var(--text-primary); border-color: var(--primary); }

.hidden { display: none !important; }

/* =============================================================================
   APP MAIN & VIEW SWITCHER
   ============================================================================= */
.app-main { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }

.view-section { display: none; width: 100%; flex: 1; flex-direction: column; animation: fadeIn 0.3s ease-out; }
.view-section.active { display: flex; }

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

/* =============================================================================
   VIEW 1: ADVENTURE MAP
   ============================================================================= */
.map-stats-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px 14px;
  background: linear-gradient(180deg, var(--bg-surface) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-subtle);
  gap: 20px;
  position: relative;
  z-index: 5;
}

.map-world-tag {
  font-size: 0.72rem; font-weight: 800;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 2px 10px; border-radius: var(--radius-full);
  display: inline-block; margin-bottom: 4px;
}
.map-world-title { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; }
.map-world-desc { font-size: 0.85rem; color: var(--text-secondary); margin-top: 2px; }

.map-progress-card {
  min-width: 240px;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  padding: 12px 16px; border-radius: var(--radius-md);
}
.progress-label-row {
  display: flex; justify-content: space-between;
  font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 6px;
}
.progress-label-row strong { color: var(--primary); font-weight: 800; }
.progress-track { height: 8px; background: var(--bg-subtle); border-radius: var(--radius-full); overflow: hidden; margin-bottom: 6px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #10b981); border-radius: var(--radius-full); transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.progress-active-hint { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }

/* --- Adventure Map Canvas (Game-Style) --- */
.adventure-map-canvas {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 640px;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(249, 115, 22, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, #0d1117 0%, #0a1628 50%, #0d1117 100%);
}

/* Decorative Background Elements */
.map-bg-deco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.deco-cloud, .deco-star, .deco-tree, .deco-mountain, .deco-flag {
  position: absolute; font-size: 2rem; opacity: 0.25; animation: floatDeco 6s ease-in-out infinite;
}
.deco-cloud-1 { top: 8%; left: 5%; font-size: 2.5rem; animation-delay: 0s; }
.deco-cloud-2 { top: 15%; right: 8%; font-size: 1.8rem; animation-delay: -2s; }
.deco-cloud-3 { top: 5%; left: 40%; animation-delay: -4s; }
.deco-star-1 { top: 25%; left: 8%; font-size: 1.2rem; animation-delay: -1s; }
.deco-star-2 { top: 55%; right: 5%; font-size: 1rem; animation-delay: -3s; }
.deco-star-3 { bottom: 30%; left: 12%; font-size: 1.4rem; animation-delay: -5s; }
.deco-tree-1 { bottom: 10%; left: 3%; font-size: 2.5rem; opacity: 0.3; animation: none; }
.deco-tree-2 { bottom: 8%; right: 4%; font-size: 2rem; opacity: 0.3; animation: none; }
.deco-tree-3 { bottom: 5%; left: 45%; font-size: 1.8rem; opacity: 0.2; animation: none; }
.deco-mountain { top: 40%; right: 2%; font-size: 3rem; opacity: 0.15; animation: none; }
.deco-flag { top: 12%; right: 15%; font-size: 2rem; opacity: 0.2; animation-delay: -2.5s; }

@keyframes floatDeco {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

/* SVG Path Connector */
.map-path-svg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1; overflow: visible;
}

/* Adventure Nodes Layer */
.adventure-nodes-layer {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 3;
}

/* --- Individual Adventure Node (Game Waypoint Style) --- */
.adv-node {
  position: absolute;
  width: 130px;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.22s var(--bounce);
}

.adv-node:hover .adv-node-orb { transform: scale(1.1); }
.adv-node:hover .adv-node-label { opacity: 1; transform: translateY(0); }

/* Orb (the clickable dot) */
.adv-node-orb {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative;
  transition: transform 0.22s var(--bounce), box-shadow 0.22s ease;
  cursor: pointer;
  flex-shrink: 0;
}
.adv-node-icon-wrap {
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary);
}
.adv-node.quiz-node .adv-node-icon-wrap svg { stroke: var(--gold); }
.adv-node.final-node .adv-node-icon-wrap svg { stroke: var(--danger); }

.adv-node.locked .adv-node-orb {
  background: linear-gradient(135deg, #1e2430, #161c27);
  border: 3px solid #2a3040;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  filter: grayscale(0.6);
  opacity: 0.6;
  cursor: not-allowed;
}

.adv-node.unlocked .adv-node-orb {
  background: linear-gradient(135deg, #1e2a4a, #263552);
  border: 3px solid rgba(99, 102, 241, 0.5);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25), 0 0 0 6px rgba(99, 102, 241, 0.08);
  animation: orbPulse 2.5s ease-in-out infinite;
}

.adv-node.completed .adv-node-orb {
  background: linear-gradient(135deg, #1a3a2a, #22c55e22);
  border: 3px solid rgba(34, 197, 94, 0.6);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.2);
  animation: none;
}

.adv-node.quiz-node.unlocked .adv-node-orb {
  background: linear-gradient(135deg, #3a2a0a, #fbbf2422);
  border: 3px solid rgba(251, 191, 36, 0.6);
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3), 0 0 0 6px rgba(251, 191, 36, 0.08);
  animation: orbGold 2.5s ease-in-out infinite;
}

.adv-node.final-node .adv-node-orb {
  width: 90px; height: 90px; font-size: 2rem;
  background: linear-gradient(135deg, #3a1a3a, #ef444422);
  border: 3px solid rgba(239, 68, 68, 0.6);
  box-shadow: 0 6px 24px rgba(239, 68, 68, 0.3), 0 0 0 8px rgba(239, 68, 68, 0.08);
  animation: orbFire 1.8s ease-in-out infinite;
}

@keyframes orbPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25), 0 0 0 6px rgba(99, 102, 241, 0.08); }
  50% { box-shadow: 0 4px 28px rgba(99, 102, 241, 0.45), 0 0 0 10px rgba(99, 102, 241, 0.15); }
}
@keyframes orbGold {
  0%, 100% { box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3), 0 0 0 6px rgba(251, 191, 36, 0.08); }
  50% { box-shadow: 0 4px 28px rgba(251, 191, 36, 0.5), 0 0 0 12px rgba(251, 191, 36, 0.12); }
}
@keyframes orbFire {
  0%, 100% { box-shadow: 0 6px 24px rgba(239, 68, 68, 0.3), 0 0 0 8px rgba(239, 68, 68, 0.08); }
  50% { box-shadow: 0 6px 36px rgba(239, 68, 68, 0.55), 0 0 0 14px rgba(239, 68, 68, 0.15); }
}

/* Step Number Badge on Orb */
.adv-node-step {
  position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 0.65rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-main);
}
.adv-node.locked .adv-node-step { background: #2a3040; color: var(--text-muted); }
.adv-node.unlocked .adv-node-step { background: var(--primary); color: white; }
.adv-node.completed .adv-node-step { background: var(--success); color: white; }
.adv-node.quiz-node .adv-node-step { background: var(--gold); color: #1a0a00; }
.adv-node.final-node .adv-node-step { background: var(--danger); color: white; width: 26px; height: 26px; font-size: 0.7rem; }

/* Node Label Tag */
.adv-node-label {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  width: 150px;
  text-align: center;
  box-shadow: var(--shadow-md);
  opacity: 0.85;
  transform: translateY(2px);
  transition: var(--transition);
  pointer-events: none;
}
.adv-node:hover .adv-node-label, .adv-node.active-focus .adv-node-label { opacity: 1; transform: translateY(0); }
.adv-node.unlocked .adv-node-label { border-color: rgba(99, 102, 241, 0.3); }
.adv-node.completed .adv-node-label { border-color: rgba(34, 197, 94, 0.3); }
.adv-node.quiz-node.unlocked .adv-node-label { border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.06); }

.adv-node-label-title {
  font-size: 0.75rem; font-weight: 800;
  color: var(--text-primary); line-height: 1.2;
  display: block;
}
.adv-node-label-status {
  display: inline-block; margin-top: 4px;
  font-size: 0.62rem; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-full);
}
.status-locked { background: #2a3040; color: var(--text-muted); }
.status-open { background: var(--primary-light); color: var(--primary); border: 1px solid rgba(99, 102, 241, 0.3); }
.status-done { background: var(--success-light); color: var(--success); }
.status-gold { background: var(--warning-light); color: var(--warning); }
.status-fire { background: var(--danger-light); color: var(--danger); }

/* =============================================================================
   FAMILY 100 ARENA
   ============================================================================= */
.game-arena-container {
  max-width: 1040px; margin: 16px auto 30px;
  width: 94%; display: flex; flex-direction: column; gap: 14px;
}

.f100-header { display: flex; align-items: center; justify-content: space-between; }
.f100-title-pill { display: flex; align-items: center; gap: 12px; }
.f100-icon { font-size: 1.8rem; }
.f100-title-text h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.f100-title-text span { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.f100-question-counter {
  font-size: 0.8rem; font-weight: 700;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  padding: 6px 14px; border-radius: var(--radius-full); color: var(--text-secondary);
}

.f100-team-board { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }

.f100-team-card {
  background: var(--bg-card); border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 14px;
  transition: var(--transition); box-shadow: var(--shadow-sm);
}
.f100-team-card.active-turn { box-shadow: var(--shadow-md); }
#f100CardTeamA.active-turn { border-color: var(--team-a); box-shadow: var(--team-a-glow); }
#f100CardTeamB.active-turn { border-color: var(--team-b); box-shadow: var(--team-b-glow); }

.team-card-header { display: flex; align-items: center; gap: 10px; }
.team-card-header.right-order { justify-content: flex-end; }
.team-avatar-lg { width: 42px; height: 42px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; background: var(--bg-subtle); }
.team-meta h3 { font-size: 1rem; font-weight: 800; }
.f100-score-badge { font-size: 0.9rem; font-weight: 800; color: var(--primary); }

.strikes-container { display: flex; gap: 6px; margin-top: 10px; }
.strikes-container.right-align { justify-content: flex-end; }

.strike-slot {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--bg-subtle); border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: var(--transition);
}
.strike-slot svg { stroke: var(--text-muted); transition: var(--transition); }
.strike-slot.active {
  background: rgba(239, 68, 68, 0.22); border-color: var(--danger);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5); transform: scale(1.12);
  animation: strikeShake 0.35s ease-in-out;
}
.strike-slot.active svg { stroke: #ef4444; filter: drop-shadow(0 0 4px #ef4444); }

@keyframes strikeShake {
  0%, 100% { transform: translateX(0) scale(1.12); }
  25% { transform: translateX(-4px) scale(1.12); }
  75% { transform: translateX(4px) scale(1.12); }
}

.turn-status-indicator { margin-top: 8px; font-size: 0.73rem; font-weight: 700; color: var(--text-muted); }
.f100-team-card.active-turn .turn-status-indicator { color: var(--success); }
.f100-team-card.team-eliminated {
  opacity: 0.7; border-color: rgba(239, 68, 68, 0.4) !important;
  background: rgba(239, 68, 68, 0.04);
}
.f100-team-card.team-eliminated .turn-status-indicator {
  color: var(--danger); font-weight: 800;
}

.f100-center-info { display: flex; flex-direction: column; align-items: center; }
.round-points-circle {
  width: 88px; height: 88px; border-radius: 50%;
  background: linear-gradient(135deg, #1a1060, #2d1b8a);
  border: 3px solid rgba(99, 102, 241, 0.5);
  box-shadow: var(--primary-glow);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.points-label { font-size: 0.55rem; font-weight: 800; letter-spacing: 0.05em; color: rgba(199, 210, 254, 0.8); }
.points-val { font-size: 1.6rem; font-weight: 800; color: var(--gold); line-height: 1; }

.f100-question-box {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 14px 18px;
  text-align: center; box-shadow: var(--shadow-sm);
}
.q-label { font-size: 0.68rem; font-weight: 800; color: var(--primary); letter-spacing: 0.08em; }
.f100-question-box h3 { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); margin-top: 4px; }

/* Flip Card Answers */
.f100-answers-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; perspective: 1200px; }

.f100-card {
  height: 70px; position: relative;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}
.f100-card.flipped { transform: rotateX(180deg); }

.f100-card-face {
  position: absolute; inset: 0;
  border-radius: var(--radius-md);
  backface-visibility: hidden;
  display: flex; align-items: center;
  padding: 0 14px;
  box-shadow: var(--shadow-sm);
}

.f100-card-front {
  background: linear-gradient(135deg, #0d1220, #0a0e1a);
  border: 2px solid #1e2535;
  color: white;
  justify-content: space-between;
}
.f100-slot-num {
  width: 34px; height: 34px; border-radius: 50%;
  background: #1e2535; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
}
.f100-hidden-dots { color: #2d3748; letter-spacing: 4px; font-weight: 700; font-size: 1.1rem; }

.f100-card-back {
  background: linear-gradient(135deg, #0e3a5a, #1260a0);
  border: 2px solid rgba(6, 182, 212, 0.4);
  color: white;
  transform: rotateX(180deg);
  justify-content: space-between;
}
.f100-card-back.revealed-missed {
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  border-color: #444;
  opacity: 0.8;
}
.f100-ans-text { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.f100-ans-pts {
  background: var(--gold); color: #1a0a00;
  font-weight: 800; font-size: 1.05rem;
  padding: 4px 10px; border-radius: var(--radius-full);
  min-width: 40px; text-align: center;
}

/* Action Bar */
.f100-action-bar {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.f100-input-form { display: flex; gap: 10px; }
.f100-input {
  flex: 1; font-family: inherit;
  font-size: 1.05rem; font-weight: 600;
  padding: 12px 16px;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--text-primary);
  outline: none; transition: var(--transition);
}
.f100-input:focus { border-color: var(--primary); background: var(--bg-card); box-shadow: 0 0 0 3px var(--primary-light); }
.f100-input::placeholder { color: var(--text-muted); }

.f100-control-buttons {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 10px;
  padding-top: 8px; border-top: 1px solid var(--border-subtle);
}

/* Buttons */
.btn {
  font-family: inherit; font-size: 0.9rem; font-weight: 700;
  padding: 10px 16px; border-radius: var(--radius-md);
  border: 1px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: var(--transition);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--bg-subtle); color: var(--text-primary); border-color: var(--border-subtle); }
.btn-secondary:hover { background: var(--bg-card); border-color: var(--primary); }
.btn-outline { background: transparent; border-color: var(--border-subtle); color: var(--text-secondary); }
.btn-outline:hover { background: var(--bg-subtle); color: var(--text-primary); }
.btn-success { background: var(--success); color: white; box-shadow: 0 2px 10px rgba(34, 197, 94, 0.3); }
.btn-success:hover { background: #16a34a; }
.btn-lg { padding: 13px 22px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* =============================================================================
   TARIK TAMBANG ARENA
   ============================================================================= */
.tug-arena-container {
  max-width: 1080px; margin: 14px auto 28px;
  width: 94%; display: flex; flex-direction: column; gap: 14px;
}

.tug-header {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 14px 20px;
}
.tug-badge {
  font-size: 0.7rem; font-weight: 800;
  color: var(--danger); background: var(--danger-light);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 2px 10px; border-radius: var(--radius-full);
}
.tug-title-wrap h2 { font-size: 1.3rem; font-weight: 800; margin-top: 4px; }
.tug-title-wrap p { font-size: 0.82rem; color: var(--text-secondary); }
.tug-metrics { display: flex; gap: 10px; }
.tug-metric-box {
  background: var(--bg-subtle); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 8px 16px; text-align: center;
}
.timer-box { border-color: var(--danger); }
.m-title { display: block; font-size: 0.6rem; font-weight: 800; color: var(--text-muted); letter-spacing: 0.06em; }
.m-val { font-size: 1.35rem; font-weight: 800; color: var(--primary); }
.timer-box .m-val { color: var(--danger); }

/* Tug Stage */
.tug-stage {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(34, 197, 94, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, #0a1628, #0d1117);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: grid; grid-template-columns: 200px 1fr 200px;
  align-items: center; gap: 10px;
  min-height: 200px; overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}

.tug-team-zone { display: flex; flex-direction: column; align-items: center; position: relative; z-index: 5; }

.finish-line {
  position: absolute; top: -20px; bottom: -20px;
  width: 3px;
  background: repeating-linear-gradient(0deg, var(--danger), var(--danger) 8px, transparent 8px, transparent 16px);
  opacity: 0.6;
}
.finish-line.left-line { left: 16px; }
.finish-line.right-line { right: 16px; }
.finish-flag {
  position: absolute; top: 8px;
  font-size: 0.6rem; font-weight: 800; background: var(--bg-card);
  color: var(--danger); padding: 2px 5px; border-radius: 4px;
  border: 1px solid rgba(239, 68, 68, 0.4); white-space: nowrap;
}
.finish-line.left-line .finish-flag { left: 6px; }
.finish-line.right-line .finish-flag { right: 6px; }

.tug-character { display: flex; flex-direction: column; align-items: center; transition: transform 0.4s var(--bounce); }
.char-bubble {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 0.7rem; font-weight: 700; margin-bottom: 4px;
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.char-sprite { font-size: 3.2rem; filter: drop-shadow(0 8px 12px rgba(0,0,0,0.4)); transition: var(--transition); }
.char-team-name { font-size: 0.85rem; font-weight: 800; margin-top: 4px; }
.char-team-score { font-size: 0.78rem; font-weight: 700; color: var(--primary); }

.char-pulling-left { animation: pullLeft 0.5s ease-in-out; }
.char-pulling-right { animation: pullRight 0.5s ease-in-out; }
@keyframes pullLeft { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-18px) rotate(-10deg); } }
@keyframes pullRight { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(18px) rotate(10deg); } }

.tug-rope-track {
  position: relative; height: 60px;
  display: flex; align-items: center; justify-content: center;
}
.rope-center-goal {
  position: absolute; top: 0; bottom: 0; width: 2px;
  border-left: 2px dashed rgba(99, 102, 241, 0.4);
}
.tug-rope-body {
  position: relative; width: 100%; height: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.45s var(--bounce);
}
.rope-line {
  position: absolute; width: 120%; height: 14px;
  background: repeating-linear-gradient(45deg, #d97706, #d97706 10px, #b45309 10px, #b45309 20px);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}
.rope-ribbon {
  position: absolute; width: 30px; height: 30px;
  background: var(--danger); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5); border: 2px solid rgba(255,255,255,0.2);
  z-index: 10;
}
.ribbon-flag { font-size: 0.9rem; }

/* Battle Card */
.tug-battle-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.tug-q-badge {
  align-self: center; font-size: 0.7rem; font-weight: 800;
  color: var(--primary); background: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 3px 12px; border-radius: var(--radius-full);
}
.tug-question-text { font-size: 1.2rem; font-weight: 800; text-align: center; color: var(--text-primary); }

.tug-options-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tug-opt-btn {
  background: var(--bg-subtle); border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 14px;
  font-family: inherit; font-size: 0.95rem; font-weight: 700;
  color: var(--text-primary); cursor: pointer;
  display: flex; align-items: center; gap: 10px; text-align: left;
  transition: var(--transition);
}
.tug-opt-btn:hover { background: var(--bg-card); border-color: var(--primary); transform: translateY(-2px); }
.tug-opt-btn.correct-ans { background: var(--success-light); border-color: var(--success); }
.tug-opt-btn.wrong-ans { background: var(--danger-light); border-color: var(--danger); }
.opt-letter {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--primary); font-size: 0.85rem; flex-shrink: 0;
}

/* Dual Buzzers */
.dual-buzzer-row {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center;
  margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--border-subtle);
}
.team-buzzer-btn {
  border: none; border-radius: var(--radius-lg); padding: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 12px;
  position: relative; overflow: hidden; transition: var(--transition); box-shadow: var(--shadow-md);
}
.team-buzzer-btn:active { transform: scale(0.95); }
.buzzer-a { background: linear-gradient(135deg, var(--team-a), #c2410c); color: white; box-shadow: var(--team-a-glow); }
.buzzer-b { background: linear-gradient(135deg, var(--team-b), #0e7490); color: white; box-shadow: var(--team-b-glow); }
.buzzer-icon { font-size: 1.8rem; }
.buzzer-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.buzzer-text strong { font-size: 1.05rem; }
.buzzer-text small { font-size: 0.7rem; opacity: 0.85; }
.buzzer-status-pill {
  background: var(--bg-subtle); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full); padding: 8px 12px;
  font-size: 0.72rem; font-weight: 700; color: var(--text-secondary);
  text-align: center;
}

/* =============================================================================
   MODALS & DIALOGS
   ============================================================================= */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000; display: none;
  align-items: center; justify-content: center; padding: 20px;
  animation: backdropIn 0.2s ease-out;
}
.modal-backdrop.active { display: flex; }
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%; max-width: 840px;
  max-height: 92vh;
  display: flex; flex-direction: column; overflow: hidden;
  animation: modalIn 0.3s var(--bounce);
}
@keyframes modalIn { from { transform: scale(0.88); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-header {
  padding: 16px 22px; border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header.center-header {
  flex-direction: column; text-align: center; justify-content: center; gap: 4px;
}
.modal-title-group { display: flex; flex-direction: column; gap: 2px; }
.modal-step-badge {
  font-size: 0.7rem; font-weight: 800;
  color: var(--primary); background: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 2px 8px; border-radius: var(--radius-full); display: inline-block;
}
.modal-header h2 { font-size: 1.25rem; font-weight: 800; margin-top: 2px; }
.modal-close-btn {
  background: var(--bg-subtle); border: 1px solid var(--border-subtle);
  width: 32px; height: 32px; border-radius: var(--radius-md);
  font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: var(--transition);
}
.modal-close-btn:hover { background: var(--danger-light); color: var(--danger); border-color: rgba(239,68,68,0.4); }

.modal-body { padding: 18px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.modal-body.center-body { align-items: center; text-align: center; }

.modal-footer {
  padding: 14px 22px; border-top: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-subtle);
}
.modal-footer.center-footer { justify-content: center; }
.dialog-subtitle { font-size: 0.82rem; color: var(--text-secondary); font-weight: 600; }

/* Lesson Modal Specifics */
.lesson-summary-box {
  background: var(--bg-subtle); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 14px 18px;
}
.lesson-summary-box h4 { font-size: 0.95rem; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.lesson-summary-box p, .lesson-summary-box ul { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }
.lesson-summary-box ul { padding-left: 18px; margin-top: 6px; }
.lesson-summary-box li { margin-bottom: 4px; }

.lesson-interactive-area {
  background: var(--bg-card); border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg); padding: 18px;
  display: flex; flex-direction: column; gap: 16px;
}

.interaction-status { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-muted); }
.status-dot.done { background: var(--success); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25); }

/* FLIP CARD MINI-INTERACTION */
.flip-card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px;
  perspective: 1000px;
}
.flip-mini-card {
  height: 100px; position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer; border-radius: var(--radius-md);
}
.flip-mini-card.flipped { transform: rotateY(180deg); }
.flip-mini-card:not(.flipped):hover { transform: rotateY(20deg); }

.flip-mini-face {
  position: absolute; inset: 0; border-radius: var(--radius-md);
  backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px; text-align: center; gap: 4px;
}
.flip-mini-front {
  background: linear-gradient(135deg, #151f30, #1a2540);
  border: 2px solid #2a3550;
}
.flip-mini-front .flip-q-icon { font-size: 2rem; }
.flip-mini-front .flip-q-num { font-size: 0.65rem; font-weight: 800; color: var(--text-muted); }

.flip-mini-back {
  background: linear-gradient(135deg, #0e3060, #1a5090);
  border: 2px solid rgba(6, 182, 212, 0.5);
  transform: rotateY(180deg);
}
.flip-mini-back .flip-ans-name { font-size: 0.82rem; font-weight: 800; color: white; }
.flip-mini-back .flip-ans-sub { font-size: 0.68rem; color: rgba(199, 210, 254, 0.8); margin-top: 2px; }

/* Pipeline (Input → Process → Output) */
.pipeline-flow-interactive {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
  justify-content: center;
}
.pipeline-step-btn {
  flex: 1; min-width: 0; padding: 14px 8px;
  background: var(--bg-subtle); border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md); text-align: center; cursor: pointer;
  transition: var(--transition); font-family: inherit;
}
.pipeline-step-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pipeline-step-btn.active-step { border-color: var(--primary); background: var(--primary-light); animation: btnGlow 1.5s infinite; }
.pipeline-step-btn.done-step { border-color: var(--success); background: var(--success-light); }
.pipeline-step-btn strong { display: block; font-size: 0.85rem; color: var(--text-primary); }
.pipeline-step-btn span { display: block; font-size: 0.7rem; color: var(--text-secondary); margin-top: 2px; }
@keyframes btnGlow { 0%, 100% { box-shadow: 0 0 0 0 var(--primary-light); } 50% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.15); } }
.flow-arrow-icon { font-size: 1.4rem; color: var(--text-muted); flex-shrink: 0; }

/* Processor Board */
.proc-board {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  background: #060c18; padding: 16px; border-radius: var(--radius-md);
  border: 1px solid #1a2535;
}
.proc-chip-card {
  background: #0e1a2a; border: 2px solid #1e2e45;
  border-radius: var(--radius-md); padding: 14px;
  cursor: pointer; transition: var(--transition); text-align: center;
}
.proc-chip-card:hover { border-color: #38bdf8; background: #0f2744; }
.proc-chip-card.active { border-color: #06b6d4; background: rgba(6, 182, 212, 0.1); }
.proc-chip-card h4 { color: #38bdf8; font-weight: 800; font-size: 1rem; margin-bottom: 4px; }
.proc-chip-card .chip-role { font-size: 0.7rem; color: #64748b; margin-bottom: 6px; }
.proc-chip-card .chip-desc { font-size: 0.78rem; color: #8b949e; line-height: 1.4; }

/* Software Match Grid */
.sw-match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.sw-match-card {
  background: var(--bg-subtle); border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 12px; text-align: center;
  cursor: pointer; transition: var(--transition);
}
.sw-match-card:hover { border-color: var(--primary); background: var(--primary-light); }
.sw-match-card.matched { border-color: var(--success); background: var(--success-light); }
.sw-match-card .sw-icon { font-size: 1.5rem; display: block; margin-bottom: 4px; }
.sw-match-card .sw-name { font-size: 0.8rem; font-weight: 700; color: var(--text-primary); }
.sw-match-card .sw-cat { font-size: 0.65rem; color: var(--text-muted); margin-top: 2px; }

/* Computer Scale (sequential ordering) */
.scale-seq-list { display: flex; flex-direction: column; gap: 8px; }
.scale-seq-item {
  background: var(--bg-subtle); border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 12px 16px;
  cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; gap: 12px;
}
.scale-seq-item:hover { border-color: var(--primary); background: var(--primary-light); transform: translateX(4px); }
.scale-seq-item.activated { border-color: var(--success); background: var(--success-light); transform: translateX(4px); }
.scale-item-icon { font-size: 1.3rem; flex-shrink: 0; }
.scale-item-text { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); }
.scale-item-sub { font-size: 0.7rem; color: var(--text-secondary); }

/* Team Edit */
.team-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.team-edit-box {
  background: var(--bg-subtle); border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.team-edit-box.a-theme { border-color: var(--team-a-border); }
.team-edit-box.b-theme { border-color: var(--team-b-border); }
.team-edit-box label { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); }
.team-name-input {
  font-family: inherit; font-size: 1rem; font-weight: 700;
  padding: 10px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card); color: var(--text-primary);
}
.avatar-select-row { display: flex; gap: 8px; }
.avatar-opt {
  font-size: 1.4rem; width: 42px; height: 42px;
  border-radius: var(--radius-md); border: 2px solid var(--border-subtle);
  background: var(--bg-card); cursor: pointer; display: flex;
  align-items: center; justify-content: center; transition: var(--transition);
}
.avatar-opt.active { border-color: var(--primary); background: var(--primary-light); transform: scale(1.1); }

/* Family 100 Dialog */
.f100-dialog { max-width: 580px; }
.trophy-bounce { font-size: 3rem; animation: bounceTrophy 1.5s infinite ease-in-out; }
@keyframes bounceTrophy { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-10px) rotate(5deg); } }

/* Grand Finale */
.finale-dialog { max-width: 640px; text-align: center; position: relative; }
.confetti-canvas-wrap { position: absolute; inset: 0; pointer-events: none; z-index: 1; border-radius: var(--radius-xl); overflow: hidden; }
.crown-icon { font-size: 3rem; animation: bounceCrown 1.5s infinite ease-in-out; }
@keyframes bounceCrown { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-8px) scale(1.05); } }
.champion-announcement { width: 100%; padding: 16px; background: linear-gradient(135deg, #2a1800, #3a2200); border-radius: var(--radius-lg); border: 2px solid var(--gold); box-shadow: var(--gold-glow); }
.champion-announcement h3 { font-size: 1.5rem; font-weight: 800; color: var(--gold); }
.final-scores-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; margin-top: 14px; }
.final-team-res-card { padding: 14px; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); background: var(--bg-subtle); }
.final-team-res-card.winner { border-color: var(--gold); background: rgba(251, 191, 36, 0.08); }

/* Strike / Correct Overlays */
.strike-huge-overlay, .correct-overlay {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.4);
  pointer-events: none; z-index: 3000;
  opacity: 0; transition: all 0.25s var(--bounce);
}
.strike-huge-overlay.active, .correct-overlay.active {
  transform: translate(-50%, -50%) scale(1.2); opacity: 1;
}
.huge-x { font-size: 8rem; font-weight: 900; color: var(--danger); text-shadow: 0 0 40px rgba(239, 68, 68, 0.6); }
.correct-check { font-size: 8rem; font-weight: 900; color: var(--success); text-shadow: 0 0 40px rgba(34, 197, 94, 0.6); }

/* Toast */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 4000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--bg-card); border: 1px solid var(--border-subtle); color: var(--text-primary);
  padding: 10px 18px; border-radius: var(--radius-md); font-size: 0.85rem; font-weight: 600;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px;
  animation: toastIn 0.3s ease-out;
}
.toast.toast-success { border-color: rgba(34, 197, 94, 0.4); }
.toast.toast-error { border-color: rgba(239, 68, 68, 0.4); }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Info box in lesson */
.info-block {
  background: var(--primary-light); border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md); padding: 10px 14px;
  font-size: 0.82rem; font-weight: 600; color: var(--text-primary); line-height: 1.5;
}
.info-block.success-block { background: var(--success-light); border-color: rgba(34, 197, 94, 0.3); }

/* Completed Node Checkmark */
.adv-node-check {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--success);
}

/* Helper utilities used inside lesson summaries */
.mt-3 { margin-top: 10px; }

/* =============================================================================
   FAMILY 100 DISCUSSION MODAL
   ============================================================================= */
.f100-discussion-dialog { max-width: 720px; }
.disc-header-reason {
  font-size: 0.8rem; font-weight: 700;
  padding: 4px 12px; border-radius: var(--radius-full);
  background: var(--bg-subtle); border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.disc-header-reason.both-eliminated {
  background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.4);
  color: var(--danger);
}
.disc-header-reason.all-cleared {
  background: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.4);
  color: var(--success);
}

.disc-answers-list { display: flex; flex-direction: column; gap: 8px; }
.disc-ans-item {
  background: var(--bg-subtle); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transition: var(--transition);
}
.disc-ans-item.revealed { border-color: rgba(6, 182, 212, 0.4); background: rgba(6, 182, 212, 0.08); }
.disc-ans-item.missed { border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.05); }

.disc-ans-left { display: flex; align-items: center; gap: 10px; }
.disc-ans-rank {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 800; color: var(--primary);
}
.disc-ans-name { font-size: 0.95rem; font-weight: 800; color: var(--text-primary); }
.disc-ans-role { font-size: 0.76rem; color: var(--text-secondary); margin-top: 2px; }

.disc-ans-right { display: flex; align-items: center; gap: 10px; }
.disc-status-tag {
  font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full);
}
.disc-status-tag.tag-a { background: var(--team-a-light); color: var(--team-a); border: 1px solid var(--team-a-border); }
.disc-status-tag.tag-b { background: var(--team-b-light); color: var(--team-b); border: 1px solid var(--team-b-border); }
.disc-status-tag.tag-missed { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }

.disc-ans-pts {
  background: var(--gold); color: #1a0a00;
  font-weight: 800; font-size: 0.9rem;
  padding: 3px 8px; border-radius: var(--radius-full);
}

.disc-footer-score { font-size: 0.85rem; color: var(--text-secondary); font-weight: 700; }

/* =============================================================================
   HARDWARE PHYSICAL COMPONENT VISUALIZER (Titik 3)
   ============================================================================= */
.hw-visualizer-container { display: flex; flex-direction: column; gap: 14px; }
.hw-category-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-bottom: 8px; border-bottom: 1px solid var(--border-subtle);
}
.hw-tab-btn {
  background: var(--bg-subtle); border: 1px solid var(--border-subtle);
  color: var(--text-secondary); padding: 6px 14px; border-radius: var(--radius-full);
  font-family: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer;
  transition: var(--transition);
}
.hw-tab-btn:hover { color: var(--text-primary); border-color: var(--primary); }
.hw-tab-btn.active {
  background: var(--primary-light); color: var(--primary);
  border-color: var(--primary); box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.hw-main-inspector {
  display: grid; grid-template-columns: 240px 1fr; gap: 14px;
  background: #090d16; border: 1px solid #1a2538;
  border-radius: var(--radius-lg); padding: 14px;
}

.hw-components-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 420px; overflow-y: auto; padding-right: 4px;
}
.hw-item-btn {
  background: #111a28; border: 1px solid #1e2c42;
  border-radius: var(--radius-md); padding: 8px 12px;
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  text-align: left; transition: var(--transition);
  color: var(--text-primary); font-family: inherit;
}
.hw-item-btn:hover { background: #162438; border-color: #38bdf8; }
.hw-item-btn.active {
  background: rgba(56, 189, 248, 0.12); border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}
.hw-btn-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); background: #0c1420; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hw-btn-info { display: flex; flex-direction: column; overflow: hidden; }
.hw-btn-name { font-size: 0.82rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-btn-cat { font-size: 0.65rem; color: #64748b; }
.hw-btn-check { font-size: 0.75rem; color: var(--success); margin-left: auto; }

.hw-showcase-view {
  background: #0d1524; border: 1px solid #203048;
  border-radius: var(--radius-md); padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
  align-items: center; text-align: center;
}
.hw-illustration-canvas {
  width: 100%; min-height: 200px;
  background: radial-gradient(circle at 50% 50%, #152238 0%, #0a111e 80%);
  border: 1px solid #243550; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; position: relative; overflow: hidden;
}
.hw-illustration-canvas svg { max-width: 100%; max-height: 220px; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.6)); }

.hw-die-toggle-wrap { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 4px; }
.hw-die-btn {
  font-family: inherit; font-size: 0.75rem; font-weight: 700;
  padding: 4px 12px; border-radius: var(--radius-full);
  background: #162438; border: 1px solid #283e5e; color: #94a3b8; cursor: pointer;
  transition: var(--transition);
}
.hw-die-btn.active {
  background: #0284c7; color: white; border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.hw-info-card { text-align: left; width: 100%; }
.hw-info-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.hw-info-title { font-size: 1.15rem; font-weight: 800; color: #38bdf8; }
.hw-badge-cat {
  font-size: 0.7rem; font-weight: 800; padding: 2px 10px; border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3);
}
.hw-physical-desc {
  font-size: 0.85rem; line-height: 1.5; color: #e2e8f0;
  background: #090e18; border-left: 3px solid #38bdf8;
  padding: 8px 12px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 8px;
}
.hw-role-desc { font-size: 0.82rem; color: #94a3b8; line-height: 1.5; }

/* =============================================================================
   SOFTWARE DASHBOARD (Titik 4)
   ============================================================================= */
.sw-dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sw-dash-card {
  background: #0e1626; border: 2px solid #1e2c44;
  border-radius: var(--radius-md); padding: 14px;
  cursor: pointer; transition: var(--transition); text-align: left;
}
.sw-dash-card:hover { border-color: #38bdf8; transform: translateY(-2px); }
.sw-dash-card.active { border-color: var(--success); background: rgba(34, 197, 94, 0.08); }
.sw-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sw-card-head h4 { font-size: 0.95rem; font-weight: 800; color: #f1f5f9; }
.sw-cat-badge { font-size: 0.65rem; font-weight: 700; color: var(--primary); background: var(--primary-light); padding: 2px 6px; border-radius: 4px; }
.sw-examples-pill { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.sw-pill { font-size: 0.7rem; font-weight: 600; background: #162438; color: #94a3b8; padding: 2px 8px; border-radius: var(--radius-full); }

/* =============================================================================
   TARIK TAMBANG BALANCED ANIMATIONS
   ============================================================================= */
.char-sprite-wrap { display: flex; align-items: center; justify-content: center; }
.tug-vector-char { transition: transform 0.4s var(--bounce); }
.char-stumble-left { animation: stumbleLeft 0.55s ease-in-out; }
.char-stumble-right { animation: stumbleRight 0.55s ease-in-out; }
@keyframes stumbleLeft { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(20px) rotate(8deg); } }
@keyframes stumbleRight { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-20px) rotate(-8deg); } }

/* Vector Avatars */
.team-vector-avatar { display: inline-block; vertical-align: middle; }

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 900px) {
  .f100-team-board { grid-template-columns: 1fr; }
  .f100-center-info { order: -1; }
  .tug-stage { grid-template-columns: 1fr; gap: 14px; }
  .team-edit-grid { grid-template-columns: 1fr; }
  .pipeline-flow-interactive { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .map-stats-bar { flex-direction: column; align-items: flex-start; }
  .top-nav { padding: 8px 12px; }
  .brand-text h1 { font-size: 0.9rem; }
  .f100-answers-grid { grid-template-columns: 1fr; }
  .dual-buzzer-row { grid-template-columns: 1fr; }
  .tug-options-grid { grid-template-columns: 1fr; }
  .flip-card-grid { grid-template-columns: repeat(2, 1fr); }
  .sw-match-grid { grid-template-columns: repeat(2, 1fr); }
  .team-score-bar { display: none; }
}
