/* LST Rankings — Custom Styles */

/* ── Color palette ─────────────────────────── */
:root {
    --navy: #0f172a;
    --navy-light: #1e293b;
    --slate: #334155;
    --slate-light: #475569;
    --muted: #94a3b8;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --green: #10b981;
    --green-light: #34d399;
    --amber: #f59e0b;
    --red: #ef4444;
    --surface: #f8fafc;
    --border: rgba(148, 163, 184, 0.15);
}

/* ── Base typography ───────────────────────── */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #1e293b;
}

/* ── Navbar ─────────────────────────────────── */
.navbar {
    background: var(--navy) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ── Landing page ──────────────────────────── */

/* Hero */
.landing-hero {
    background: linear-gradient(135deg, var(--navy) 0%, #1a2744 50%, #162036 100%);
    color: #fff;
    padding: 6rem 0 5rem;
    position: relative;
    overflow: hidden;
}
.landing-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    pointer-events: none;
}
.landing-hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    pointer-events: none;
}
.landing-hero h1 {
    font-size: 3.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    max-width: 700px;
    margin: 0 auto;
}
.landing-hero .lead {
    color: var(--muted);
    font-size: 1.2rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}
.landing-hero .btn-primary {
    background: var(--accent);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.landing-hero .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

/* Section layout */
.landing-section {
    padding: 5rem 0;
    position: relative;
}
.landing-section:nth-child(even) {
    background: var(--surface);
}
.landing-section:nth-child(odd) {
    background: #fff;
}

/* Eyebrow label */
.section-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    margin-bottom: 1rem;
}
.section-eyebrow.blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
}
.section-eyebrow.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green);
}
.section-eyebrow.amber {
    background: rgba(245, 158, 11, 0.1);
    color: var(--amber);
}
.section-eyebrow.red {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
}

/* Section headings */
.landing-section h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--navy);
    margin-bottom: 0.75rem;
}
.landing-section .section-desc {
    color: var(--slate-light);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 580px;
}

/* Chart cards */
.chart-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.chart-card .card-body {
    padding: 1.5rem;
}

/* Oracle cards */
.oracle-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}
.oracle-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}
.oracle-card .card-accent {
    height: 4px;
    width: 100%;
}
.oracle-card.trustless .card-accent {
    background: linear-gradient(90deg, var(--green), var(--green-light));
}
.oracle-card.committee .card-accent {
    background: linear-gradient(90deg, var(--amber), #fbbf24);
}
.oracle-card.centralized .card-accent {
    background: linear-gradient(90deg, var(--red), #f87171);
}
.oracle-card .card-body {
    padding: 1.5rem;
}
.oracle-card .oracle-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.oracle-card.trustless .oracle-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green);
}
.oracle-card.committee .oracle-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--amber);
}
.oracle-card.centralized .oracle-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
}
.oracle-card h5 {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.oracle-card .card-text {
    color: var(--slate-light);
    line-height: 1.6;
}
.oracle-card .token-badge {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    margin: 0.2rem;
    transition: transform 0.15s;
}
.oracle-card .token-badge:hover {
    transform: scale(1.05);
}
.oracle-card.trustless .token-badge {
    background: rgba(16, 185, 129, 0.12);
    color: var(--green);
}
.oracle-card.committee .token-badge {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}
.oracle-card.centralized .token-badge {
    background: rgba(239, 68, 68, 0.12);
    color: var(--red);
}

/* Feature cards (yield forwarding) */
.feature-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.feature-card h6 {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--navy);
}
.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}
.feature-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
}
.feature-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green);
}
.feature-icon.amber {
    background: rgba(245, 158, 11, 0.1);
    color: var(--amber);
}
.feature-icon.red {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
}

/* Metric cards (slippage) */
.metric-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}
.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}
.metric-card .card-body {
    padding: 2rem 1.5rem;
}
.metric-card .token-name {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-light);
}
.metric-card .metric-value {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.metric-card .metric-label {
    font-size: 0.85rem;
    color: var(--muted);
}
.metric-card .metric-detail {
    font-size: 0.85rem;
    color: var(--slate-light);
}
.metric-card .dex-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
}

/* Color utilities for metric values */
.color-green { color: var(--green); }
.color-amber { color: var(--amber); }
.color-red { color: var(--red); }

/* CTA section */
.landing-cta {
    background: linear-gradient(135deg, var(--navy) 0%, #1a2744 100%);
    color: #fff;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.landing-cta::before {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}
.landing-cta h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}
.landing-cta p {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}
.landing-cta .btn-primary {
    background: var(--accent);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.landing-cta .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

/* ── Rankings page ─────────────────────────── */

/* Page header */
.rankings-header h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--navy);
    margin-bottom: 0.25rem;
}
.rankings-subtitle {
    color: var(--slate-light);
    font-size: 1.05rem;
    margin-bottom: 0;
}
.landing-section-heading {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

/* Rankings table card */
.rankings-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Sortable column headers */
.sortable {
    position: relative;
    user-select: none;
}
#rankings-table thead th.sortable:hover {
    background-color: #3a3f44 !important;
}
.sortable::after {
    content: '\2195';
    margin-left: 4px;
    opacity: 0.4;
    font-size: 0.8em;
}
.sortable.sort-asc::after {
    content: '\2191';
    opacity: 1;
}
.sortable:not(.sort-asc)::after {
    content: '\2193';
    opacity: 0.4;
}

/* Clickable table rows */
.clickable-row:hover {
    background-color: rgba(59, 130, 246, 0.08) !important;
}

#rankings-table th,
#rankings-table td {
    white-space: nowrap;
    vertical-align: middle;
}
#rankings-table td:nth-child(2) {
    white-space: normal;
    min-width: 120px;
}

/* Score badge */
.score-badge {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 800;
    min-width: 2.5rem;
    text-align: center;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    letter-spacing: -0.02em;
    cursor: help;
}
.score-high {
    background: rgba(16, 185, 129, 0.12);
    color: var(--green);
}
.score-mid {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}
.score-low {
    background: rgba(239, 68, 68, 0.12);
    color: var(--red);
}

/* Score methodology section */
.scoring-section {
    padding-bottom: 1rem;
}
.score-category-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.score-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.score-category-card h6 {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--navy);
}
.score-cat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}
.yield-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
}
.security-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green);
}
.peg-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--amber);
}
.liquidity-icon {
    background: rgba(13, 202, 240, 0.1);
    color: #0891b2;
}
.fees-icon {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

/* Badge refinements */
.badge {
    font-weight: 500;
}

/* Card hover effect (non-landing pages) */
.card {
    transition: box-shadow 0.2s;
}
.card:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* Chart containers */
canvas {
    max-height: 300px;
}

/* Responsive table scroll hint */
@media (max-width: 768px) {
    .table-responsive::after {
        content: 'Scroll \2192';
        display: block;
        text-align: center;
        font-size: 0.75rem;
        color: #6c757d;
        padding: 4px;
    }
    .landing-hero h1 {
        font-size: 2.25rem;
    }
    .landing-section h2 {
        font-size: 1.6rem;
    }
    .metric-card .metric-value {
        font-size: 2.25rem;
    }
}

/* Footer */
footer {
    background: var(--navy) !important;
}
.landing-page footer {
    margin-top: 0 !important;
}
footer a {
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

/* Code blocks in methodology */
pre code {
    font-size: 0.85em;
}
