/* Variables de Color (Monocromático - Color Solicitado) */
:root {
    /* Color Primario Solicitado (Verde Menta Claro) */
    --primary-color: #A3FDBA;

    /* Nuevos colores de fondo solicitados */
    --dark-bg-start: #000000;
    /* BLACK */
    --dark-bg-end: #121b15;
    /* Dark Greenish/Gray */

    /* Nuevos colores y degradados para el diseño moderno */
    --gradient-1: var(--primary-color);
    --gradient-2: var(--primary-color);

    --text-contrast: #202020;
    --soft-text: #E0E0E0;
    --border-soft: rgba(255, 255, 255, 0.15);

    --card-bg-light: rgba(255, 255, 255, 0.08);
    --card-bg-dark: rgba(0, 0, 0, 0.15);

    --box-shadow-elevated: 0 12px 40px rgba(0, 0, 0, 0.5);
    --border-radius-main: 35px;
    --border-radius-secondary: 20px;

    /* Pseudo-colores para usar en rgba() */
    --primary-color-rgb: 163, 253, 186;
    /* A3FDBA (Menta) */
}

/* Estilos Globales y Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    color: var(--soft-text);
    position: relative;
    isolation: isolate;
}

body.textured-background {
    background: var(--dark-bg-start);
    background-image: url('data:image/svg+xml,%3Csvg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.07"%3E%3C/rect%3E%3C/svg%3E'),
        none;
    background-blend-mode: overlay;
    background-size: cover;
    background-attachment: fixed;
}


main {
    width: 100%;
    margin: 40px auto;
    /* Necesario para que el contenido no quede debajo del menú fijo */
    padding-top: 75px;
    padding-left: 3%;
    padding-right: 3%;
    position: relative;
    z-index: 10;
}

/* Asegura que las secciones no queden tapadas por el menú fijo (Se mantiene por si acaso) */
section[id] {
    scroll-margin-top: 75px;
}


h1,
h2,
h3 {
    margin-bottom: 20px;
    color: var(--soft-text);
    text-align: center;
}

h2.section-title {
    font-size: 2.2em;
    padding-bottom: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    color: var(--soft-text);
}

/* --- Separador moderno --- */
.modern-hr { border: none; height: 1px; background: var(--border-soft); margin: 60px 0; }


/* ========================================= */
/* --- ESTILOS DE BARRA DE NAVEGACIÓN FIJA (MENU) --- */
/* ========================================= */
#sticky-navbar {
    width: 100%;
    position: fixed;
    top: 0;

    /* 🟢 MODIFICACIÓN 1: Menos transparencia (0.45 en lugar de 0.25) */
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 0;

    margin-top: 0;

    z-index: 100;

    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);

    /* 🟢 MODIFICACIÓN 2: Menos blur (7px en lugar de 10px) */
    backdrop-filter: blur(7px);

    border-bottom: 1px solid var(--border-soft);
}

.nav-content {
    width: 100%;
    margin: 0;
    display: flex;
    /* Por defecto, centramos en desktop */
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    position: relative;
    /* Para posicionar brand e icono X de forma absoluta */
}

/* --- ESTILOS ICONO X (barra de navegación - Desktop) --- */
/* Este es el estilo que al usuario le gusta (posición absoluta) */
.x-icon-desktop-link {
    position: absolute;
    right: 20px;
    display: flex;
    /* Centra el SVG */
    align-items: center;
    padding: 5px;
    border-radius: 50%;
    /* Restaurado el redondeo */
    transition: background-color 0.3s, transform 0.3s;
}

.x-icon-desktop-link:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1);
    transform: scale(1.1);
    /* Restaurado el efecto scale */
}

.x-icon-desktop-link svg {
    fill: var(--soft-text);
    width: 25px;
    height: 25px;
    transition: fill 0.3s;
}

.x-icon-desktop-link:hover svg {
    fill: var(--primary-color);
}

/* Ocultamos el ítem de la lista móvil en desktop */
.x-menu-mobile {
    display: none;
}

/* ------------------------------------------- */

.nav-brand {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 0;
    /* Gap managed by padding and separators */
    margin: 0;
    padding: 0;
}

/* --- ESTILOS ESPECÍFICOS ESCRITORIO (Desktop) --- */
@media (min-width: 769px) {
    .nav-brand {
        /* Visible en desktop con posición absoluta para no empujar el menú */
        /* Pegado a la izquierda del ancho máximo de pantalla */
        position: absolute;
        left: 20px;
        display: block;
    }

    .nav-links li {
        display: flex;
        align-items: center;
    }

    /* Separadores entre elementos (solo entre los 3 visibles en desktop) */
    /* El selector :not(.x-menu-mobile):not(:last-child) asegura que no haya línea al final */
    .nav-links li:not(.x-menu-mobile):not(:nth-last-child(2))::after {
        content: "";
        width: 1px;
        height: 14px;
        background: rgba(255, 255, 255, 0.15);
        margin-left: 5px;
        margin-right: -5px;
        /* Ajuste fino de centrado */
    }

    .nav-links li a {
        text-decoration: none;
        color: var(--soft-text);
        font-weight: 600;
        padding: 8px 15px;
        position: relative;
        transition: color 0.3s, transform 0.3s;
        border-radius: 0;
        border: none;
    }

    /* Efecto Hover en las pestañas (Solo texto) */
    .nav-links li a:hover {
        color: var(--primary-color);
        transform: translateY(-2px);
        background-color: transparent;
        box-shadow: none;
        border-color: transparent;
    }
}

/* Efecto Hover: Subrayado brillante - ELIMINADO POR SOLICITUD */
.nav-links li a::after {
    content: none;
}


/* Menú Hamburguesa (Sólo en Móviles) */
.hamburger-menu {
    display: none;
    cursor: pointer;
    padding: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--soft-text);
    margin: 4px 0;
    transition: all 0.3s ease-in-out;
}

/* Animación de la X */
.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Media Query para Móviles */
@media (max-width: 768px) {
    .nav-content {
        justify-content: space-between;
        padding: 0 20px;
    }

    .nav-brand {
        position: static;
        /* Volver al flujo para que space-between funcione */
        display: block;
    }

    /* 🟢 MODIFICACIÓN: Ocultamos el ícono de X de escritorio en móvil */
    .x-icon-desktop-link {
        display: none;
    }

    /* 🟢 MODIFICACIÓN: Mostrar el ítem de X dentro del menú en móvil */
    .x-menu-mobile {
        display: block;
        margin: 0;
        /* Aseguramos que el margen sea 0 para que el padding y borde funcionen */
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 0;
    }

    .x-menu-mobile .x-icon-mobile-link {
        width: 100%;
        font-size: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px 0;
    }

    .x-menu-mobile .x-icon-mobile-link svg {
        display: block;
        fill: var(--soft-text);
        /* White like desktop */
    }

    /* FIN MODIFICACIÓN MÓVIL X */


    .hamburger-menu {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;

        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);

        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
        text-align: center;
        gap: 0;
    }

    .nav-links.active {
        display: flex;
        /* 🟢 MODIFICACIÓN 1: Borde superior para la primera pestaña */
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        /* 🟢 MODIFICACIÓN 2: Borde inferior para la última pestaña */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Separador entre elementos (menos el primero) */
    .nav-links li {
        margin: 0;
        /* Aplicamos un borde superior a cada elemento li para separarlos */
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Eliminamos el borde superior del primer elemento para evitar una línea doble o un borde innecesario */
    .nav-links li:first-child {
        border-top: none;
    }

    /* El elemento x-menu-mobile que es la última pestaña*/
    .nav-links li.x-menu-mobile {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links li a {
        padding: 15px 0;
        font-size: 1.2em;
        font-weight: 600;
        /* Match desktop weight */
        color: var(--soft-text);
        text-decoration: none;
        /* Remove underlines */
        transform: none;
        background-color: transparent;
        box-shadow: none;
        border: none;
        border-radius: 0;
        display: block;
    }

    /* Remover el efecto after en móvil para la lista */
    .nav-links li a::after {
        content: none !important;
    }

    /* 🟢 MODIFICACIÓN: Eliminamos el efecto hover en responsive */
    .nav-links li a:hover {
        background-color: transparent;
        color: var(--soft-text);
        /* Keep white, no color change */
        transform: none;
        box-shadow: none;
    }
}

/* ========================================= */
/* --- FIN DE ESTILOS DE BARRA DE NAVEGACIÓN --- */
/* ========================================= */


/* --- ESTILOS DE TARJETAS MODERNAS (Glassmorphism) --- */
.modern-card {
    padding: 50px 40px;
    background: var(--card-bg-light);
    border-radius: var(--border-radius-main);
    box-shadow: var(--box-shadow-elevated);
    border: var(--border-soft);
    backdrop-filter: blur(15px);
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease-in-out;
}

/* Pseudo-elementos eliminados */
.modern-card::before,
.modern-card::after {
    content: none;
}

.modern-card:hover::before,
.modern-card:hover::after {
    transform: none;
    opacity: 0;
}


.modern-card h2.section-title {
    border-bottom-color: var(--primary-color);
}

/* --- MARKET METRICS SECTION --- */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Single column to allow side-by-side comparison between protocol columns */
    gap: 15px;
    margin-top: 20px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-soft);
    border-radius: var(--border-radius-secondary);
    padding: 20px;
    text-align: left;
    transition: all 0.3s;
}

.metric-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.05);
}

.metric-title {
    font-size: 0.85em;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.metric-value {
    font-size: 1.1em;
    /* Reduced from 1.6em as requested */
    font-weight: 800;
    color: var(--soft-text);
}

.protocol-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-soft);
}

.protocol-name {
    font-size: 1.6em;
    font-weight: 800;
    color: var(--primary-color);
    /* Same green for both */
}

.comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.refresh-notice {
    font-size: 0.8em;
    color: var(--primary-color);
    margin-top: 25px;
    opacity: 0.7;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-main);
}

/* Response Optimization for Comparison */
@media (max-width: 850px) {
    .comparison-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* --- SECCIÓN DONACIÓN (SOPORTE) --- */
.wallet-info {
    text-align: center;
    padding: 25px;
    border: 1px dashed var(--primary-color);
    border-radius: var(--border-radius-secondary);
    margin-top: 25px;
    background: rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.wallet-address-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap;
    gap: 10px;
    /* Espacio entre dirección y botón */
}

.wallet-address {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 12px;
    /* Simplificado ya que ahora están separados */
    font-family: monospace;
    font-size: 1em;
    word-break: break-all;
    color: var(--soft-text);
    border: 1px solid var(--border-soft);

    /* Textura sutil */
    background-image: url('data:image/svg+xml,%3Csvg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.7" numOctaves="3" stitchTiles="stitch"%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.05"%3E%3C/rect%3E%3C/svg%3E');
    background-blend-mode: overlay;
}

.wallet-address-container button {
    background: var(--primary-color);
    color: var(--text-contrast);
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    /* Simplificado ya que ahora están separados */
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    box-shadow: none;
    flex-shrink: 0;
    /* Evita que el botón se comprima */
}

.wallet-address-container button:hover {
    background: #88E0A0;
}

/* --- NUEVA SECCIÓN: FOLLOW ON X --- */
.follow-x-section {
    padding: 40px 30px;
    margin-top: 10px;
}

/* By default hide the mobile selector on desktop */
.mobile-metric-selector {
    display: none;
}

/* --- ESTILOS DE LA TABLA (MODERNO) --- */
/* --- BOTONES CTA (ESTILO UNIFICADO X) --- */


.cta-button:hover {
    box-shadow: 0 0 15px 5px rgba(var(--primary-color-rgb), 0.7);
}

/* Estilo específico X (que el usuario pidió para todos los botones) */
.x-button {
    background-color: #000000 !important;
    background-image: none !important;
    /* Quitamos textura para el negro puro */
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.3) !important;
}

.x-button:hover {
    background-color: #1a1a1a !important;
    box-shadow: 0 0 25px rgba(var(--primary-color-rgb), 0.7) !important;
}

/* ---------------------------------- */


@media (max-width: 500px) {
    .wallet-address-container {
        flex-direction: column;
    }

    .wallet-address {
        width: 100%;
        text-align: center;
        max-width: 100%;
    }

    .wallet-address-container button {
        width: 100%;
    }
}

/* --- FOOTER MODERNO --- */
.modern-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    background: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--soft-text);
    border-radius: var(--border-radius-main) var(--border-radius-main) 0 0;
    box-shadow: var(--box-shadow-elevated);
    position: relative;
    z-index: 10;
}

/* --- HISTORICAL CHARTS SECTION --- */
.charts-section {
    margin-top: 40px;
}

.chart-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.time-range-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.time-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    color: var(--soft-text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
}

.time-btn:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    border-color: var(--primary-color);
}

.time-btn.active {
    background: var(--primary-color);
    color: var(--text-contrast);
    border-color: var(--primary-color);
}

.view-toggle {
    display: flex;
    gap: 10px;
}

.view-btn {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    color: var(--soft-text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.view-btn:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    border-color: var(--primary-color);
}

.view-btn.active {
    background: rgba(var(--primary-color-rgb), 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.view-btn svg {
    width: 18px;
    height: 18px;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 450px;
    margin-bottom: 20px;
}

#fees-chart {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-secondary);
    padding: 15px;
}

.range-slider-container {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-secondary);
}

.range-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: none;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.5);
}

.range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.5);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.85em;
    color: var(--primary-color);
}

.list-container {
    width: 100%;
    max-height: 500px;
    overflow-y: auto;
}

.list-scroll {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-secondary);
    padding: 15px;
}

/* Main Container */
main {
    width: 100%;
    /* max-width: 1200px; Remove max-width for fuller width */
    margin: 40px auto;
    padding: 20px 3%;
    /* Phase 17: Reduced padding */
    background: none;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

h2.section-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 2em;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--soft-text);
}

.data-table thead {
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10;
}

.data-table th {
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid var(--primary-color);
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 1px;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-soft);
}

.data-table tbody tr:hover {
    background: rgba(var(--primary-color-rgb), 0.05);
}

.chart-notice {
    font-size: 0.8em;
    color: var(--primary-color);
    margin-top: 15px;
    opacity: 0.7;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chart-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .time-range-selector,
    .view-toggle {
        width: 100%;
        justify-content: center;
    }

    .chart-container {
        height: 350px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 0.85em;
    }
}

/* CTA Button Styles (Restored Flat Color) */


/* --- REFINED METRICS SECTION STYLES (Phase 16) --- */
.metrics-container-refined {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.metrics-tabs-refined {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 10px;
}

.metrics-tabs-refined .metric-tab {
    padding: 10px 12px;
    background: transparent;
    color: var(--soft-text);
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    /* User Requested 0.9em */
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 5px;
    position: relative;
}

.metrics-tabs-refined .metric-tab::after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.metrics-tabs-refined .metric-tab.active {
    background: transparent;
    border: none;
}

.metrics-tabs-refined .metric-tab.active::after {
    width: 100%;
}

.metrics-tabs-refined .metric-tab:hover {
    color: var(--primary-color);
    background: transparent;
    transform: none;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 3-Column Table-like Layout Refined (Phase 17) */
.metrics-content-refined {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    overflow-x: auto;
    /* Allow horizontal scroll on mobile if needed */
}

.metrics-grid-header,
.metrics-grid-row {
    display: grid;
    align-items: center;
    padding: 15px 30px;
    border-bottom: 1px solid var(--border-soft);
}

/* Dynamic column counts for different tabs (Phase 17+) */
.perp-cols {
    grid-template-columns: 160px repeat(5, minmax(120px, 1fr));
}

.spot-cols,
.fees-cols {
    grid-template-columns: 160px repeat(4, minmax(130px, 1fr));
}

.metrics-grid-header {
    background: rgba(255, 255, 255, 0.03);
    font-weight: 500;
    color: var(--soft-text);
    font-size: 0.90em;
    /* User Requested 0.90em */
    text-align: center;
    border-bottom: 1px solid var(--border-soft);
}

.metrics-grid-header .col-empty {
    text-align: left;
}

.metrics-grid-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s;
}

.metrics-grid-row:last-child {
    border-bottom: none;
}

.metrics-grid-row:hover {
    background: rgba(255, 255, 255, 0.01);
}

.protocol-name {
    color: var(--primary-color);
    font-size: 1.1em;
    /* User Requested 1.1em */
    font-weight: 700;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-section{
	margin-top: 65px;
	}

.metric-val {
    font-size: 0.9em;
    /* User Requested 1em */
    font-weight: 500;
    /* Match header weight */
    color: #fff;
    font-family: 'Inter', sans-serif;
    /* Match header family (Inter/system) */
    text-align: center;
}

/* Dual Range Slider Styles */
.dual-range-wrapper {
    position: relative;
    width: 100%;
    height: 50px;
    margin: 20px 0;
}

.dual-range-wrapper .range-slider {
    position: absolute;
    width: 100%;
    pointer-events: none;
    -webkit-appearance: none;
    z-index: 2;
    height: 10px;
    background: transparent;
}

.dual-range-wrapper .range-slider::-webkit-slider-thumb {
    pointer-events: all;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    -webkit-appearance: none;
    border: 3px solid #000;
    box-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.5);
}

.slider-track {
    position: absolute;
    height: 6px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    top: 50%;
    transform: translateY(-50%);
    border-radius: 3px;
    z-index: 1;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    color: var(--primary-color);
    font-size: 0.9em;
    font-weight: 600;
}

@media (max-width: 1000px) {
    .metrics-content-refined {
        border-radius: 12px;
    }

    .metrics-grid-header,
    .metrics-grid-row {
        padding: 15px 20px;
        min-width: 900px;
        /* Force minimum width to prevent squashing */
    }

    .metrics-grid-header {
        font-size: 0.95em;
    }

    .protocol-name,
    .metric-val {
        font-size: 1em;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    main {
        padding-left: 15px;
        padding-right: 15px;
        margin: 20px auto;
    }

    .section-title {
        font-size: 1.8em;
    }

    .metrics-tabs-refined {
        overflow-x: auto;
        padding-bottom: 5px;
        scrollbar-width: none;
        /* Hide scrollbar for Chrome/Safari */
    }

    .metrics-tabs-refined::-webkit-scrollbar {
        display: none;
    }

    /* Mobile 2-Column Layout (Phase 21) */
    .mobile-metric-selector {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        padding: 0 15px 10px 15px;
        gap: 10px;
    }

    .selector-label {
        font-size: 0.9em;
        color: var(--soft-text);
    }

    #mobile-metric-dropdown {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid var(--border-soft);
        color: #fff;
        padding: 5px 10px;
        border-radius: 6px;
        font-size: 0.9em;
        outline: none;
    }

    /* Override Grid for 2 columns */
    .perp-cols,
    .spot-cols,
    .fees-cols {
        grid-template-columns: 140px 1fr !important;
        min-width: auto !important;
        /* Reset min-width from tablet */
    }

    /* Hide the empty first col in header (it aligns with protocol name) */
    .metrics-grid-header .col-empty {
        display: block;
        /* Acts as "Protocol" header placeholder if needed, or stays empty */
    }

    /* Allow Protocol Name to stay visible */
    .protocol-name {
        display: flex !important;
        font-size: 1em;
    }

    /* Hide all headers and values by default */
    .metrics-grid-header .col-header,
    .metrics-grid-row .metric-val {
        display: none;
    }

    /* Only show the active one */
    .metrics-grid-header .col-header.mobile-visible,
    .metrics-grid-row .metric-val.mobile-visible {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Center header text in 2nd column */
    .metrics-grid-header .col-header.mobile-visible {
        text-align: center;
        width: 100%;
    }
}
/* CTA Button Styles (Restored Flat Color) */
.cta-button {
	margin-top: 30px;
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: var(--text-contrast);
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
    border: none;
    font-size: 1.1em;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
