/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables for theme support */
:root {
    /* Light mode (VC Mode) colors */
    --bg-gradient-start: #667eea;
    --bg-gradient-end: #764ba2;
    --text-primary: #333;
    --text-secondary: #6b7280;
    --text-tertiary: #1f2937;
    --text-on-primary: white;
    --surface-primary: white;
    --surface-secondary: #f3f4f6;
    --surface-glass: rgba(255,255,255,0.15);
    --surface-glass-solid: rgba(255,255,255,0.9);
    --accent-green: #10b981;
    --accent-green-light: #4ade80;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --border-color: #e5e7eb;
    --shadow-light: rgba(0,0,0,0.1);
    --shadow-medium: rgba(0,0,0,0.15);
    --glass-backdrop: rgba(255,255,255,0.2);
    --series-chainflip: #22c55e;
    --series-thorchain: #3b82f6;
    --series-near-intents: #f97316;
}

[data-theme="dark"] {
    /* Dark mode (Founder Mode) colors */
    --bg-gradient-start: #1a1a1a;
    --bg-gradient-end: #2d1b69;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-tertiary: #f9fafb;
    --text-on-primary: #ffffff;
    --surface-primary: #1f2937;
    --surface-secondary: #374151;
    --surface-glass: rgba(31,41,55,0.8);
    --surface-glass-solid: rgba(31,41,55,0.95);
    --accent-green: #10b981;
    --accent-green-light: #34d399;
    --accent-orange: #fbbf24;
    --accent-red: #f87171;
    --border-color: #4b5563;
    --shadow-light: rgba(0,0,0,0.3);
    --shadow-medium: rgba(0,0,0,0.4);
    --glass-backdrop: rgba(31,41,55,0.7);
    --series-chainflip: #34d399;
    --series-thorchain: #60a5fa;
    --series-near-intents: #fb923c;
}

/* SEO Content Styling */
.seo-content {
    background: var(--surface-primary);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 20px var(--shadow-light);
}

.seo-content h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--bg-gradient-start);
    padding-bottom: 0.5rem;
}

.seo-content h3 {
    color: var(--text-secondary);
    font-size: 1.4rem;
    margin: 1.5rem 0 0.8rem 0;
}

.seo-content p {
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.seo-content ul {
    margin-left: 2rem;
    color: var(--text-primary);
}

.seo-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.seo-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: var(--surface-primary);
    border-radius: 18px;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 24px var(--shadow-light);
    margin-bottom: 2.5rem;
    position: relative;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--accent-green);
}

.nav-links a:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 4px;
    border-radius: 8px;
}

/* Dropdown navigation */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.2s ease;
    background: none;
    border: none;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
}

.nav-dropdown-trigger:hover,
.nav-dropdown-trigger:focus {
    color: var(--accent-green);
}

.nav-dropdown-arrow {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-arrow,
.nav-dropdown.is-open .nav-dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background: var(--surface-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 10px 30px var(--shadow-medium);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus {
    background: var(--surface-secondary);
    color: var(--accent-green);
}

.nav-dropdown-menu a.active {
    background: var(--surface-secondary);
    color: var(--accent-green);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.site-nav .theme-toggle-container {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.site-nav .theme-label {
    color: var(--text-primary);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 4px;
}

.nav-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .nav-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

.nav-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.is-open .nav-toggle-bar-top {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bar-middle {
    opacity: 0;
}

.nav-toggle.is-open .nav-toggle-bar-bottom {
    transform: translateY(-7px) rotate(-45deg);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.quotes-section {
    margin-bottom: 3rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    margin-top: 3rem;
    color: var(--text-on-primary);
}

.title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 400;
    margin-bottom: 1rem;
}

.btc-price-reference {
    margin: 1rem 0;
    font-size: 1rem;
    opacity: 0.8;
}

.btc-price-label {
    margin-right: 0.5rem;
}

.btc-price-value {
    font-weight: 600;
    color: var(--accent-green-light);
}

.btc-price-value.error {
    color: var(--accent-red);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--glass-backdrop);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: pulse 2s infinite;
}

.status-dot.error {
    background: var(--accent-red);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Input section */
.input-section {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.btc-input-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface-glass);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.input-label {
    color: var(--text-on-primary);
    font-weight: 500;
    font-size: 1rem;
}

.btc-input {
    background: var(--surface-glass-solid);
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    width: 120px;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.btc-input:focus {
    background: var(--surface-primary);
    box-shadow: 0 0 0 2px var(--glass-backdrop);
}

/* Refresh section */
.refresh-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface-primary);
    color: var(--text-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-light);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

.refresh-btn:active {
    transform: translateY(0);
}

.refresh-btn.loading .refresh-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auto-refresh {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-on-primary);
    font-weight: 500;
}

/* Toggle switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--glass-backdrop);
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-on-primary);
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-green);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Dark mode toggle */
.theme-toggle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}

.theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-backdrop);
    transition: 0.4s;
    border-radius: 32px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
}

.theme-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 2px;
    background: linear-gradient(135deg, var(--accent-green-light) 0%, var(--accent-green) 100%);
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

input:checked + .theme-slider:before {
    transform: translateX(28px);
}

.theme-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-on-primary);
    text-align: center;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

@media (max-width: 1024px) {
    .nav-links {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .site-nav {
        align-items: center;
    }

    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
    }

    .nav-menu {
        position: absolute;
        top: calc(100% + 0.75rem);
        left: 0;
        right: 0;
        background: var(--surface-primary);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 1rem 1.25rem;
        box-shadow: 0 16px 40px var(--shadow-medium);
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        display: none;
        z-index: 10;
    }

    .nav-menu.is-open {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .nav-links a {
        padding: 0.5rem 0.25rem;
        border-radius: 8px;
    }

    /* Mobile dropdown styles */
    .nav-dropdown-trigger {
        width: 100%;
        justify-content: space-between;
        padding: 0.5rem 0.25rem;
    }

    .nav-dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0 0 0 1rem;
        margin-top: 0.5rem;
        display: none;
    }

    .nav-dropdown.is-open .nav-dropdown-menu {
        display: block;
    }

    .nav-dropdown:hover .nav-dropdown-menu {
        display: none;
    }

    .nav-dropdown.is-open:hover .nav-dropdown-menu {
        display: block;
    }

    .nav-dropdown-menu a {
        padding: 0.5rem 0.75rem;
        background: var(--surface-secondary);
        margin-bottom: 0.35rem;
    }

    .nav-actions {
        border-top: 1px solid var(--border-color);
        padding-top: 0.75rem;
    }

    .site-nav .theme-toggle-container {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.3rem;
    }

    .refresh-section {
        flex-direction: column;
        gap: 1rem;
    }

    .header {
        margin-top: 1rem;
    }

    .theme-toggle {
        width: 50px;
        height: 28px;
    }

    .theme-slider:before {
        width: 20px;
        height: 20px;
        left: 4px;
        bottom: 2px;
    }

    input:checked + .theme-slider:before {
        transform: translateX(22px);
    }

    .theme-label {
        font-size: 0.7rem;
        position: relative;
        transition: transform 0.4s ease;
        transform: translateX(-8px);
    }
}

/* Dynamic label positioning on mobile */
@media (max-width: 768px) {
    .theme-toggle-container.dark-mode .theme-label {
        transform: translateX(8px);
    }
}

/* Quotes container */
.quotes-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.quote-card {
    background: var(--surface-primary);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px var(--shadow-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quote-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow-medium);
}

.quote-card.best {
    border: 3px solid var(--accent-green);
}

[data-theme="light"] .quote-card.best {
    background: linear-gradient(145deg, #ffffff 0%, #f0fdf4 100%);
}

[data-theme="dark"] .quote-card.best {
    background: linear-gradient(145deg, var(--surface-primary) 0%, #064e3b 100%);
}

.quote-card.best::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-green), #059669);
}

.venue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.venue-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-tertiary);
}

.rank-badge {
    background: var(--surface-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.rank-badge.first {
    background: var(--accent-green);
    color: var(--text-on-primary);
}

.rank-badge.second {
    background: var(--accent-orange);
    color: var(--text-on-primary);
}

.rank-badge.third {
    background: var(--accent-red);
    color: var(--text-on-primary);
}

.best-badge {
    background: var(--accent-green);
    color: var(--text-on-primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
    width: fit-content;
}

.quote-details {
    display: grid;
    gap: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    font-weight: 600;
    color: var(--text-tertiary);
}

.output-amount {
    font-size: 1.5rem;
    color: var(--accent-green);
}

.rate {
    font-size: 1.25rem;
    color: var(--text-tertiary);
}

/* DCA styling */
.dca-indicator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 0.5rem;
    margin: 0.5rem 0;
}

.dca-indicator .detail-label,
.dca-indicator .detail-value {
    color: white;
}

.dca-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.dca-stats {
    background: rgba(103, 126, 234, 0.1);
    border-left: 3px solid #667eea;
    padding: 0.4rem 0.6rem;
    margin: 0.2rem 0;
    border-radius: 4px;
}

.dca-stats .detail-label {
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
}

.dca-stats .detail-value {
    color: #374151;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 4rem;
    color: var(--text-on-primary);
    grid-column: 1 / -1;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--glass-backdrop);
    border-top: 4px solid var(--text-on-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* Summary section */
.summary-section {
    margin-bottom: 2rem;
}

.summary-card {
    background: var(--surface-primary);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px var(--shadow-light);
}

.summary-card h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-tertiary);
    font-size: 1.5rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-tertiary);
}

/* Volume comparison section */
.volume-section {
    margin: 2.5rem 0;
}

.volume-card {
    background: var(--surface-primary);
    border-radius: 18px;
    padding: 1.75rem 2rem;
    box-shadow: 0 18px 35px var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.volume-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.volume-card h2 {
    color: var(--text-primary);
    font-size: 1.6rem;
}

.volume-card-subtitle {
    color: var(--text-secondary);
    margin-top: 0.35rem;
    margin-bottom: 1.25rem;
    max-width: 720px;
}

.volume-totals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.total-card {
    background: var(--surface-secondary);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    border: 1px solid transparent;
    box-shadow: inset 0 0 0 1px var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.total-card:hover {
    border-color: var(--border-color);
    box-shadow: inset 0 0 0 1px var(--text-secondary);
    transform: translateY(-2px);
}

.total-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.total-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}

.total-hint {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.volume-updated {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.volume-chart-container {
    position: relative;
    background: var(--surface-secondary);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: inset 0 0 0 1px var(--border-color);
    min-height: 280px;
    overflow: hidden;
}

#volumeChart,
#monthlyVolumeChart {
    width: 100%;
    height: 100%;
    display: block;
}

.volume-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-tooltip {
    position: absolute;
    pointer-events: none;
    background: var(--surface-primary);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 12px 30px var(--shadow-medium);
    border: 1px solid var(--border-color);
    transform: translate(-50%, -120%);
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 2;
}

.chart-tooltip.is-visible {
    opacity: 1;
    transform: translate(-50%, -130%);
}

.chart-tooltip strong {
    display: block;
    margin-bottom: 0.35rem;
}

.tooltip-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.tooltip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}


.chart-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    pointer-events: none;
}

.chart-error {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    color: var(--accent-red);
    font-weight: 600;
}

.chart-error.is-visible {
    display: flex;
}

.volume-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.volume-coverage {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    background: var(--surface-secondary);
    box-shadow: 0 10px 26px var(--shadow-light);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.volume-coverage[hidden] {
    display: none;
}

.coverage-heading {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 0.75rem;
}

.coverage-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.coverage-card {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    color: var(--text-secondary);
}

.coverage-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.coverage-name {
    font-weight: 600;
    color: var(--text-primary);
}

.coverage-range {
    color: var(--text-secondary);
}

.coverage-range--missing {
    color: var(--accent-red);
    font-weight: 500;
}

.daily-volume-range {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.daily-volume-card {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.daily-volume-entry {
    padding: 1rem 1.25rem;
    border-radius: 16px;
    background: var(--surface-secondary);
    box-shadow: 0 10px 26px var(--shadow-light);
}

.daily-volume-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

.daily-volume-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.daily-volume-name {
    flex: 1;
    margin-left: 0.5rem;
}

.daily-volume-total {
    color: var(--text-primary);
    font-size: 1rem;
}

.daily-volume-meta {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.daily-volume-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.daily-volume-meta-item.is-complete {
    color: var(--text-secondary);
}

.daily-volume-meta-item.is-partial {
    color: var(--accent-red);
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: var(--surface-secondary);
    box-shadow: 0 6px 18px var(--shadow-light);
}

.legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-name {
    color: var(--text-primary);
    font-weight: 600;
}

.legend-value {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.volume-source {
    margin-top: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.volume-source a {
    color: var(--bg-gradient-start);
    text-decoration: none;
    font-weight: 500;
}

[data-theme="dark"] .volume-source a {
    color: var(--accent-green-light);
}

.volume-source a:hover {
    text-decoration: underline;
}

.chart-grid-line {
    stroke: var(--border-color);
    stroke-width: 1.2;
    stroke-dasharray: 4 4;
    opacity: 0.6;
}



/* Footer */
.footer {
    text-align: center;
    color: var(--text-on-primary);
    opacity: 0.95;
    font-size: 0.875rem;
    background: var(--glass-backdrop);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.footer p {
    margin-bottom: 0.5rem;
}

.last-updated {
    font-weight: 500;
}

/* Fee breakdown */
.fee-breakdown {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.fee-breakdown-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.fee-icon {
    font-size: 1rem;
}

.fee-title {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.fee-list {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.fee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
}

.fee-type {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

.fee-amount {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    font-weight: 600;
}

.fee-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

.fee-total-label {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    font-weight: 600;
}

.fee-total-amount {
    color: var(--accent-red);
    font-size: 0.875rem;
    font-weight: 700;
}

/* Error state */
.error-message {
    background: var(--surface-primary);
    border: 2px solid var(--accent-red);
    color: var(--accent-red);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    grid-column: 1 / -1;
    opacity: 0.9;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .quotes-container {
        grid-template-columns: 1fr;
    }
    
    .refresh-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .volume-card {
        padding: 1.5rem;
    }

    .volume-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .volume-chart-container {
        min-height: 260px;
        padding: 0.75rem;
    }

    .volume-legend {
        flex-direction: column;
        align-items: flex-start;
    }
}
