/* ==========================================================================
   AetherVault Scan — Premium Dark UI
   Mobile-first · 3D · Animated gradients · Neon glows
   ========================================================================== */

/* ── Reset ────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --bg: #030712;
    --bg-card: rgba(12, 17, 29, 0.7);
    --bg-hover: rgba(22, 30, 50, 0.8);
    --cyan: #06B6D4;
    --cyan-dim: rgba(6, 182, 212, 0.12);
    --blue: #3B82F6;
    --purple: #8B5CF6;
    --teal: #2DD4BF;
    --green: #22C55E;
    --red: #EF4444;
    --amber: #F59E0B;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border: rgba(148, 163, 184, 0.08);
    --border-glow: rgba(6, 182, 212, 0.2);
    --glow-cyan: 0 0 30px rgba(6, 182, 212, 0.15), 0 0 60px rgba(6, 182, 212, 0.05);
    --glow-purple: 0 0 30px rgba(139, 92, 246, 0.15), 0 0 60px rgba(139, 92, 246, 0.05);
    --radius: 1rem;
    --radius-sm: 0.75rem;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Animated background orbs ─────────────────────────────────────────── */
.bg-orbs {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: orbFloat 20s ease-in-out infinite alternate;
}

.bg-orb--1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.25), transparent 70%);
    top: -10%;
    left: -10%;
    animation-duration: 25s;
}

.bg-orb--2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 70%);
    bottom: -5%;
    right: -5%;
    animation-duration: 30s;
    animation-delay: -10s;
}

.bg-orb--3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15), transparent 70%);
    top: 40%;
    left: 50%;
    animation-duration: 22s;
    animation-delay: -5s;
}

@keyframes orbFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(40px, -30px) scale(1.08);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    100% {
        transform: translate(30px, -10px) scale(1.05);
    }
}

/* Noise overlay */
.bg-noise {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

/* ── Glass surfaces ───────────────────────────────────────────────────── */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border: 1px solid var(--border);
}

.glass-glow {
    background: var(--bg-card);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border: 1px solid var(--border-glow);
    box-shadow: var(--glow-cyan);
}

/* ── Container ────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ══════════════════════════════════════════════════════════════════════════
   HEADER — Mobile first
   ══════════════════════════════════════════════════════════════════════════ */
.scan-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition), box-shadow var(--transition);
}

.scan-header.scrolled {
    background: rgba(3, 7, 18, 0.92) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    gap: 0.75rem;
}

.scan-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.scan-logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scan-logo .icon-box {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.125rem;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
    transition: transform var(--transition);
}

.scan-logo .icon-box:hover {
    transform: rotate(-8deg) scale(1.1);
}

.scan-logo .brand {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }
}

/* Connection badge */
.scan-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.2);
    transition: all var(--transition);
}

.scan-badge.live {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green);
    border-color: rgba(34, 197, 94, 0.25);
}

.ws-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    transition: all var(--transition);
}

.ws-dot.connected {
    background: var(--green);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {

    0%,
    100% {
        box-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 12px rgba(34, 197, 94, 1);
    }
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-links {
    display: none;
    align-items: center;
    gap: 1.25rem;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    position: relative;
    transition: color var(--transition);
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    border-radius: 1px;
    transition: width var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.last-updated {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.6875rem;
    color: var(--text-dim);
    white-space: nowrap;
}

.pulse-live {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    animation: pulseDot 2s ease-in-out infinite;
}

/* ══════════════════════════════════════════════════════════════════════════
   STATS BAR — Horizontal scroll on mobile
   ══════════════════════════════════════════════════════════════════════════ */
.stats-bar {
    margin-top: 3.5rem;
    padding: 0.75rem 0;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.stats-bar .bar-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.25rem 0;
}

.stats-bar .bar-inner::-webkit-scrollbar {
    display: none;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.stat-item .label {
    color: var(--text-dim);
}

.stat-item .value {
    font-weight: 600;
}

#refreshBtn {
    background: none;
    border: 1px solid var(--border);
    color: var(--cyan);
    cursor: pointer;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    transition: all var(--transition);
}

#refreshBtn:hover {
    background: var(--cyan-dim);
    border-color: var(--border-glow);
}

/* ══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════════════════════════════════ */
.scan-main {
    position: relative;
    z-index: 10;
    padding: 1.5rem 0 3rem;
}

/* Section titles with accent */
.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title .accent {
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── Scroll reveal animation ──────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════════════════
   TOP CRYPTO CARDS — 3D perspective + hover
   ══════════════════════════════════════════════════════════════════════════ */
.top-cards {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scrollbar-width: none;
    padding-top: 1rem;
    margin-bottom: 2rem;
    perspective: 1000px;
}

.top-cards::-webkit-scrollbar {
    display: none;
}

.crypto-card {
    min-width: 180px;
    flex-shrink: 0;
    border-radius: var(--radius);
    padding: 1.125rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.03, 0.98, 0.52, 0.99),
        box-shadow 0.4s ease;
}

/* Animated border gradient on hover */
.crypto-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from var(--card-angle, 0deg), transparent 30%, var(--cyan) 50%, transparent 70%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.crypto-card:hover::before {
    opacity: 1;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    to {
        --card-angle: 360deg;
    }
}

/* Fallback for browsers that don't support @property */
@supports not (background: conic-gradient(from 0deg, red, blue)) {
    .crypto-card::before {
        background: linear-gradient(135deg, var(--cyan), var(--blue));
    }
}

@property --card-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.crypto-card:hover {
    transform: translateY(-6px) rotateX(2deg);
    box-shadow: 0 20px 60px rgba(6, 182, 212, 0.12), 0 0 40px rgba(6, 182, 212, 0.06);
}

/* Inner glow on card */
.crypto-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.crypto-card .card-head {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.875rem;
    position: relative;
    z-index: 1;
}

.crypto-card .coin-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
}

.crypto-card .coin-info .coin-name {
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.2;
}

.crypto-card .coin-info .coin-sym {
    font-size: 0.6875rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.crypto-card .card-price {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    position: relative;
    z-index: 1;
}

.crypto-card .card-change {
    font-size: 0.75rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.change.up {
    color: var(--green);
}

.change.down {
    color: var(--red);
}

/* ══════════════════════════════════════════════════════════════════════════
   CHART SECTION — with 3D depth
   ══════════════════════════════════════════════════════════════════════════ */
.chart-section {
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 2rem;
    display: none;
    position: relative;
    overflow: hidden;
}

.chart-section.active {
    display: block;
    animation: chartSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chartSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Scanning line across chart */
.chart-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    animation: scanLine 4s linear infinite;
    opacity: 0.5;
}

@keyframes scanLine {
    0% {
        left: -60%;
    }

    100% {
        left: 100%;
    }
}

.chart-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.chart-coin-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chart-coin-info img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.chart-coin-info .chart-coin-name {
    font-size: 1rem;
    font-weight: 700;
}

.chart-coin-info .chart-coin-price {
    font-size: 1.25rem;
    font-weight: 700;
}

.chart-coin-info .chart-coin-change {
    font-size: 0.8125rem;
    font-weight: 600;
}

.chart-period-tabs {
    display: flex;
    gap: 0.25rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--radius-sm);
    padding: 0.2rem;
    width: fit-content;
}

.period-tab {
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
}

.period-tab:hover {
    color: var(--text);
}

.period-tab.active {
    background: rgba(6, 182, 212, 0.15);
    color: var(--cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.1);
}

.chart-canvas-wrap {
    position: relative;
    height: 220px;
    margin: 0 -0.5rem;
}

.chart-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
    margin-top: 1rem;
}

.chart-stat-item {
    padding: 0.625rem;
    border-radius: var(--radius-sm);
    background: rgba(10, 15, 30, 0.5);
    border: 1px solid var(--border);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.chart-stat-item:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.05);
}

.chart-stat-item .stat-label {
    font-size: 0.625rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.2rem;
}

.chart-stat-item .stat-value {
    font-size: 0.875rem;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════════════════
   TOOLBAR
   ══════════════════════════════════════════════════════════════════════════ */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.search-box {
    width: 100%;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.8125rem;
    font-family: var(--font);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box input::placeholder {
    color: var(--text-dim);
}

.search-box input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.search-box .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    width: 14px;
    height: 14px;
}

.filter-btn {
    padding: 0.4375rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    font-family: var(--font);
}

.filter-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
    border-color: rgba(148, 163, 184, 0.15);
}

.filter-btn.active {
    background: var(--cyan-dim);
    border-color: rgba(6, 182, 212, 0.3);
    color: var(--cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.08);
}

/* ══════════════════════════════════════════════════════════════════════════
   CURRENCY TABLE — premium rows
   ══════════════════════════════════════════════════════════════════════════ */
.currency-table-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2rem;
}

.currency-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.currency-table thead th {
    padding: 0.75rem 0.625rem;
    text-align: left;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
    transition: color var(--transition);
    position: sticky;
    top: 0;
    background: rgba(10, 15, 30, 0.95);
    backdrop-filter: blur(8px);
    z-index: 5;
}

.currency-table thead th:hover {
    color: var(--cyan);
}

.currency-table thead th.sorted {
    color: var(--cyan);
}

.currency-table thead th .sort-arrow {
    margin-left: 3px;
    font-size: 0.5rem;
    opacity: 0.7;
}

.currency-table tbody tr {
    border-bottom: 1px solid rgba(148, 163, 184, 0.04);
    transition: all var(--transition);
    cursor: pointer;
}

.currency-table tbody tr:hover {
    background: var(--bg-hover);
    box-shadow: inset 0 0 60px rgba(6, 182, 212, 0.02);
}

.currency-table tbody tr:active {
    transform: scale(0.995);
}

.currency-table td {
    padding: 0.625rem;
    white-space: nowrap;
}

.coin-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.coin-cell img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.coin-cell .fiat-flag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.04);
}

.coin-cell .cell-name {
    font-weight: 600;
    font-size: 0.8125rem;
}

.coin-cell .cell-sym {
    font-size: 0.625rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-dim);
    transition: all var(--transition);
    padding: 0.125rem;
    line-height: 1;
}

.fav-btn:hover {
    transform: scale(1.3);
}

.fav-btn.active {
    color: var(--amber);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
    animation: starPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes starPop {
    0% {
        transform: scale(0.5);
    }

    60% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

/* Price flash */
.price-flash-up {
    animation: flashUp 0.8s ease;
}

.price-flash-down {
    animation: flashDown 0.8s ease;
}

@keyframes flashUp {
    0% {
        background: rgba(34, 197, 94, 0.2);
    }

    100% {
        background: transparent;
    }
}

@keyframes flashDown {
    0% {
        background: rgba(239, 68, 68, 0.2);
    }

    100% {
        background: transparent;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   CONVERTER — with depth card
   ══════════════════════════════════════════════════════════════════════════ */
.converter-section {
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

/* Subtle inner glow */
.converter-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.converter-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.converter-field label {
    display: block;
    font-size: 0.625rem;
    color: var(--text-dim);
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.converter-field select,
.converter-field input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(10, 15, 30, 0.6);
    color: var(--text);
    font-size: 0.875rem;
    font-family: var(--font);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.converter-field select:focus,
.converter-field input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.08);
}

.converter-field select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.25rem;
}

.converter-field select option {
    background: #0f172a;
    color: #e2e8f0;
}

.converter-swap-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    align-self: center;
    flex-shrink: 0;
    transform: rotate(90deg);
}

.converter-swap-btn:hover {
    background: var(--cyan-dim);
    transform: rotate(270deg);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
}

.converter-result {
    margin-top: 0.75rem;
    padding: 0.875rem;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.06), rgba(59, 130, 246, 0.04));
    border: 1px solid rgba(6, 182, 212, 0.12);
    text-align: center;
    position: relative;
    z-index: 1;
}

.converter-result .result-value {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.converter-result .result-label {
    font-size: 0.6875rem;
    color: var(--text-dim);
    margin-top: 0.2rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ══════════════════════════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 4.5rem;
    right: 1rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: calc(100% - 2rem);
}

.toast {
    pointer-events: auto;
    min-width: 240px;
    max-width: 340px;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.toast.info {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.25);
    color: var(--cyan);
}

.toast.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.25);
    color: var(--green);
}

.toast.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.25);
    color: var(--amber);
}

.toast.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: var(--red);
}

.toast.hiding {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(60px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(60px);
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════════════ */
.scan-footer {
    position: relative;
    z-index: 10;
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
}

.scan-footer .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.scan-footer .footer-text {
    color: var(--text-dim);
    font-size: 0.6875rem;
}

.scan-footer .footer-links {
    display: flex;
    gap: 1.25rem;
}

.scan-footer .footer-links a {
    color: var(--text-dim);
    font-size: 0.75rem;
    transition: color var(--transition);
}

.scan-footer .footer-links a:hover {
    color: var(--cyan);
}

/* ══════════════════════════════════════════════════════════════════════════
   EMPTY STATE & SKELETON
   ══════════════════════════════════════════════════════════════════════════ */
.skeleton {
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.4) 25%, rgba(51, 65, 85, 0.4) 50%, rgba(30, 41, 59, 0.4) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease infinite;
    border-radius: 0.5rem;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-dim);
}

.empty-state .empty-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.4;
}

/* ══════════════════════════════════════════════════════════════════════════
   SCROLLBAR
   ══════════════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* ══════════════════════════════════════════════════════════════════════════
   FOCUS STATES
   ══════════════════════════════════════════════════════════════════════════ */
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}

/* Number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (≥640px)
   ══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }

    .nav-inner {
        padding: 0.875rem 0;
    }

    .stats-bar {
        margin-top: 4rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .crypto-card {
        min-width: 200px;
        padding: 1.25rem;
    }

    .crypto-card .card-price {
        font-size: 1.375rem;
    }

    .search-box {
        width: auto;
        flex: 1;
        min-width: 200px;
    }

    .converter-grid {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 1rem;
        align-items: end;
    }

    .converter-swap-btn {
        transform: rotate(0deg);
        margin-top: 1rem;
    }

    .converter-swap-btn:hover {
        transform: rotate(180deg);
    }

    .chart-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .chart-canvas-wrap {
        height: 280px;
    }

    .chart-stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .scan-footer .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Desktop (≥1024px)
   ══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
    .nav-links {
        display: flex;
    }

    .stats-bar {
        margin-top: 4.25rem;
    }

    .scan-logo .icon-box {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }

    .scan-logo .brand {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }

    .top-cards {
        gap: 1rem;
    }

    .crypto-card {
        min-width: 220px;
    }

    .currency-table {
        font-size: 0.875rem;
    }

    .currency-table td,
    .currency-table th {
        padding: 0.75rem 1rem;
    }

    .chart-canvas-wrap {
        height: 320px;
    }

    .converter-section {
        padding: 1.5rem;
    }

    .converter-result .result-value {
        font-size: 1.5rem;
    }

    .toast {
        min-width: 300px;
    }
}

/* Hide non-essential columns on small screens */
@media (max-width: 639px) {
    .currency-table .hide-mobile {
        display: none;
    }

    .chart-coin-info .chart-coin-price {
        font-size: 1.125rem;
    }
}