
  @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

  * { margin: 0; padding: 0; box-sizing: border-box; }

  :root {
    --bg-primary: #000000;
    --bg-secondary: #121212;
    --accent: #F87728;
    --accent-dim: rgba(248, 119, 40, 0.08);
    --accent-hover: rgba(248, 119, 40, 0.14);
    --accent-glow: rgba(248, 119, 40, 0.25);
    --accent-line: rgba(248, 119, 40, 0.18);
    --text-primary: #EDEDED;
    --text-secondary: #8A8A8A;
    --text-muted: #555555;
    --green: #00D47E;
    --red: #FF4444;
    --tooltip-bg: #0A0A0A;
    --tooltip-border: rgba(248, 119, 40, 0.22);
  }

  body {
    background: var(--bg-primary);
    overflow-x: hidden;
    font-family: 'JetBrains Mono', monospace;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* ── Ticker Outer Container ────────────────────── */

  .btc-ticker-outer {
    width: 100%;
    position: relative;
    background: var(--bg-primary);
  }

  /* Top accent line */
  .btc-ticker-outer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 20%, var(--accent) 80%, transparent 100%);
    opacity: 0.5;
  }

  .btc-ticker-wrap {
    width: 100%;
    overflow: hidden;
    background: linear-gradient(180deg, #080808 0%, var(--bg-secondary) 50%, #080808 100%);
    border-bottom: 1px solid var(--accent-line);
    position: relative;
    height: 56px;
    display: flex;
    align-items: center;
  }

  /* Fade edges */
  .btc-ticker-wrap::before,
  .btc-ticker-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 4;
    pointer-events: none;
  }
  .btc-ticker-wrap::before {
    left: 0;
    background: linear-gradient(90deg, #080808 0%, transparent 100%);
  }
  .btc-ticker-wrap::after {
    right: 0;
    background: linear-gradient(270deg, #080808 0%, transparent 100%);
  }

  /* ── Ticker Track ──────────────────────────────── */

  .btc-ticker-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: ticker-scroll var(--scroll-duration, 80s) linear infinite;
  }

  @keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
  }

  /* ── Ticker Items ──────────────────────────────── */

  .btc-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 28px;
    font-size: 13px;
    line-height: 1;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    position: relative;
    cursor: default;
    height: 56px;
    transition: background 0.2s ease;
    border-radius: 0;
  }

  .btc-ticker-item:hover {
    background: var(--accent-hover);
  }

  .btc-ticker-item .icon-svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.9;
  }

  .btc-ticker-item .label {
    color: var(--accent);
    font-weight: 600;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: 'Outfit', sans-serif;
  }

  .btc-ticker-item .value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
  }

  .btc-ticker-item .unit {
    color: var(--text-secondary);
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: 0.02em;
  }

  .btc-ticker-item .change-up  { color: var(--green); font-size: 11px; font-weight: 600; }
  .btc-ticker-item .change-down { color: var(--red); font-size: 11px; font-weight: 600; }

  /* ── Separators ────────────────────────────────── */

  .btc-ticker-sep {
    display: inline-flex;
    align-items: center;
    padding: 0 2px;
    flex-shrink: 0;
    height: 56px;
  }

  .btc-ticker-sep::after {
    content: '';
    display: block;
    width: 1px;
    height: 20px;
    background: linear-gradient(180deg, transparent, var(--accent-line), transparent);
  }

  /* ── Tooltip Cloud ─────────────────────────────── */

  .btc-tooltip {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1), transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    max-width: 380px;
    min-width: 280px;
    filter: none;
  }

  .btc-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .btc-tooltip.above {
    transform: translateY(-8px);
  }
  .btc-tooltip.above.visible {
    transform: translateY(0);
  }

  .btc-tooltip-inner {
    background: #0A0A0A;
    border: 2px solid #1A1A1A;
    border-radius: 0;
    padding: 18px 20px;
    position: relative;
    box-shadow: 6px 6px 0px #F87728;
  }

  .btc-tooltip-title {
    font-family: 'Outfit', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
    padding-bottom: 9px;
    border-bottom: 1px solid #222222;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .btc-tooltip-body {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.65;
    color: #A8A8A8;
    letter-spacing: 0.005em;
  }

  .btc-tooltip-body strong {
    color: var(--text-primary);
    font-weight: 600;
  }

  .btc-tooltip-body em {
    color: var(--accent);
    font-style: normal;
    font-weight: 500;
  }

  /* Caret */
  .btc-tooltip-arrow {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #0A0A0A;
    border-left: 2px solid #1A1A1A;
    border-top: 2px solid #1A1A1A;
    transform: rotate(45deg);
    top: -9px;
    left: 40px;
  }

  .btc-tooltip.above .btc-tooltip-arrow {
    top: auto;
    bottom: -9px;
    border-left: none;
    border-top: none;
    border-right: 2px solid #1A1A1A;
    border-bottom: 2px solid #1A1A1A;
  }

  /* Mobile close button (only shown on touch) */
  .btc-tooltip-close {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 0;
    background: rgba(248, 119, 40, 0.15);
    border: 1px solid rgba(248, 119, 40, 0.3);
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  /* ── Loading State ─────────────────────────────── */

  .btc-ticker-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    width: 100%;
    color: var(--text-muted);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.1em;
    gap: 8px;
  }

  .btc-ticker-loading .dot {
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 1.2s ease-in-out infinite;
  }
  .btc-ticker-loading .dot:nth-child(2) { animation-delay: 0.2s; }
  .btc-ticker-loading .dot:nth-child(3) { animation-delay: 0.4s; }

  @keyframes pulse {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
  }

  /* ── Mobile Responsive ─────────────────────────── */

  @media (max-width: 768px) {
    .btc-ticker-wrap {
      height: 48px;
    }

    .btc-ticker-item {
      height: 48px;
      padding: 0 18px;
      gap: 6px;
    }

    .btc-ticker-item .label {
      font-size: 9px;
      letter-spacing: 0.08em;
    }

    .btc-ticker-item .value {
      font-size: 12px;
    }

    .btc-ticker-item .unit {
      font-size: 9px;
    }

    .btc-ticker-item .icon-svg {
      width: 12px;
      height: 12px;
    }

    .btc-ticker-sep {
      height: 48px;
      padding: 0 1px;
    }

    .btc-ticker-sep::after {
      height: 16px;
    }

    .btc-ticker-wrap::before,
    .btc-ticker-wrap::after {
      width: 40px;
    }

    .btc-tooltip {
      left: 8px !important;
      right: 8px !important;
      max-width: calc(100vw - 16px);
      min-width: unset;
    }

    .btc-tooltip-inner {
      padding: 14px 16px 14px 14px;
    }

    .btc-tooltip-body {
      font-size: 12.5px;
      line-height: 1.6;
    }

    .btc-tooltip-close {
      display: flex;
    }
  }

  @media (max-width: 400px) {
    .btc-ticker-item {
      padding: 0 14px;
      gap: 5px;
    }

    .btc-ticker-item .label {
      font-size: 8.5px;
    }

    .btc-ticker-item .value {
      font-size: 11px;
    }
  }
