@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;700&display=swap');
:root {
    /* Unified public theme variables (kept consistent with data/charts/style.css) */
    --background: #262a33;         /* page background */
    --component-bg: #1f232c;       /* containers/panels */
    --text-primary: #e5f7ef;       /* main text */
    --text-secondary: #646669;     /* secondary text */
    --accent: #43ffaf;             /* accent / positive */
    --border-color: #1f232c;       /* subtle borders */
    --error: #d22a2a;              /* negative */
    /* nav skew menu config */
    --skew-angle: 25deg;
    --menu-radius: 7px;
}

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

body {
    font-family: 'Roboto Mono', monospace;
    background-color: var(--background);
    color: var(--text-primary);
    margin: 0;
    padding: 0; /* ensure header/footer can be full-width */
    line-height: 1.6;
}

header {
    background-color: var(--component-bg); /* full-width title bar with component background */
    padding: 0.25rem 0; /* much tighter header since H1 is hidden */
    text-align: center;
    color: var(--text-primary);
    position: relative; /* allow burger positioning */
}

.site-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    flex-wrap: wrap;
    position: relative;
}

.site-header__row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.site-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.site-logo {
    width: min(34vw, 460px);
    height: clamp(64px, 8vw, 120px);
    display: block;
    margin-bottom: 0.35rem;
    background: var(--accent);
    -webkit-mask: url('Vice_Logo.svg') no-repeat center / contain;
            mask: url('Vice_Logo.svg') no-repeat center / contain;
}

@media (max-width: 640px) {
    .site-logo {
        width: min(72vw, 420px);
        height: clamp(72px, 18vw, 140px);
    }
}

.lang-toggle {
    background: var(--component-bg);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.3s ease;
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

@media (max-width: 640px) {
    .lang-toggle {
        position: static;
        top: auto;
        right: auto;
    }
}

 .lang-toggle:hover {
     background: var(--accent);
     color: var(--background);
 }

 .cta-container {
     margin-bottom: 30px;
     text-align: center;
 }

 .cta-container--bottom {
     margin-top: 30px;
     margin-bottom: 0;
 }

 .hero {
     margin-bottom: 14px;
     text-align: center;
 }

 .hero__tagline {
     margin: 0 0 14px;
     font-size: 1.05rem;
     font-weight: 600;
     color: var(--text-primary);
     text-shadow: 0 0 16px rgba(255, 255, 255, 0.12);
     opacity: 0.98;
 }

 .hero-separator {
     height: 1px;
     width: min(560px, 92%);
     margin: 10px auto 2px;
     background: linear-gradient(90deg,
         rgba(107, 255, 216, 0.0) 0%,
         rgba(107, 255, 216, 0.42) 50%,
         rgba(107, 255, 216, 0.0) 100%
     );
     box-shadow: 0 0 14px rgba(107, 255, 216, 0.10);
     border-radius: 999px;
 }

 .hero__cta {
     max-width: 980px;
     margin: 0 auto;
 }

 .verified-link {
     text-align: center;
     margin: 6px 0 14px;
 }

 .section-separator {
     height: 1px;
     width: 100%;
     margin: 18px 0;
     background: linear-gradient(90deg,
         rgba(107, 255, 216, 0.0) 0%,
         rgba(107, 255, 216, 0.55) 50%,
         rgba(107, 255, 216, 0.0) 100%
     );
     box-shadow: 0 0 18px rgba(107, 255, 216, 0.12);
     border-radius: 999px;
 }

 .verified-link__a {
     color: var(--accent);
     text-decoration: none;
     font-size: 0.95rem;
     font-weight: 600;
     border-bottom: 1px dashed rgba(67, 255, 175, 0.5);
     text-shadow: 0 0 14px rgba(67, 255, 175, 0.35);
     letter-spacing: 0.02em;
 }

 .verified-link__a:hover {
     border-bottom-color: var(--accent);
 }

 .how-it-works {
     margin: 18px 0 0;
     padding: 18px;
     background: var(--component-bg);
     border: 1px solid var(--border-color);
     border-radius: 12px;
 }

 .how-it-works__title {
     margin: 0 0 20px;
     font-size: 1.05rem;
     font-weight: 700;
     text-align: center;
     color: var(--text-primary);
 }

 .how-it-works__timeline {
     display: flex;
     align-items: stretch;
     justify-content: center;
     gap: 0;
     margin-bottom: 20px;
 }

 .how-it-works__step {
     flex: 1;
     max-width: 180px;
     display: flex;
     flex-direction: column;
     align-items: center;
     text-align: center;
     padding: 12px 8px;
     text-decoration: none;
     color: inherit;
     border-radius: 10px;
     transition: all 0.3s ease;
 }

 .how-it-works__step--link:hover {
     background: rgba(67, 255, 175, 0.08);
     transform: translateY(-2px);
 }

 .how-it-works__step--link:hover .how-it-works__icon {
     border-color: var(--accent);
     box-shadow: 0 0 12px rgba(67, 255, 175, 0.3);
 }

 .how-it-works__step--link:hover .how-it-works__step-text {
     color: var(--accent);
 }

 .how-it-works__icon {
     width: 40px;
     height: 40px;
     border-radius: 50%;
     background: var(--background);
     border: 2px solid var(--accent);
     display: flex;
     align-items: center;
     justify-content: center;
     margin-bottom: 10px;
     color: var(--accent);
 }

 .how-it-works__icon svg {
     width: 20px;
     height: 20px;
 }

 .how-it-works__step-title {
     font-weight: 700;
     color: var(--text-primary);
     margin-bottom: 6px;
     font-size: 0.9rem;
     letter-spacing: 0.05em;
 }

 .how-it-works__step-text {
     color: var(--text-secondary);
     font-size: 0.8rem;
     line-height: 1.4;
 }

 .how-it-works__connector {
     width: 40px;
     min-height: 2px;
     background: linear-gradient(90deg, var(--accent) 50%, transparent 50%);
     background-size: 8px 2px;
     background-repeat: repeat-x;
     align-self: center;
     margin-top: -20px;
     opacity: 0.6;
 }

 .how-it-works__trust {
     text-align: center;
     font-size: 0.85rem;
     color: var(--text-secondary);
     padding: 14px 16px;
     background: var(--background);
     border-radius: 8px;
     border-left: 3px solid var(--accent);
     line-height: 1.5;
 }

 @media (max-width: 900px) {
     .how-it-works__timeline {
         flex-direction: column;
         align-items: center;
     }
     .how-it-works__step {
         max-width: 280px;
         width: 100%;
     }
     .how-it-works__connector {
         width: 2px;
         height: 24px;
         margin: 0;
         background: linear-gradient(180deg, var(--accent) 50%, transparent 50%);
         background-size: 2px 8px;
     }
 }

 .risk-box {
     margin: 14px 0 0;
     padding: 16px 18px;
     background: rgba(210, 42, 42, 0.08);
     border: 1px solid rgba(210, 42, 42, 0.25);
     border-radius: 12px;
 }

 .risk-box__title {
     margin: 0 0 8px;
     font-size: 1.0rem;
     font-weight: 700;
     color: var(--text-primary);
     text-align: center;
 }

 .risk-box__text {
     margin: 0;
     color: var(--text-secondary);
     font-size: 0.9rem;
     text-align: center;
 }

 .vault-stats-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
     gap: 20px;
     margin-bottom: 30px;
 }

 .vault-stat-card {
     background: linear-gradient(135deg, var(--component-bg) 0%, #2a2f3a 100%);
     border-radius: 15px;
     padding: 25px;
     text-align: center;
     position: relative;
     overflow: hidden;
 }

 .vault-stat-card--mint {
     border: 2px solid #6bffd8;
     box-shadow: 0 8px 32px rgba(107, 255, 216, 0.1);
 }

 .vault-stat-card--accent {
     border: 2px solid var(--accent);
     box-shadow: 0 8px 32px rgba(67, 255, 175, 0.1);
 }

 .vault-stat-card__topline {
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     height: 3px;
 }

 .vault-stat-card__topline--mint {
     background: linear-gradient(90deg, #6bffd8 0%, var(--accent) 50%, #6bffd8 100%);
 }

 .vault-stat-card__topline--accent {
     background: linear-gradient(90deg, var(--accent) 0%, #6bffd8 50%, var(--accent) 100%);
 }

 .vault-stat-card__label {
     margin-bottom: 8px;
     color: var(--text-secondary);
     font-size: 0.8em;
 }

 .vault-stat-card__value {
     font-size: 2.5em;
     font-weight: bold;
 }

 .vault-stat-card__value--mint {
     color: #6bffd8;
     text-shadow: 0 0 20px rgba(107, 255, 216, 0.3);
 }

 .vault-stat-card__value--accent {
     color: var(--accent);
     text-shadow: 0 0 20px rgba(67, 255, 175, 0.3);
 }

 .vault-stat-card__subtext {
     color: var(--text-secondary);
     font-size: 0.75em;
     opacity: 0.8;
     margin-top: 5px;
 }

 .vault-stat-card__inline-accent {
     color: var(--accent);
 }

 .vault-stat-card__inline-mint {
     color: #6bffd8;
 }

 .live-note {
     color: var(--text-secondary);
     font-size: 0.85em;
     opacity: 0.8;
     text-align: center;
     margin: 20px 0;
 }

 .live-note--footer {
     margin: 0.35rem 0 0;
     font-size: 0.8em;
     opacity: 0.65;
 }
 header h1 {
    margin-bottom: 0.5rem;
    font-size: 2rem; /* normalized to match overall site scale */
}

#last-updated {
    font-style: italic;
    opacity: 0.8;
    text-align: center;
    margin-bottom: 0.75rem;
}

main {
    width: 98%;
    max-width: none;
    margin: 0 auto; /* tighter top spacing */
    padding: 0;
}

.dashboard-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem; /* slightly reduced vertical gaps between blocks */
}

/* Glowing Cyberpunk Button */
.metrics-card .glowing-btn {
    position: relative;
    display: block;
    width: 100%;
    color: var(--accent);
    cursor: pointer;
    padding: 0.5em 1em;
    border: 0.15em solid var(--accent);
    border-radius: 0.45em;
    background: none;
    font-family: 'Roboto Mono', monospace;
    font-size: 1em;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-align: center;
    /* Remove outer/inset glow; keep text neon only */
    box-shadow: none;
    animation: none;
}

.metrics-card .glowing-txt {
    margin-right: 0.2em;
    text-shadow: 0 0 0.125em hsl(0 0% 100% / 0.3),
                 0 0 0.45em var(--accent);
    animation: text-flicker 3s linear infinite;
}

.metrics-card .faulty-letter {
    opacity: 0.5;
    animation: faulty-flicker 2s linear infinite;
}

.metrics-card .glowing-btn::before { display: none; }

.metrics-card .glowing-btn::after { display: none; }

.metrics-card .glowing-btn:hover {
    color: rgba(0, 0, 0, 0.8);
    text-shadow: none;
}

.metrics-card .glowing-btn:hover .glowing-txt {
    animation: none;
}

.metrics-card .glowing-btn:hover .faulty-letter {
    animation: none;
    text-shadow: none;
    opacity: 1;
}

.metrics-card .glowing-btn:hover::before {
    filter: blur(1.5em);
    opacity: 1;
}

.metrics-card .glowing-btn:hover::after {
    opacity: 1;
}

.monthly-grid {
    margin: 10px 0 32px;
    padding: 0 6px;
}

.monthly-grid__header {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
}

.monthly-grid__title {
    font-size: 1.05rem;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.monthly-grid__tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 0.75rem;
    border-radius: 50%;
    border: 1px solid #6bffd8;
    color: #6bffd8;
    cursor: help;
    position: relative;
    line-height: 1;
}

.monthly-grid__tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(31, 35, 44, 0.98);
    color: var(--text-primary);
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    width: 220px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    border: 1px solid rgba(107, 255, 216, 0.35);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    transition: opacity 0.2s ease;
    z-index: 20;
}

.monthly-grid__tooltip::before {
    content: '';
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(31, 35, 44, 0.98) transparent transparent transparent;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.monthly-grid__tooltip:hover::after,
.monthly-grid__tooltip:hover::before {
    opacity: 1;
}

.monthly-grid__table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(107, 255, 216, 0.2);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(31, 35, 44, 0.9) 0%, rgba(42, 47, 58, 0.95) 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.monthly-grid__table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.monthly-grid__table thead th {
    padding: 10px 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    color: #6bffd8;
    border-bottom: 1px solid rgba(107, 255, 216, 0.2);
    background: rgba(31, 35, 44, 0.85);
}

.monthly-grid__table thead th:last-child {
    color: var(--accent);
    background: rgba(67, 255, 175, 0.12);
    border-left: 1px solid rgba(107, 255, 216, 0.2);
}

.monthly-grid__table tbody td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid rgba(107, 255, 216, 0.08);
    color: var(--text-secondary);
}

.monthly-grid__table tbody td:last-child {
    background: rgba(67, 255, 175, 0.06);
    border-left: 1px solid rgba(107, 255, 216, 0.15);
    color: var(--text-primary);
    font-weight: 600;
}

.monthly-grid__table tbody tr td:first-child {
    text-align: left;
    color: var(--text-primary);
    font-weight: 600;
}

.monthly-grid__table tbody tr:last-child td {
    border-bottom: none;
}

.monthly-grid__cell--pos {
    color: var(--accent) !important;
    font-weight: 600;
}

.monthly-grid__cell--neg {
    color: var(--error) !important;
    font-weight: 600;
}

@media (max-width: 720px) {
    .monthly-grid {
        margin: 6px 0 24px;
        padding: 0 2px;
    }

    .monthly-grid__table {
        min-width: 640px;
        font-size: 0.72rem;
    }

    .monthly-grid__table thead th,
    .monthly-grid__table tbody td {
        padding: 8px 8px;
    }
}

@keyframes faulty-flicker {
    0% { opacity: 0.1; }
    2% { opacity: 0.1; }
    4% { opacity: 0.5; }
    19% { opacity: 0.5; }
    21% { opacity: 0.1; }
    23% { opacity: 1; }
    80% { opacity: 0.5; }
    83% { opacity: 0.4; }
    87% { opacity: 1; }
}

@keyframes text-flicker {
    0% { opacity: 0.1; }
    2% { opacity: 1; }
    8% { opacity: 0.1; }
    9% { opacity: 1; }
    12% { opacity: 0.1; }
    20% { opacity: 1; }
    25% { opacity: 0.3; }
    30% { opacity: 1; }
    70% { opacity: 0.7; }
    72% { opacity: 0.2; }
    77% { opacity: 0.9; }
    100% { opacity: 0.9; }
}

@keyframes border-flicker {
    0% { opacity: 0.1; }
    2% { opacity: 1; }
    4% { opacity: 0.1; }
    8% { opacity: 1; }
    70% { opacity: 0.7; }
    100% { opacity: 1; }
}


/* Responsive design */
@media (max-width: 768px) {
    .dashboard-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (min-width: 768px) {
    .dashboard-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .metrics-card, .chart-container {
        grid-column: span 2;
    }
}

.metrics-card, .chart-container {
    background-color: var(--component-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.metrics-card h2, .chart-container h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

 .metrics-card h2.hero__tagline {
     margin: 0 0 14px;
     color: var(--text-primary);
     text-shadow: 0 0 16px rgba(255, 255, 255, 0.12);
     border-bottom: none;
     padding-bottom: 0;
 }

.metrics-tabs {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.tab-button:hover {
    color: var(--text-primary);
}

.tab-button.active {
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent);
    font-weight: 500;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.metric {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background-color: var(--background); /* small tiles use page background for contrast */
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
    margin-bottom: 0.3rem;
}

.metric-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--text-primary);
}

.positive {
    color: var(--accent);
}

.negative {
    color: var(--error);
}

.chart {
    height: 400px !important;
    width: 100% !important;
    /* remove strict max-height so axes/titles can fit */
    max-height: none !important;
}

.chart-container {
    /* Let the container grow with content to avoid clipping axes on small screens */
    height: auto !important;
    max-height: none !important;
    overflow: visible;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.filter-btn {
    background: var(--component-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-btn:hover {
    background: #3E404C;
}

.filter-btn.active {
    background: var(--accent);
    color: var(--component-bg);
    border-color: var(--accent);
}

/* Stats Cards Section - Updated to match original */
.container {
    width: 98%;
    max-width: none;
    margin: 1rem auto; /* unified spacing with other pages */
    padding: 0;
}

.container h1 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
}

.last-updated {
    text-align: center;
    color: var(--text-secondary);
    opacity: 0.8;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    font-style: italic;
}

.stats-section {
    background-color: var(--component-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stats-section h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background-color: var(--background); /* small tiles */
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--text-primary);
}

/* Responsive design for stats cards */
@media (max-width: 1200px) {
    .stats-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .container h1 {
        font-size: 2rem;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    /* On very small screens, give charts extra height so axis titles and tick labels fit */
    .chart {
        height: 520px !important;
    }
}

footer {
    text-align: center;
    padding: 1.5rem 0; /* remove side padding bar feeling */
    margin-top: 2rem;
    background-color: var(--background); /* same as page */
    color: var(--text-secondary);
    opacity: 0.8;
}
