@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800&display=swap');

/* ============================================
   FLOPprices — Premium SaaS Design System
   ============================================ */

:root {
    /* Core palette */
    --bg-root: #0b1120;
    --bg-surface: #111827;
    --bg-elevated: #1a2332;
    --bg-hover: #1e293b;

    /* Borders */
    --border-subtle: rgba(148, 163, 184, 0.08);
    --border-default: rgba(148, 163, 184, 0.12);
    --border-strong: rgba(148, 163, 184, 0.2);

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-muted: #475569;

    /* Accent */
    --accent: #635bff;
    --accent-hover: #7c75ff;
    --accent-subtle: rgba(99, 91, 255, 0.12);
    --accent-glow: rgba(99, 91, 255, 0.25);

    /* Semantic */
    --green: #10b981;
    --green-subtle: rgba(16, 185, 129, 0.12);
    --green-text: #34d399;
    --red: #ef4444;
    --amber: #f59e0b;

    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-root);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ---- Animated background ---- */
.page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.page-bg::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(ellipse at center, rgba(99, 91, 255, 0.08) 0%, transparent 70%);
    animation: drift 25s ease-in-out infinite alternate;
}

.page-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -20%;
    width: 70%;
    height: 70%;
    background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
    animation: drift 20s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 3%) scale(1.1); }
}

/* ---- Header / Nav ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 17, 32, 0.8);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-mark {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    color: #fff;
    letter-spacing: -0.5px;
}

.logo-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    color: var(--text-tertiary);
    text-decoration: none;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

/* ---- Page wrapper ---- */
.page-content {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
}

/* ---- Page header / hero ---- */
.page-hero {
    margin-bottom: 2.5rem;
}

.page-hero h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.page-hero p {
    color: var(--text-tertiary);
    font-size: 0.95rem;
    font-weight: 400;
    max-width: 480px;
}

.breadcrumb-nav {
    margin-bottom: 0.9rem;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-list a,
.breadcrumb-current {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb-list a:hover {
    color: var(--text-secondary);
}

.breadcrumb-separator {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.page-hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* ---- Controls bar ---- */
.controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.controls-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ---- Segment toggle ---- */
.segment-toggle {
    display: inline-flex;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 2px;
}

.segment-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    padding: 0.375rem 0.85rem;
    border-radius: calc(var(--radius-md) - 3px);
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    white-space: nowrap;
}

.segment-btn:hover {
    color: var(--text-secondary);
}

.segment-btn.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ---- Primary button ---- */
.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.8125rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---- Ghost button ---- */
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-ghost:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* ---- Data table ---- */
.table-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-scroll {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.data-table thead th {
    text-align: left;
    padding: 0.7rem 1rem;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-default);
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.data-table tbody td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.875rem;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background 0.12s;
    cursor: pointer;
}

.data-table tbody tr:hover {
    background: rgba(99, 91, 255, 0.04);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table cells */
.cell-gpu {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    min-width: 110px;
}

.cell-price {
    font-variant-numeric: tabular-nums;
    min-width: 100px;
}

.cell-price.empty {
    color: var(--text-muted);
}

.price-value {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.price-range {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 1px;
    font-weight: 400;
}

.table-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.table-link:hover {
    color: var(--accent-hover);
}

.cell-price.cheapest .price-value {
    color: var(--green-text);
}

.cell-best {
    background: var(--green-subtle);
    border-left: 1px solid var(--border-subtle);
}

.best-value {
    font-weight: 700;
    color: var(--green-text);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}

.best-provider {
    font-size: 0.6875rem;
    font-weight: 500;
    margin-top: 1px;
}

.provider-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

.provider-header {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ---- Detail panel ---- */
.detail-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-top: 1.5rem;
}

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

.detail-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.detail-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
    margin: 1.25rem 0 0.6rem;
}

.detail-section-title:first-of-type {
    margin-top: 0;
}

/* Bar chart rows */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.bar-label {
    width: 72px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}

.bar-track {
    flex: 1;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    height: 30px;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: var(--radius-sm);
    min-width: 3px;
    transition: width 0.5s var(--ease-out);
    opacity: 0.85;
}

.bar-value {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* ---- Filter controls (trends page) ---- */
.filters-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.filter-label {
    color: var(--text-muted);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    width: 72px;
    flex-shrink: 0;
    padding-top: 0.35rem;
}

.filter-options {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    flex: 1;
}

/* Chip toggle */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    background: var(--bg-root);
    border: 1px solid var(--border-default);
    border-radius: 100px;
    padding: 0.25rem 0.65rem;
    transition: all 0.15s;
    user-select: none;
}

.chip:hover {
    border-color: var(--border-strong);
    color: var(--text-secondary);
}

.chip input[type="checkbox"],
.chip input[type="radio"] {
    display: none;
}

.chip.checked {
    background: var(--accent-subtle);
    border-color: rgba(99, 91, 255, 0.3);
    color: var(--accent-hover);
}

.chip .chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---- Chart container ---- */
.chart-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: 480px;
    margin-bottom: 2rem;
}

/* ---- GPU cards grid ---- */
.cards-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.gpu-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 0.875rem;
}

.gpu-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.gpu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--card-accent, var(--accent));
    opacity: 0.6;
    transition: opacity 0.2s;
}

.gpu-card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.gpu-card:hover::before {
    opacity: 1;
}

.gpu-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.gpu-card-name {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.provider-count {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.gpu-card-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--green-text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.gpu-card-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 2px;
}

.gpu-card-best {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-top: 0.15rem;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gpu-card-providers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}

.card-provider {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-tertiary);
    background: var(--bg-elevated);
    padding: 0.2rem 0.5rem;
    border-radius: 100px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.gpu-card-chart {
    height: 52px;
    margin-top: 0.25rem;
}

/* ---- GPU bar chart (prices page) ---- */
.gpu-bars-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 0.5rem 0;
    overflow: hidden;
}

.gpu-bar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s;
    cursor: pointer;
    border-bottom: 1px solid var(--border-subtle);
}

.gpu-bar-row:last-child {
    border-bottom: none;
}

.gpu-bar-row:hover {
    background: rgba(99, 91, 255, 0.04);
}

.gpu-bar-info {
    width: 140px;
    flex-shrink: 0;
}

.gpu-bar-name {
    display: block;
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.gpu-bar-provider {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-top: 1px;
}

.gpu-bar-track {
    flex: 1;
    background: var(--bg-elevated);
    border-radius: 6px;
    height: 28px;
    position: relative;
    overflow: hidden;
}

.gpu-bar-fill {
    height: 100%;
    border-radius: 6px;
    min-width: 4px;
    transition: width 0.5s var(--ease-out);
}

.gpu-bar-price {
    width: 90px;
    text-align: right;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.gpu-bar-unit {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* ---- GPU detail page ---- */
.gpu-page .page-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gpu-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.95fr);
    gap: 1.35rem;
    padding: 1.65rem;
    background:
        radial-gradient(circle at top left, rgba(99, 91, 255, 0.16), transparent 38%),
        linear-gradient(180deg, rgba(26, 35, 50, 0.96), rgba(17, 24, 39, 0.96));
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.gpu-hero-main {
    min-width: 0;
}

.gpu-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

.gpu-back-link {
    display: inline-flex;
    align-items: center;
}

.gpu-breadcrumb-separator {
    color: var(--text-muted);
}

.gpu-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #c4b5fd;
    margin-bottom: 0.85rem;
}

.gpu-page .page-hero,
.gpu-page .page-hero p {
    margin: 0;
}

.gpu-page .page-content > * {
    margin: 0;
}

.gpu-page h1 {
    font-size: clamp(2.2rem, 4vw, 3.35rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.gpu-hero-copy {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 56ch;
    margin-top: 0.95rem;
}

.gpu-spec-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.15rem;
}

.gpu-spec-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.58);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
}

.gpu-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.35rem;
}

.gpu-hero-side {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.35rem;
    background: rgba(11, 17, 32, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: calc(var(--radius-xl) - 4px);
}

.gpu-hero-side-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.gpu-hero-side-price {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    color: var(--green-text);
    letter-spacing: -0.05em;
    line-height: 1;
}

.gpu-hero-side-copy {
    min-height: 3.1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.gpu-hero-side-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.gpu-hero-meta {
    padding: 1rem;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: var(--radius-md);
}

.gpu-hero-meta span {
    display: block;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.gpu-hero-meta strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
}

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

.stat-card {
    background: linear-gradient(180deg, rgba(26, 35, 50, 0.96), rgba(17, 24, 39, 0.96));
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.3rem;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
}

.stat-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.45rem;
}

.stat-value {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
}

.stat-value.green {
    color: var(--green-text);
}

.stat-sub {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.45;
}

.gpu-panel {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.96));
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 1.4rem;
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.14);
}

.gpu-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.gpu-panel-header h2 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.gpu-panel-copy {
    margin-top: 0.5rem;
    max-width: 62ch;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.65;
}

.gpu-panel-caption {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.55rem 0.8rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    background: rgba(15, 23, 42, 0.7);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

.gpu-detail-chart {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: 400px;
}

.gpu-panel-chart {
    margin-bottom: 0;
}

.history-unavailable {
    padding: 1.15rem 1.2rem;
    border: 1px dashed rgba(148, 163, 184, 0.2);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.62);
    color: var(--text-secondary);
}

.history-unavailable-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}

.history-unavailable-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.history-unavailable p {
    font-size: 0.88rem;
    line-height: 1.6;
}

.gpu-detail-table {
    margin-top: 0;
}

.section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* ---- Chart provider toggles ---- */
.chart-provider-toggles {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 1.15rem;
}

.toggle-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 0.35rem;
}

.provider-toggle-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-tertiary);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--border-default);
    border-radius: 100px;
    padding: 0.42rem 0.82rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.provider-toggle-chip:hover {
    color: var(--text-secondary);
    border-color: var(--border-strong);
}

.provider-toggle-chip.checked {
    background: var(--accent-subtle);
    border-color: rgba(99, 91, 255, 0.3);
    color: var(--text-primary);
}

.provider-link-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
}

.provider-link-main {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.best-row {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.08), transparent 65%);
}

.gpu-page #provider-table thead th {
    padding: 0.82rem 1rem;
    font-size: 0.72rem;
}

.gpu-page #provider-table tbody td {
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
}

.pricing-pill,
.table-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border-default);
    background: rgba(15, 23, 42, 0.7);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-pill.on-demand {
    background: rgba(99, 91, 255, 0.12);
    border-color: rgba(99, 91, 255, 0.24);
    color: #c4b5fd;
}

.pricing-pill.spot {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.24);
    color: #fbbf24;
}

.pricing-pill.community {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.24);
    color: var(--green-text);
}

.table-badge.best {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.24);
    color: var(--green-text);
}

.updated-cell {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    color: var(--text-tertiary);
    font-size: 0.78rem;
}

.updated-cell span:first-child {
    color: var(--text-secondary);
    font-weight: 600;
}

.gpu-compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.85rem;
}

.gpu-compare-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    text-decoration: none;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    transition: transform 0.15s, border-color 0.15s, background 0.15s;
    position: relative;
    overflow: hidden;
}

.gpu-compare-card::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(99, 91, 255, 0.55), transparent 72%);
    opacity: 0.75;
}

.gpu-compare-card:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    background: rgba(30, 41, 59, 0.88);
}

.gpu-compare-title {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
}

.gpu-compare-meta {
    margin-top: 0.25rem;
    color: var(--text-tertiary);
    font-size: 0.8rem;
    line-height: 1.45;
}

/* ---- Loading state ---- */
.loading-state {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 2rem;
    font-size: 0.875rem;
}

.loading-state .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-default);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-bottom: 0.5rem;
}

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

/* ---- Footer ---- */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.site-footer a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.15s;
}

.site-footer a:hover {
    color: var(--accent-hover);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

/* ---- Home hero ---- */
.home-hero {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 5rem 2rem 3.5rem;
    overflow: hidden;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: -60%;
    left: 50%;
    transform: translateX(-50%);
    width: 140%;
    height: 160%;
    background: radial-gradient(ellipse at center, rgba(99, 91, 255, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.home-hero-inner {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-hover);
    background: var(--accent-subtle);
    border: 1px solid rgba(99, 91, 255, 0.2);
    border-radius: 100px;
    padding: 0.3rem 0.9rem;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-tertiary);
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto 1.75rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.hero-cta {
    text-decoration: none;
    padding: 0.6rem 1.5rem;
    font-size: 0.9375rem;
}

.hero-cta.btn-primary {
    box-shadow: 0 2px 8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.1);
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 0.75rem 0.25rem;
    max-width: 520px;
    margin: 0 auto 2rem;
}

.hero-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.25rem 1rem;
}

.hero-stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
}

.hero-stat-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hero-stat-divider {
    width: 1px;
    height: 28px;
    background: var(--border-default);
    flex-shrink: 0;
}

.hero-providers {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-provider-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    padding: 0.3rem 0.7rem;
    text-decoration: none;
    transition: all 0.15s;
}

.hero-provider-chip:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
    background: var(--bg-hover);
}

/* ---- Home comparisons grid ---- */
.home-compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 0.625rem;
}

.home-compare-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.1rem;
    text-decoration: none;
    transition: all 0.15s;
}

.home-compare-card:hover {
    border-color: var(--border-strong);
    background: var(--bg-hover);
}

.compare-card-gpus {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.compare-card-arrow {
    color: var(--text-muted);
    font-size: 1rem;
    transition: transform 0.15s, color 0.15s;
}

.home-compare-card:hover .compare-card-arrow {
    transform: translateX(2px);
    color: var(--accent-hover);
}

/* ---- Home GPU grid ---- */
.home-gpu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.625rem;
}

.home-gpu-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    text-decoration: none;
    transition: all 0.15s;
    position: relative;
    overflow: hidden;
}

.home-gpu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.15s;
}

.home-gpu-card:hover {
    border-color: var(--border-strong);
    background: var(--bg-hover);
}

.home-gpu-card:hover::before {
    opacity: 0.7;
}

.home-gpu-card-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.4rem;
}

.home-gpu-card-name {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.home-gpu-card-spec {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.home-gpu-card-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--green-text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 0.3rem;
}

.home-gpu-card-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 1px;
}

.home-gpu-card-from {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.home-gpu-card-provcount {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.6875rem;
}

@media (max-width: 768px) {
    .home-gpu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ---- Structured footer ---- */
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 2rem 2rem;
    display: flex;
    justify-content: space-between;
    gap: 3rem;
}

.footer-brand {
    flex-shrink: 0;
}

.footer-tagline {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-cols {
    display: flex;
    gap: 3rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.footer-col-title {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.footer-col a {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-col a:hover {
    color: var(--accent-hover);
}

@media (max-width: 768px) {
    .home-hero {
        padding: 3rem 1rem 2.5rem;
    }

    .hero-title {
        font-size: 2rem;
        letter-spacing: -0.8px;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        border-radius: var(--radius-lg);
        gap: 0;
    }

    .hero-stat {
        min-width: 45%;
        padding: 0.5rem;
    }

    .hero-stat-divider {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .footer-inner {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 1rem;
    }

    .footer-cols {
        gap: 2rem;
        flex-wrap: wrap;
    }

    .home-compare-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.65rem;
    }
}

/* ---- API docs ---- */
.api-docs {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.api-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.api-endpoint {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.api-method {
    background: var(--green-subtle);
    color: var(--green-text);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Fira Code', monospace;
    letter-spacing: 0.03em;
}

.api-path {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-weight: 600;
}

.api-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.api-params {
    margin-bottom: 0.75rem;
}

.api-param {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-size: 0.8125rem;
}

.api-param code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--accent-hover);
    font-weight: 600;
    font-size: 0.8125rem;
}

.api-param-type {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
}

.api-param-desc {
    color: var(--text-secondary);
}

.api-param-desc code {
    color: var(--text-primary);
    background: var(--bg-elevated);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

.api-example {
    margin-top: 0.5rem;
}

.api-example-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.api-code {
    background: var(--bg-root);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    overflow-x: auto;
    line-height: 1.6;
    white-space: pre;
}

/* ---- Utility ---- */
.hidden { display: none !important; }

/* ---- Animations ---- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeUp 0.4s var(--ease-out) both;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .gpu-hero-card {
        grid-template-columns: 1fr;
        padding: 1.2rem;
    }

    .gpu-hero-side-grid {
        grid-template-columns: 1fr 1fr;
    }

    .header-inner {
        padding: 0 1rem;
    }

    .page-content {
        padding: 1.5rem 1rem 3rem;
    }

    .page-hero h1 {
        font-size: 1.35rem;
    }

    .controls-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .gpu-cards-grid {
        grid-template-columns: 1fr;
    }

    .gpu-bar-info {
        width: 100px;
    }

    .gpu-bar-price {
        width: 70px;
        font-size: 0.875rem;
    }

    .filters-panel {
        padding: 1rem;
    }

    .filter-row {
        flex-direction: column;
        gap: 0.4rem;
    }

    .filter-label {
        width: auto;
        padding-top: 0;
    }

    .chart-panel {
        height: 350px;
        padding: 1rem;
    }

    .detail-panel {
        padding: 1.25rem;
    }

    .gpu-panel {
        padding: 1.1rem;
    }

    .gpu-panel-header {
        flex-direction: column;
    }

    .gpu-panel-caption {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .gpu-page h1 {
        font-size: 2rem;
    }

    .gpu-hero-side-grid {
        grid-template-columns: 1fr;
    }

    .gpu-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .header-inner {
        height: 56px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .page-hero h1 {
        font-size: 1.2rem;
    }
}
