/* Bảng màu game side quest – Mini Hackathon AI20K K5 L3
   Pixel Hà Nội: vàng nón/cờ, đỏ đèn lồng, nước Hồ Gươm, gỗ rương.
   Dùng: <link rel="stylesheet" href="assets/palette.css">
   Bản tối tự bật theo hệ điều hành; ép sáng/tối bằng data-theme="light|dark" trên <html>. */

:root {
  /* màu thương hiệu (giống trong SVG) */
  --px-outline: #2a1a12;
  --px-yellow: #FFD400;
  --px-yellow-dark: #C99700;
  --px-yellow-light: #FFE97A;
  --px-cream: #FFF3C4;
  --px-red: #C8102E;
  --px-red-dark: #7a1020;
  --px-rose: #E8475E;
  --px-hat: #E8D3A0;
  --px-hat-dark: #B8975A;
  --px-wood: #8B5A2B;
  --px-wood-dark: #5a3a1e;
  --px-green: #2E9E5B;
  --px-green-dark: #1e6b3c;
  --px-lake: #4FA3A5;
  --px-lake-dark: #2f6f72;
  --px-blue: #3b6fd8;
  --px-purple: #8e44ad;
  --px-orange: #ff9f1c;
  --px-stone: #a39f93;
  --px-night: #241a33;

  /* 4 loại quà */
  --prize-data: #4FA3A5;
  --prize-hint: #2E9E5B;
  --prize-credit: #3b6fd8;
  --prize-golden: #FFD400;

  /* 6 track */
  --track-a: #3b6fd8; /* EdTech */
  --track-b: #E8475E; /* Y tế */
  --track-c: #4FA3A5; /* Du lịch */
  --track-d: #ff9f1c; /* Thương mại điện tử */
  --track-e: #2E9E5B; /* Tài chính */
  --track-f: #8e44ad; /* Làn khác */

  /* màu áo nhân vật đội */
  --team-red: #e8402a;
  --team-green: #2E9E5B;
  --team-blue: #3b6fd8;
  --team-yellow: #FFD400;
  --team-purple: #8e44ad;
  --team-orange: #ff9f1c;
  --team-pink: #ff6fa8;
  --team-teal: #2ec4b6;

  /* trạng thái */
  --state-locked: #a39f93;
  --state-ready: #FFD400;
  --state-open: #2E9E5B;
  --state-first-blood: #C8102E;

  /* giao diện (bản sáng) */
  --bg: #fdf6e3;
  --bg-sky: #a9dbf5;
  --surface: #fffaf0;
  --surface-2: #f3e7c9;
  --text: #2a1a12;
  --text-muted: #6b5a48;
  --border: #2a1a12;
  --accent: #C8102E;
  --accent-2: #FFD400;
  --shadow: rgba(42, 26, 18, .35);

  /* viền khối pixel: box-shadow: var(--px-box) */
  --px-box: 0 0 0 3px var(--border), 4px 4px 0 3px var(--shadow);
  --px-font: "Press Start 2P", "VT323", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120d1f;
    --bg-sky: #1c1440;
    --surface: #1e1630;
    --surface-2: #2c2148;
    --text: #fff3c4;
    --text-muted: #b9a9d6;
    --border: #000000;
    --accent: #ff5a6e;
    --accent-2: #FFD400;
    --shadow: rgba(0, 0, 0, .6);
    --state-locked: #6b675d;
  }
}

:root[data-theme="dark"] {
  --bg: #120d1f;
  --bg-sky: #1c1440;
  --surface: #1e1630;
  --surface-2: #2c2148;
  --text: #fff3c4;
  --text-muted: #b9a9d6;
  --border: #000000;
  --accent: #ff5a6e;
  --accent-2: #FFD400;
  --shadow: rgba(0, 0, 0, .6);
  --state-locked: #6b675d;
}

/* tiện ích dùng chung */
.px-img { image-rendering: pixelated; image-rendering: crisp-edges; }
.px-locked { filter: grayscale(1) brightness(.75); opacity: .7; }
.px-glow { filter: drop-shadow(0 0 6px var(--px-yellow)); }
@keyframes px-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.px-bob { animation: px-bob 1s steps(2) infinite; }
@keyframes px-spin { to { transform: rotate(var(--spin-to, 1440deg)); } }
