:root {
      --bg: #080d1a;
      --surface: rgba(255,255,255,0.05);
      --surface2: rgba(255,255,255,0.09);
      --border: rgba(255,255,255,0.1);
      --border2: rgba(255,255,255,0.2);
      --text: #e2e5f0;
      --muted: rgba(226,229,240,0.45);
      --accent: #f0a500;
      --accent-dim: rgba(240,165,0,0.15);
      --teal: #00d4aa;
      --blue: #6080ff;
      --red: #ff5f57;
      --day-border: #f0a500;
      --night-border: #6080ff;
    }

    *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

    body {
      background: var(--bg);
      background-image:
        radial-gradient(ellipse 80% 50% at 15% 0%, rgba(96,128,255,0.13) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 85% 100%, rgba(240,165,0,0.09) 0%, transparent 55%);
      color: var(--text);
      min-height: 100vh;
      font-family: 'Syne', sans-serif;
      display: flex;
      flex-direction: column;
    }

    /* ─── Header ─────────────────────────────── */
    header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 28px;
      border-bottom: 1px solid var(--border);
      background: rgba(8,13,26,0.85);
      backdrop-filter: blur(20px);
      position: sticky;
      top: 0;
      z-index: 100;
      gap: 14px;
      flex-wrap: wrap;
    }

    .brand h1 {
      font-size: 19px;
      font-weight: 800;
      letter-spacing: -0.4px;
    }
    .brand h1 span { color: var(--accent); }

    .brand p {
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      color: var(--muted);
      margin-top: 2px;
      letter-spacing: 0.5px;
    }

    .controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

    .btn {
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      font-weight: 700;
      padding: 7px 14px;
      border-radius: 8px;
      border: 1px solid var(--border2);
      background: var(--surface2);
      color: var(--text);
      cursor: pointer;
      transition: all 0.18s ease;
      letter-spacing: 0.5px;
    }
    .btn:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.3); }
    .btn.active, .btn:focus-visible {
      background: var(--accent-dim);
      border-color: var(--accent);
      color: var(--accent);
      outline: none;
    }

    .btn-add {
      background: var(--accent);
      color: #000;
      border-color: var(--accent);
      font-family: 'Syne', sans-serif;
      font-size: 13px;
    }
    .btn-add:hover { background: #ffd060; border-color: #ffd060; color: #000; transform: translateY(-1px); }

    /* ─── Content ─────────────────────────────── */
    .content {
      max-width: 1380px;
      width: 100%;
      margin: 0 auto;
      padding: 28px 20px 40px;
      flex: 1;
    }


    /* ─── Map Section ─────────────────────────── */
    .map-section {
      margin-bottom: 32px;
      display: none;
    }
    .map-section.open {
      display: block;
      animation: mapSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes mapSlideDown {
      from { opacity: 0; transform: translateY(-8px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .map-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 14px;
      flex-wrap: wrap;
      gap: 10px;
    }

    .map-title-wrap {
      display: flex;
      flex-direction: column;
      gap: 3px;
    }

    .map-subtitle {
      font-size: 11px;
      color: var(--muted);
      letter-spacing: 0.3px;
    }

    .map-badge-group {
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .map-legend {
      display: flex;
      align-items: center;
      gap: 14px;
      font-size: 11px;
      color: var(--muted);
    }
    .legend-item {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .legend-dot {
      width: 9px;
      height: 9px;
      border-radius: 50%;
      display: inline-block;
    }
    .legend-dot.local { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
    .legend-dot.active { background: var(--teal); box-shadow: 0 0 8px var(--teal); }

    .map-wrapper {
      position: relative;
      background: radial-gradient(ellipse 90% 60% at 50% 50%, #0d1629 0%, #060a14 100%);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 18px;
      overflow: hidden;
      box-shadow: 0 12px 36px rgba(0,0,0,0.45);
      transition: all 0.3s ease;
    }
    .map-wrapper.collapsed {
      display: none;
    }

    .map-svg-wrap {
      width: 100%;
      position: relative;
      border-radius: 12px;
      overflow: hidden;
    }

    .world-map-svg {
      display: block;
      width: 100%;
      height: auto;
      max-height: 520px;
      filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
    }

    /* Country path styling */
    .allPaths {
      fill: #23344e;
      stroke: #0d1626;
      stroke-width: 0.7;
      cursor: pointer;
      transition: fill 0.15s ease, stroke 0.15s ease;
    }

    .allPaths:hover,
    .allPaths.country-hover {
      fill: #f0a500 !important;
      stroke: #ffffff !important;
      stroke-width: 1.5 !important;
      filter: drop-shadow(0 0 10px rgba(240,165,0,0.9));
    }

    .allPaths.card-active {
      fill: rgba(0, 212, 170, 0.35) !important;
      stroke: #00d4aa !important;
      stroke-width: 1.3 !important;
    }

    .allPaths.local-tz {
      fill: rgba(240, 165, 0, 0.4) !important;
      stroke: #f0a500 !important;
      stroke-width: 1.6 !important;
    }

    /* Floating Tooltip */
    .map-tooltip {
      position: absolute;
      pointer-events: none;
      z-index: 1000;
      background: rgba(13, 20, 36, 0.95);
      border: 1px solid var(--border2);
      border-radius: 12px;
      padding: 12px 16px;
      backdrop-filter: blur(16px);
      box-shadow: 0 12px 32px rgba(0,0,0,0.7);
      display: none;
      min-width: 210px;
      max-width: 280px;
    }

    .tip-title {
      font-size: 13px;
      font-weight: 700;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 4px;
    }

    .tip-time {
      font-family: 'JetBrains Mono', monospace;
      font-size: 20px;
      font-weight: 700;
      color: var(--accent);
      line-height: 1.1;
      margin-bottom: 2px;
    }

    .tip-date {
      font-size: 11px;
      color: var(--muted);
      margin-bottom: 8px;
    }

    .tip-pills {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
      margin-bottom: 8px;
    }

    .tip-hint {
      font-size: 10px;
      color: var(--teal);
      letter-spacing: 0.3px;
      border-top: 1px solid rgba(255,255,255,0.06);
      padding-top: 6px;
    }

    /* Highlight pulse for clock card when clicked on map */
    .clock-card.highlight-pulse {
      animation: cardPulse 1.8s ease-out;
    }
    @keyframes cardPulse {
      0% { box-shadow: 0 0 0 0 rgba(0, 212, 170, 0.8); border-color: var(--teal); }
      50% { box-shadow: 0 0 24px 6px rgba(0, 212, 170, 0.4); border-color: var(--teal); }
      100% { box-shadow: 0 0 0 0 rgba(0, 212, 170, 0); border-color: var(--border); }
    }


    /* ─── Time Travel / Converter Panel ─────── */
    .local-header-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
      gap: 12px;
      flex-wrap: wrap;
    }

    .travel-mode-badge {
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      letter-spacing: 1px;
      color: #00d4aa;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(0, 212, 170, 0.1);
      border: 1px solid rgba(0, 212, 170, 0.25);
      border-radius: 12px;
      padding: 3px 9px;
      font-weight: 600;
      transition: all 0.25s ease;
    }
    .travel-mode-badge.paused {
      color: var(--accent);
      background: rgba(240, 165, 0, 0.14);
      border-color: rgba(240, 165, 0, 0.35);
      box-shadow: 0 0 10px rgba(240, 165, 0, 0.2);
    }

    .live-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #00d4aa;
      box-shadow: 0 0 8px #00d4aa;
      display: inline-block;
      transition: background 0.2s, box-shadow 0.2s;
    }
    .live-dot.paused {
      background: var(--accent);
      box-shadow: 0 0 8px var(--accent);
    }

    .time-travel-panel {
      margin-top: 18px;
      padding-top: 16px;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .travel-row {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .travel-input-group {
      display: flex;
      align-items: center;
      gap: 6px;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 6px 10px;
      transition: border-color 0.2s, background 0.2s;
    }
    .travel-input-group:focus-within {
      border-color: var(--accent);
      background: var(--accent-dim);
    }

    .travel-label {
      font-size: 11px;
      color: var(--muted);
      font-weight: 600;
      white-space: nowrap;
    }

    .travel-input {
      background: transparent;
      border: none;
      outline: none;
      color: var(--text);
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
    }
    .travel-input::-webkit-calendar-picker-indicator {
      filter: invert(0.85) brightness(1.2);
      cursor: pointer;
    }

    .travel-quick-shifts {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .btn-shift {
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid var(--border);
      border-radius: 6px;
      color: var(--text);
      padding: 6px 9px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .btn-shift:hover {
      background: var(--accent-dim);
      border-color: var(--accent);
      color: var(--accent);
      transform: translateY(-1px);
    }

    .btn-live {
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      padding: 6px 14px;
      font-family: 'Syne', sans-serif;
      font-size: 12px;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      transition: all 0.2s ease;
      margin-left: auto;
    }
    .btn-live:hover {
      background: rgba(255, 255, 255, 0.14);
      border-color: rgba(255, 255, 255, 0.3);
    }
    .btn-live.is-traveling {
      background: var(--accent);
      color: #080d1a;
      border-color: var(--accent);
      box-shadow: 0 0 14px rgba(240, 165, 0, 0.5);
      animation: pulseTravel 2s infinite;
    }
    @keyframes pulseTravel {
      0%, 100% { box-shadow: 0 0 10px rgba(240, 165, 0, 0.4); }
      50% { box-shadow: 0 0 20px rgba(240, 165, 0, 0.8); }
    }

    .travel-slider-wrap {
      display: flex;
      flex-direction: column;
      gap: 5px;
      width: 100%;
    }

    .slider-marks {
      display: flex;
      justify-content: space-between;
      font-family: 'JetBrains Mono', monospace;
      font-size: 9px;
      color: var(--muted);
      padding: 0 2px;
    }

    .travel-range {
      -webkit-appearance: none;
      appearance: none;
      width: 100%;
      height: 6px;
      border-radius: 3px;
      background: rgba(255, 255, 255, 0.12);
      outline: none;
      cursor: pointer;
      transition: background 0.2s;
    }
    .travel-range:hover {
      background: rgba(255, 255, 255, 0.2);
    }
    .travel-range::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--accent);
      box-shadow: 0 0 10px var(--accent);
      cursor: pointer;
      border: 2px solid #fff;
      transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .travel-range::-webkit-slider-thumb:hover {
      transform: scale(1.25);
      box-shadow: 0 0 16px var(--accent);
    }
    .travel-range::-moz-range-thumb {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--accent);
      box-shadow: 0 0 10px var(--accent);
      cursor: pointer;
      border: 2px solid #fff;
    }

    /* ─── Local Hero ──────────────────────────── */
    .local-hero {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 28px;
      align-items: center;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 28px 32px;
      margin-bottom: 28px;
      position: relative;
      overflow: hidden;
    }

    .local-hero::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(ellipse 60% 120% at 100% 50%, rgba(240,165,0,0.06) 0%, transparent 70%);
      pointer-events: none;
    }

    .local-badge {
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      letter-spacing: 2.5px;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .local-badge::before {
      content: '';
      width: 6px; height: 6px;
      border-radius: 50%;
      background: var(--accent);
      box-shadow: 0 0 8px var(--accent);
      animation: pulse 2s infinite;
    }
    @keyframes pulse {
      0%,100% { opacity: 1; }
      50% { opacity: 0.4; }
    }

    #localTime {
      font-family: 'JetBrains Mono', monospace;
      font-size: 58px;
      font-weight: 700;
      letter-spacing: -2px;
      line-height: 1;
      margin-bottom: 8px;
      cursor: pointer;
      transition: color 0.2s;
    }
    #localTime:hover { color: var(--accent); }
    #localTime:hover::after { content: ' 📋'; font-size: 24px; }

    #localDate {
      font-size: 15px;
      color: var(--muted);
      margin-bottom: 8px;
    }

    .local-meta {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .pill {
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      padding: 4px 10px;
      border-radius: 20px;
      border: 1px solid var(--border);
      background: var(--surface);
    }
    .pill.teal { color: var(--teal); border-color: rgba(0,212,170,0.3); }
    .pill.amber { color: var(--accent); border-color: rgba(240,165,0,0.3); }

    /* ─── Analog Clock ────────────────────────── */
    .analog-wrap {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
    }
    .analog-wrap svg {
      width: 118px;
      height: 118px;
      filter: drop-shadow(0 0 12px rgba(240,165,0,0.12));
    }
    .analog-label {
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      color: var(--muted);
      letter-spacing: 1px;
    }

    /* ─── Section header ──────────────────────── */
    .section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
    }
    .section-title {
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      color: var(--muted);
      letter-spacing: 2.5px;
      text-transform: uppercase;
    }
    .clock-count {
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      color: var(--muted);
    }

    /* ─── Grid ────────────────────────────────── */
    .clock-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
      gap: 16px;
    }

    .grid-empty {
      grid-column: 1 / -1;
      text-align: center;
      padding: 42px 20px;
      border: 1px dashed var(--border);
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.02);
    }
    .grid-empty-icon { font-size: 28px; margin-bottom: 8px; opacity: 0.7; }
    .grid-empty-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
    .grid-empty-sub { font-size: 12px; color: var(--muted); }
    .grid-empty-sub strong { color: var(--accent); }

    /* ─── Clock Card ──────────────────────────── */
    .clock-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 18px;
      position: relative;
      display: flex;
      flex-direction: column;
      gap: 0;
      transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
      overflow: visible;
    }
    .clock-card:hover {
      border-color: var(--border2);
      transform: translateY(-2px);
      box-shadow: 0 8px 28px rgba(0,0,0,0.35);
    }
    .clock-card.is-day { border-left: 3px solid var(--day-border); }
    .clock-card.is-night { border-left: 3px solid var(--night-border); }

    .card-drag-handle {
      position: absolute;
      top: 10px;
      right: 36px;
      width: 22px;
      height: 22px;
      border-radius: 6px;
      border: 1px solid transparent;
      background: transparent;
      color: var(--muted);
      cursor: grab;
      font-size: 13px;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0.5;
      transition: all 0.18s;
      user-select: none;
      line-height: 1;
      z-index: 4;
    }
    .clock-card:hover .card-drag-handle {
      opacity: 1;
      border-color: var(--border);
      background: rgba(255, 255, 255, 0.05);
    }
    .card-drag-handle:hover {
      color: var(--accent);
      background: var(--accent-dim);
      border-color: rgba(240, 165, 0, 0.35);
    }
    .card-drag-handle:active {
      cursor: grabbing;
    }

    .clock-card.is-dragging {
      opacity: 0.35;
      transform: scale(0.97);
      border: 1px dashed var(--accent) !important;
      box-shadow: 0 12px 32px rgba(240, 165, 0, 0.25);
      cursor: grabbing;
    }

    .card-remove {
      position: absolute;
      top: 10px; right: 10px;
      width: 22px; height: 22px;
      border-radius: 50%;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      font-size: 11px;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: all 0.18s;
      line-height: 1;
      z-index: 4;
    }
    .clock-card:hover .card-remove { opacity: 1; }
    .card-remove:hover { background: var(--red); border-color: var(--red); color: #fff; }

    .card-top {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      margin-bottom: 10px;
      padding-right: 48px;
    }
    .card-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
    .card-tz { flex: 1; min-width: 0; }
    .card-name {
      font-size: 14px;
      font-weight: 700;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .card-region {
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      color: var(--muted);
      margin-top: 1px;
    }

    .card-time {
      font-family: 'JetBrains Mono', monospace;
      font-size: 30px;
      font-weight: 700;
      letter-spacing: -1px;
      line-height: 1;
      cursor: pointer;
      transition: color 0.15s;
    }
    .card-time:hover { color: var(--accent); }

    .card-date {
      font-size: 12px;
      color: var(--muted);
      margin-top: 4px;
      margin-bottom: 12px;
    }

    .card-pills {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-bottom: 14px;
    }
    .card-pills .pill { font-size: 10px; }
    .pill.ahead { color: #7fff7f; border-color: rgba(127,255,127,0.25); }
    .pill.behind { color: #ff9090; border-color: rgba(255,144,144,0.25); }
    .pill.same  { color: var(--muted); }

    /* ─── Searchable Dropdown ─────────────────── */
    .tz-selector { position: relative; }

    .tz-input-row {
      display: flex;
      align-items: center;
      gap: 6px;
      background: rgba(255,255,255,0.06);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 7px 10px;
      cursor: text;
      transition: border-color 0.18s, background 0.18s;
    }
    .tz-input-row:focus-within {
      border-color: var(--accent);
      background: var(--accent-dim);
    }
    .tz-icon { font-size: 12px; opacity: 0.5; flex-shrink: 0; }

    .tz-search {
      background: transparent;
      border: none;
      outline: none;
      color: var(--text);
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      width: 100%;
      min-width: 0;
    }
    .tz-search::placeholder { color: var(--muted); }

    .tz-clear {
      background: none;
      border: none;
      color: var(--muted);
      cursor: pointer;
      font-size: 13px;
      flex-shrink: 0;
      line-height: 1;
      padding: 0;
      display: none;
    }
    .tz-clear.visible { display: block; }
    .tz-clear:hover { color: var(--text); }

    .tz-dropdown {
      position: absolute;
      top: calc(100% + 5px);
      left: 0; right: 0;
      background: #111827;
      border: 1px solid var(--border2);
      border-radius: 10px;
      max-height: 190px;
      overflow-y: auto;
      z-index: 9000;
      display: none;
      box-shadow: 0 10px 36px rgba(0,0,0,0.6);
    }
    .tz-dropdown.open { display: block; }

    .tz-option {
      padding: 8px 12px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      cursor: pointer;
      border-bottom: 1px solid rgba(255,255,255,0.04);
      transition: background 0.1s;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
    }
    .tz-option:last-child { border-bottom: none; }
    .tz-option:hover, .tz-option.hl {
      background: var(--accent-dim);
      color: var(--accent);
    }
    .tz-option-offset {
      font-size: 10px;
      opacity: 0.5;
      flex-shrink: 0;
    }

    .tz-empty {
      padding: 14px;
      text-align: center;
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      color: var(--muted);
    }

    /* scrollbar */
    .tz-dropdown::-webkit-scrollbar { width: 4px; }
    .tz-dropdown::-webkit-scrollbar-track { background: transparent; }
    .tz-dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

    /* ─── Toast ───────────────────────────────── */
    .toast {
      position: fixed;
      bottom: 28px;
      left: 50%;
      transform: translateX(-50%) translateY(70px);
      background: var(--accent);
      color: #000;
      font-family: 'Syne', sans-serif;
      font-weight: 700;
      font-size: 13px;
      padding: 10px 22px;
      border-radius: 30px;
      z-index: 99999;
      pointer-events: none;
      transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
    }
    .toast.show { transform: translateX(-50%) translateY(0); }

    /* ─── Footer ──────────────────────────────── */
    footer {
      text-align: center;
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      color: var(--muted);
      padding: 18px;
      border-top: 1px solid var(--border);
      background: rgba(8,13,26,0.6);
    }

    /* ─── Responsive ──────────────────────────── */
    @media (max-width: 680px) {
      header { padding: 12px 16px; }
      .content { padding: 20px 14px 36px; }

      .local-hero {
        grid-template-columns: 1fr;
        padding: 22px 20px;
        text-align: center;
        gap: 20px;
      }
      .local-badge { justify-content: center; }
      .local-header-row { justify-content: center; flex-wrap: wrap; }
      .travel-row { justify-content: center; }
      .btn-live { margin-left: 0; width: 100%; justify-content: center; }
      .local-meta { justify-content: center; }
      #localTime { font-size: 42px; }
      .analog-wrap { display: none; }
    }

    @media (max-width: 400px) {
      #localTime { font-size: 34px; }
      .clock-grid { grid-template-columns: 1fr; }
    }

/* --- User Profile & Auth Nav in Header --- */
.user-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--border2);
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.3);
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.btn-logout {
  background: rgba(255, 95, 87, 0.12);
  border-color: rgba(255, 95, 87, 0.35);
  color: #ff7b72;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-logout:hover {
  background: rgba(255, 95, 87, 0.25);
  border-color: #ff5f57;
  color: #fff;
}

/* Guest Navigation & Badges */
.guest-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.guest-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8892b0;
}

.btn-login {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
}

.btn-login:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-register {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #080d1a;
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
}

.btn-register:hover {
  background: #ffb41f;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(240, 165, 0, 0.35);
}

@media (max-width: 600px) {
  .user-nav {
    border-left: none;
    padding-left: 0;
    width: 100%;
    justify-content: flex-end;
  }
}
