/* ==========================================================================
   KNOWLEDGE QUEST: RANK BRONZE TO MYTHIC - 2D ADVENTURE STYLESHEET
   ========================================================================== */

:root {
  /* Brand Theme Colors */
  --bg-dark: #090d16;
  --card-bg: rgba(15, 23, 42, 0.85);
  --card-border: rgba(255, 255, 255, 0.12);
  
  --primary-accent: #38bdf8;
  --text-main: #f8fafc;
  --text-sub: #94a3b8;

  /* Rank Specific Colors */
  --rank-bronze: #cd7f32;
  --rank-silver: #cbd5e1;
  --rank-gold: #ffd700;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Dimensions */
  --max-width: 720px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
}

#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

#app-container {
  width: 100%;
  max-width: var(--max-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  padding: 0 12px 24px 12px;
}

/* Header Bar */
#game-header {
  height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.logo-icon { font-size: 22px; }

.logo-text { display: flex; flex-direction: column; }
.logo-text .title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 14px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-text .subtitle { font-size: 9px; color: var(--text-sub); font-weight: 700; }

.header-actions { display: flex; align-items: center; gap: 6px; }

.active-rank-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 11px;
}

.header-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

/* Screen System */
#main-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.screen { display: none; flex-direction: column; animation: fadeIn 0.3s ease forwards; }
.screen.active { display: flex; }

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

/* Home Screen */
#home-screen { text-align: center; align-items: center; justify-content: center; padding: 12px 0; }
.home-content { display: flex; flex-direction: column; align-items: center; width: 100%; }

.title-badge-pill {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 5px 14px;
  border-radius: 16px;
  margin-bottom: 10px;
}

.main-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
}

.main-title .highlight-text {
  display: block;
  font-size: 22px;
  background: linear-gradient(135deg, #ffd700, #ff007f, #00f0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.main-subtitle { font-size: 14px; color: var(--text-sub); margin-bottom: 16px; }

.character-wrapper { display: flex; flex-direction: column; align-items: center; margin: 8px 0 16px 0; }
.character-container { width: 170px; height: 190px; display: flex; justify-content: center; align-items: center; }

/* Mascot Frame */
.mascot-avatar-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.mascot-img { width: 100%; height: 100%; object-fit: contain; border-radius: 16px; z-index: 2; }
.mascot-rank-aura { position: absolute; width: 85%; height: 85%; border-radius: 50%; z-index: 1; }
.mascot-rank-tag {
  position: absolute;
  bottom: -6px;
  background: rgba(15, 23, 42, 0.92);
  border: 1.5px solid var(--primary-accent);
  padding: 3px 10px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
  z-index: 4;
}

.speech-bubble {
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.home-cta-group { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 300px; margin-bottom: 16px; }

.btn {
  font-family: var(--font-heading);
  font-weight: 800;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 22px;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.btn-large { padding: 16px 26px; font-size: 17px; border-radius: 18px; }
.btn-primary { background: linear-gradient(135deg, #0284c7, #38bdf8); color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.btn-glow { animation: pulseGlow 2s infinite alternate; }
@keyframes pulseGlow { 0% { box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3); } 100% { box-shadow: 0 8px 28px rgba(56, 189, 248, 0.7); } }

.btn-secondary { background: rgba(30, 41, 59, 0.8); color: var(--text-main); border: 1px solid var(--card-border); }
.btn-materi { background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.3)); border: 1px solid rgba(168, 85, 247, 0.5); color: #f472b6; }

.home-sub-nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.btn-sub { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-sub); padding: 7px 14px; border-radius: 16px; font-size: 11px; font-weight: 700; }

/* ==========================================================================
   2. GAMEPLAY CANVAS VIEWPORT & HUD
   ========================================================================== */

.game-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 6px;
}

.hud-item { display: flex; flex-direction: column; align-items: center; }
.hud-label { font-size: 8px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-sub); font-weight: 700; }
.hud-value { font-family: var(--font-heading); font-weight: 800; font-size: 13px; }

.objective-value { color: #f6e05e; font-size: 12px; }
.stars-display { letter-spacing: 2px; }

.nearby-prompt-banner {
  background: rgba(246, 224, 94, 0.95);
  color: #1a202c;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 12px;
  text-align: center;
  padding: 6px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  animation: pulsePrompt 1s infinite alternate;
}
.nearby-prompt-banner.hidden { display: none; }

@keyframes pulsePrompt { 0% { transform: scale(0.99); } 100% { transform: scale(1.01); } }

/* Canvas & Viewport Wrapper for Single-Frame Map */
.canvas-viewport-wrapper {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  aspect-ratio: 1000 / 650;
  background: #1e4620;
  border: 3px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Touch Virtual D-Pad (Mobile Controllers) */
.virtual-dpad-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  gap: 4px;
}

.dpad-row-middle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dpad-btn {
  width: 48px;
  height: 48px;
  background: rgba(30, 41, 59, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #ffffff;
  font-size: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: background 0.1s ease;
}

.dpad-btn:active, .dpad-btn.active {
  background: var(--primary-accent);
  color: #0f172a;
}

.dpad-center {
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ==========================================================================
   3. MATERI & PREVIEW SCREEN
   ========================================================================== */

.materi-header-section { margin-bottom: 14px; text-align: center; }
.materi-title { font-family: var(--font-heading); font-size: 20px; font-weight: 900; margin-bottom: 4px; }
.materi-subtitle { font-size: 12px; color: var(--text-sub); margin-bottom: 10px; }

.materi-character-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  margin-bottom: 14px;
}

.materi-cards-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 20px; }
.materi-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: 18px; }

.materi-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.materi-rank-badge { display: flex; align-items: center; gap: 8px; }
.materi-rank-badge .badge-icon { font-size: 24px; }
.materi-rank-badge .rank-title { font-family: var(--font-heading); font-size: 17px; font-weight: 900; }
.materi-rank-badge .level-tag { font-size: 11px; color: var(--text-sub); }

.diff-badge { font-family: var(--font-heading); font-size: 10px; font-weight: 800; padding: 4px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); }

.topic-chip { font-size: 11px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); padding: 4px 8px; border-radius: 6px; }
.tip-box { background: rgba(254, 240, 138, 0.1); border-left: 3px solid #facc15; padding: 8px 10px; font-size: 11px; color: #fef08a; }

/* Spill Soalnya */
.preview-interactive-container { background: rgba(15, 23, 42, 0.85); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 20px; }
.preview-mode-banner { font-family: var(--font-heading); font-size: 10px; font-weight: 800; color: #f43f5e; background: rgba(244, 63, 94, 0.15); border: 1px solid rgba(244, 63, 94, 0.3); padding: 3px 10px; border-radius: 10px; margin-bottom: 8px; display: inline-block; }
.preview-section-title { font-family: var(--font-heading); font-size: 16px; font-weight: 800; margin-bottom: 12px; }

.preview-item-card { background: rgba(30, 41, 59, 0.7); border: 1px solid var(--card-border); border-radius: var(--radius-md); padding: 14px; margin-bottom: 12px; }
.preview-item-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-sub); margin-bottom: 6px; }
.preview-q-text { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.preview-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }

.preview-opt-btn { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-main); padding: 8px; border-radius: var(--radius-sm); font-size: 12px; text-align: left; cursor: pointer; }
.preview-opt-btn.correct { background: rgba(16, 185, 129, 0.2) !important; border-color: #10b981 !important; color: #34d399 !important; font-weight: 700; }
.preview-opt-btn.wrong { background: rgba(239, 68, 68, 0.2) !important; border-color: #ef4444 !important; color: #f87171 !important; }

.materi-bottom-actions { display: flex; gap: 10px; justify-content: space-between; }
.btn-back { flex: 1; max-width: 150px; }

/* ==========================================================================
   4. MODALS & OVERLAYS
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(9, 13, 22, 0.85); backdrop-filter: blur(8px);
  z-index: 100; display: flex; justify-content: center; align-items: center; padding: 16px;
  transition: opacity 0.2s ease;
}
.modal-overlay.hidden {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.modal-card {
  background: #0f172a; border: 1px solid var(--card-border);
  border-radius: var(--radius-lg); max-width: 460px; width: 100%; padding: 20px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.6);
}

.question-modal-card { border-color: var(--primary-accent); }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-header h3 { font-family: var(--font-heading); font-size: 17px; font-weight: 800; }
.category-pill { font-family: var(--font-heading); font-size: 11px; font-weight: 800; color: #38bdf8; background: rgba(56, 189, 248, 0.15); padding: 3px 10px; border-radius: 10px; }

.modal-question-text { font-size: 16px; font-weight: 700; line-height: 1.4; margin: 12px 0 16px 0; }

.options-grid { display: flex; flex-direction: column; gap: 8px; }
.option-btn {
  background: rgba(30, 41, 59, 0.8); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md); padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  color: var(--text-main); font-size: 13px; font-weight: 500; cursor: pointer;
}
.option-btn .opt-key { font-family: var(--font-heading); font-weight: 800; font-size: 12px; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); display: flex; justify-content: center; align-items: center; flex-shrink: 0; }
.option-btn.selected-correct { background: rgba(16, 185, 129, 0.2) !important; border-color: #10b981 !important; color: #fff !important; }
.option-btn.selected-wrong { background: rgba(239, 68, 68, 0.2) !important; border-color: #ef4444 !important; color: #fff !important; }

.feedback-panel { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--card-border); }
.feedback-panel.hidden { display: none; }
.feedback-status { font-family: var(--font-heading); font-size: 15px; font-weight: 900; margin-bottom: 4px; }
.feedback-status.correct-text { color: #34d399; }
.feedback-status.wrong-text { color: #f87171; }
.feedback-explanation { font-size: 12px; color: var(--text-sub); line-height: 1.4; }

/* Victory / Failure Modal */
.victory-modal-card { text-align: center; }
.sparkle-title { font-family: var(--font-heading); font-size: 13px; font-weight: 900; color: #ffd700; letter-spacing: 2px; margin-bottom: 6px; }
.rank-achieved-text { font-family: var(--font-heading); font-size: 26px; font-weight: 900; background: linear-gradient(135deg, #ffd700, #ff007f, #00f0ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 10px; }
.next-rank-banner { font-family: var(--font-heading); font-size: 12px; font-weight: 800; color: #a855f7; background: rgba(168, 85, 247, 0.15); border: 1px solid rgba(168, 85, 247, 0.3); padding: 6px 14px; border-radius: 12px; margin: 16px 0; display: inline-block; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.stat-box { background: rgba(30, 41, 59, 0.6); border: 1px solid var(--card-border); border-radius: var(--radius-md); padding: 10px; display: flex; flex-direction: column; gap: 2px; text-align: center; }
.stat-label { font-size: 10px; color: var(--text-sub); font-weight: 600; }
.stat-value { font-family: var(--font-heading); font-size: 15px; font-weight: 800; }
.stat-value.highlight { color: #38bdf8; }

/* Rank Ladder */
.rank-ladder-header { text-align: center; margin-bottom: 16px; }
.rank-ladder-header h2 { font-family: var(--font-heading); font-size: 20px; font-weight: 900; }
.rank-ladder-map { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.rank-node-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-md); padding: 14px; display: flex; align-items: center; justify-content: space-between; }
.rank-node-card.active-rank { border-color: var(--primary-accent); box-shadow: 0 0 15px rgba(56, 189, 248, 0.3); }
.rank-node-card.locked-rank { opacity: 0.6; }
.rank-node-left { display: flex; align-items: center; gap: 12px; }
.node-badge { font-size: 28px; }
.node-info h3 { font-family: var(--font-heading); font-size: 15px; font-weight: 800; }
.node-info p { font-size: 11px; color: var(--text-sub); }
.node-status { font-family: var(--font-heading); font-size: 10px; font-weight: 800; padding: 4px 8px; border-radius: 10px; }
.status-active { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.status-unlocked { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.status-locked { background: rgba(255, 255, 255, 0.1); color: var(--text-sub); }

.rank-bottom-actions { display: flex; gap: 10px; }

/* Mobile Adjustments */
@media (max-width: 480px) {
  .canvas-viewport-wrapper { height: 380px; }
  .preview-options-grid { grid-template-columns: 1fr; }
  .dpad-btn { width: 44px; height: 44px; font-size: 16px; }
}

/* Materi Rank Tabs */
.materi-rank-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin: 10px 0;
  justify-content: center;
  flex-wrap: wrap;
}

.materi-tab-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-sub);
  padding: 6px 12px;
  border-radius: 14px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.materi-tab-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.materi-tab-btn.active {
  background: var(--primary-accent);
  color: #0f172a;
  border-color: var(--primary-accent);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.btn-select-rank {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

/* Medium Mascot Container for Materi Screen */
.small-character-container {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.small-character-container .mascot-avatar-frame {
  width: 100%;
  height: 100%;
}

.small-character-container .mascot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.small-character-container .mascot-rank-tag {
  display: none !important;
}

/* Fancy How to Play & About Modals */
.pretty-modal-card {
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.8), 0 0 20px rgba(56, 189, 248, 0.2);
}

.modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-badge-pill {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  padding: 2px 8px;
  border-radius: 8px;
  display: inline-block;
  width: fit-content;
}

.fancy-modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 16px 0;
}

.info-step-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 12px;
}

.step-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(56, 189, 248, 0.3);
}

.step-content h4 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 3px;
}

.step-content p {
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.4;
}

/* About Modal Styling */
.about-hero-box {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(129, 140, 248, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 12px;
  line-height: 1.4;
  color: #e2e8f0;
}

.about-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.about-feature-item {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.feat-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.about-feature-item strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.about-feature-item p {
  font-size: 10px;
  color: var(--text-sub);
  line-height: 1.3;
}

/* Question Countdown Timer & Progress Bar */
.timer-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 12px;
  animation: pulseTimer 1s infinite alternate;
}

@keyframes pulseTimer {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.timer-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.timer-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #38bdf8, #f59e0b, #ef4444);
  transition: width 0.2s linear;
}



