:root {
      --bixi-red: #d32027;
      --bixi-dark: #1b1c1e;
      --bg: #f2f4ef;
      --card-bg: #fafbf8;
      --border: #d6ddd6;
      --text: #202a26;
      --text-muted: #63716b;
      --code-bg: #15171c;
      --accent-blue: #176f70;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      font-family: "Barlow", sans-serif;
    }

    body {
      background: var(--bg);
      color: var(--text);
      line-height: 1.6;
      padding: 28px 28px 72px;
    }

    .container {
      max-width: 1320px;
      margin: 0 auto;
    }

    .top-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 34px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border);
    }

    .lang-btn {
      padding: 6px 14px;
      border: 1px solid var(--border);
      border-radius: 2px;
      background: var(--card-bg);
      font: 600 13px "Barlow Condensed", sans-serif;
      color: var(--bixi-dark);
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease;
    }

    .lang-btn:hover {
      background: var(--border);
    }

    .lang-controls {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    header {
      margin-bottom: 30px;
    }

    .tag {
      display: inline-block;
      font: 700 12px "Barlow Condensed", sans-serif;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--bixi-red);
      border-left: 3px solid var(--bixi-red);
      padding: 3px 9px;
    }

    h1 {
      max-width: 980px;
      font-size: 42px;
      color: var(--bixi-dark);
      font-weight: 600;
      line-height: 1.08;
      margin: 12px 0 8px;
    }

    .subtitle {
      font-size: 16px;
      color: var(--text-muted);
      max-width: 720px;
    }

    h1,
    h2,
    h3 {
      font-family: "Barlow Condensed", sans-serif;
    }

    .card {
      background: transparent;
      border-top: 1px solid var(--border);
      padding: 24px 0 8px;
      margin-bottom: 38px;
    }

    h2 {
      font-size: 20px;
      font-weight: 600;
      color: var(--bixi-dark);
      margin-bottom: 18px;
    }

    h3 {
      font-size: 17px;
      font-weight: 700;
      color: var(--bixi-dark);
      margin: 18px 0 8px;
    }

    p {
      margin-bottom: 12px;
      font-size: 15px;
    }

    .toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin-bottom: 16px;
      align-items: center;
    }

    .search-input {
      flex: 1 1 240px;
      min-width: 200px;
      padding: 10px 14px;
      border: 1px solid var(--border);
      border-radius: 3px;
      font-size: 14px;
      outline: none;
    }

    .search-input:focus {
      border-color: var(--bixi-red);
    }

    .filters {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .btn {
      padding: 8px 14px;
      border-radius: 3px;
      border: 1px solid var(--border);
      background: var(--card-bg);
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    }

    .btn:hover {
      background: var(--border);
    }

    .btn.active {
      background: var(--bixi-red);
      color: #fff;
      border-color: var(--bixi-red);
    }

    .btn-locate {
      border-color: var(--accent-blue);
      color: var(--accent-blue);
      font-weight: 700;
    }

    .btn-locate:hover {
      background: rgba(0, 102, 204, 0.08);
    }

    #map {
      height: 480px;
      width: 100%;
      border-radius: 3px;
      border: 1px solid var(--border);
    }

    .map-footnote {
      font-size: 13px;
      color: var(--text-muted);
      margin-top: 10px;
    }

    .steps {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 16px;
      margin: 16px 0;
    }

    .step-box {
      border: 1px solid var(--border);
      border-radius: 2px;
      padding: 16px;
      background: transparent;
    }

    .step-number {
      font: 600 12px "Barlow Condensed", sans-serif;
      color: var(--bixi-red);
      margin-bottom: 6px;
      text-transform: uppercase;
    }

    .code-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      border-bottom: 1px solid var(--border);
      margin-bottom: 16px;
    }

    .code-tab {
      padding: 10px 18px;
      background: none;
      border: none;
      border-bottom: 2px solid transparent;
      font-size: 13.5px;
      font-weight: 600;
      color: var(--text-muted);
      cursor: pointer;
    }

    .code-tab.active {
      color: var(--bixi-red);
      border-color: var(--bixi-red);
    }

    .code-window {
      background: var(--code-bg);
      border-radius: 2px;
      padding: 20px;
      overflow-x: auto;
      margin-bottom: 16px;
    }

    pre code {
      font-family: "Fira Code", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      font-size: 13px;
      color: #e5e9f0;
      line-height: 1.6;
    }

    .comment { color: #95a0ad; }
    .keyword { color: #ff7b72; }
    .function { color: #d2a8ff; }
    .string { color: #a5d6ff; }
    .number { color: #79c0ff; }

    .code-explanation {
      background: transparent;
      border-left: 2px solid var(--bixi-red);
      border-radius: 0;
      padding: 16px;
      margin-top: 12px;
      font-size: 14.5px;
    }

    .code-explanation ul {
      margin-left: 20px;
      margin-top: 8px;
    }

    .code-explanation li {
      margin-bottom: 6px;
    }

    .tech-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 12px;
      margin-top: 12px;
    }

    .tech-list li {
      position: relative;
      padding-left: 20px;
      font-size: 14.5px;
    }

    .tech-list li::before {
      content: "-";
      position: absolute;
      left: 0;
      color: var(--bixi-red);
      font-weight: bold;
    }

    .tech-list strong {
      color: var(--bixi-dark);
    }

    body[data-theme="dark"] {
      --bixi-dark: #f1f3f5;
      --bg: #171c19;
      --card-bg: #202722;
      --border: #39443d;
      --text: #e8eee9;
      --text-muted: #a3b0a7;
      --code-bg: #101411;
      --accent-blue: #7bc2b7;
      color-scheme: dark;
    }

    body[data-theme="dark"] .lang-btn,
    body[data-theme="dark"] .btn,
    body[data-theme="dark"] .search-input {
      background: #252e28;
      color: var(--text);
    }

    body[data-theme="dark"] .lang-btn:hover,
    body[data-theme="dark"] .btn:hover {
      background: #344139;
    }

    body[data-theme="dark"] .step-box,
    body[data-theme="dark"] .code-explanation {
      background: #202722;
    }

    @media (max-width: 700px) {
      body {
        padding: 18px 16px 48px;
      }

      header {
        margin-bottom: 30px;
      }

      h1 {
        font-size: 32px;
      }

      .card {
        margin-bottom: 30px;
      }

      .toolbar {
        align-items: stretch;
      }

      .search-input {
        flex-basis: 100%;
        min-width: 0;
      }

      .filters {
        width: 100%;
      }

      .filters .btn {
        flex: 1 1 auto;
      }

      .code-window {
        padding: 14px;
      }
    }
