﻿:root {
    --bg: #0b0d12;
    --panel: #151a22;
    --panel-soft: #1d2430;
    --ink: #f8f4ec;
    --muted: #b9b4a7;
    --line: rgba(173, 190, 216, 0.16);
    --accent: #e2b84b;
    --accent-2: #59c8ae;
    --accent-3: #7da6ff;
    --accent-4: #e8866c;
    --danger: #e35d5b;
    --max: 1180px;
}

html,
body {
    background:
        radial-gradient(circle at top left, rgba(125, 166, 255, 0.16) 0%, transparent 32%),
        radial-gradient(circle at top right, rgba(89, 200, 174, 0.12) 0%, transparent 28%),
        linear-gradient(180deg, #10151d 0%, #0c1118 34%, #0b0d12 100%);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    margin: 0;
    min-height: 100vh;
}

a {
    color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6,
label,
legend {
    color: var(--ink);
}

.page-section {
    background:
        radial-gradient(circle at 10% 10%, rgba(226, 184, 75, 0.07) 0%, transparent 24%),
        radial-gradient(circle at 90% 0%, rgba(125, 166, 255, 0.08) 0%, transparent 26%),
        linear-gradient(180deg, rgba(20, 27, 37, 0.94) 0%, rgba(15, 21, 30, 0.94) 100%);
    padding: 5rem 5vw;
    position: relative;
}

.section-inner {
    margin: 0 auto;
    max-width: var(--max);
}

.wide-table-page {
    padding-left: clamp(1rem, 2vw, 2rem);
    padding-right: clamp(1rem, 2vw, 2rem);
}

.wide-table-page .section-inner {
    max-width: min(1800px, 100%);
}

.eyebrow {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero {
    background:
        linear-gradient(90deg, rgba(8, 9, 12, 0.92) 0%, rgba(8, 9, 12, 0.72) 44%, rgba(8, 9, 12, 0.26) 100%),
        url("https://images.unsplash.com/photo-1502904550040-7534597429ae?auto=format&fit=crop&w=2200&q=80") center/cover;
    min-height: calc(100vh - 72px);
    padding: 6rem 5vw 4rem;
}

.hero-grid {
    align-items: end;
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    margin: 0 auto;
    max-width: var(--max);
}

.hero h1,
.hero h3,
.page-hero h1,
.page-hero h3 {
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 900;
    line-height: 0.96;
    margin: 1rem 0;
    max-width: 900px;
    color: var(--ink);
}

.hero p,
.page-hero p {
    color: #ddd4c5;
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    line-height: 1.7;
    max-width: 680px;
}

.hero-actions,
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.toolbar input {
    flex: 0 1 auto;
}

.toolbar input.auto-grow-input {
    max-width: min(100%, 42ch);
    width: min(100%, 32ch);
    min-width: 20rem;
}

.toolbar select {
    flex: 0 0 auto;
    min-width: 100px;
}

.btn-strong,
.btn-soft {
    border-radius: 8px;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 44px;
    padding: 0.78rem 1rem;
    text-decoration: none;
}

.btn-strong {
    background: var(--accent);
    color: #111111;
    box-shadow: 0 10px 24px rgba(226, 184, 75, 0.22);
}

.btn-soft {
    background: rgba(125, 166, 255, 0.12);
    color: var(--ink);
    border: 1px solid rgba(125, 166, 255, 0.2);
}

.cookie-consent-backdrop {
    align-items: center;
    background: rgba(0, 0, 0, 0.72);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 1rem;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 3000;
}

.cookie-consent-modal {
    background: var(--panel);
    border: 1px solid rgba(248, 244, 236, 0.18);
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    color: var(--ink);
    max-width: 560px;
    padding: 1.5rem;
    width: min(560px, 100%);
}

.cookie-consent-modal h2 {
    font-size: 1.35rem;
    margin: 0 0 0.9rem;
}

.cookie-consent-modal p {
    color: #ddd4c5;
    line-height: 1.55;
    margin: 0 0 0.85rem;
}

.cookie-consent-button {
    margin-top: 0.35rem;
}

.metric-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric,
.feature-card,
.data-card,
.profile-card,
.story-card,
.world-card {
    background: linear-gradient(180deg, rgba(28, 36, 49, 0.96) 0%, rgba(19, 26, 36, 0.96) 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.metric {
    padding: 1.1rem;
}

.metric strong {
    display: block;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1;
}

.stickycol {
    position: sticky;
    left: 0;
    background-color: #1b2431;
    z-index: 2;
}

.metric span {
    color: var(--muted);
    display: block;
    margin-top: 0.45rem;
}

.feature-grid,
.profile-grid,
.story-grid,
.world-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.share-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-card,
.profile-card,
.story-card,
.world-card,
.data-card {
    padding: 1.25rem;
}

.feature-card h3,
.profile-card h3,
.story-card h3,
.world-card h3 {
    color: var(--ink);
    font-size: 1.1rem;
    margin: 0.6rem 0;
}

.feature-card p,
.profile-card p,
.story-card p,
.world-card p,
.data-card p {
    color: var(--muted);
    line-height: 1.6;
}

.card-number {
    color: var(--accent-2);
    font-weight: 900;
}

.page-hero {
    background:
        radial-gradient(circle at 85% 20%, rgba(89, 200, 174, 0.08) 0%, transparent 24%),
        radial-gradient(circle at 15% 0%, rgba(125, 166, 255, 0.12) 0%, transparent 28%),
        linear-gradient(180deg, #18202c 0%, #121a24 100%);
    border-bottom: 1px solid var(--line);
    padding: 5rem 5vw 3rem;
}

.data-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
}

.form-control,
.form-select,
input:not([type="checkbox"]) {
    background: #131a24;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    color-scheme: dark;
    min-height: 44px;
    padding: 0.7rem 0.85rem;
}

.form-control:disabled,
.form-control[readonly],
.form-select:disabled {
    background: #1a2230;
    color: var(--ink);
    opacity: 1;
}

.form-control::placeholder,
input:not([type="checkbox"])::placeholder {
    color: var(--muted);
    opacity: 1;
}

.form-select option,
select option {
    background: #131a24;
    color: var(--ink);
}

.form-control:focus,
.form-select:focus,
input:not([type="checkbox"]):focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.18rem rgba(242, 193, 78, 0.22);
    color: var(--ink);
    outline: none;
}

input[type="checkbox"] {
    accent-color: var(--accent);
}

.table-wrap {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow-x: auto;
    background: linear-gradient(180deg, rgba(24, 31, 43, 0.94) 0%, rgba(16, 23, 32, 0.94) 100%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.sticky-horizontal-scroll {
    position: fixed;
    bottom: 0;
    height: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    background: white;
    z-index: 9999;
    display: block;
    border-top: 1px solid #ddd;
}

.sticky-horizontal-scroll-content {
    height: 1px;
}

.context-menu {
    position: absolute;
    display: none;
    background: #ffffff;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    padding: 10px;
    z-index: 1000;
    border-radius: 4px;
}

.context-menu label {
    display: block;
    cursor: pointer;
    margin-bottom: 5px;
}

.table {
    color: var(--ink);
    margin: 0;
}

.table th {
    color: #c8d5f3;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(30, 39, 54, 0.98);
}

.table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.table th.sortable:hover {
    color: var(--accent);
}

.sort-indicator {
    display: inline-block;
    margin-left: 0.4rem;
    font-size: 0.65rem;
    color: var(--accent);
    vertical-align: middle;
}

.table td,
.table th {
    border-color: var(--line);
    padding: 0.95rem;
}

.table td {
    color: var(--ink);
}

.table tbody tr:nth-child(odd) td {
    background: rgba(255, 255, 255, 0.015);
}

.table tbody tr:nth-child(even) td {
    background: rgba(125, 166, 255, 0.035);
}

.status-message {
    background: rgba(103, 208, 179, 0.12);
    border: 1px solid rgba(103, 208, 179, 0.28);
    border-radius: 8px;
    color: #d5fff3;
    padding: 1rem;
    white-space: pre-wrap;
}

.timeline {
    border-left: 1px solid var(--line);
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
    padding-left: 1.2rem;
}

.timeline-item {
    position: relative;
}

.timeline-item::before {
    background: var(--accent);
    border-radius: 999px;
    content: "";
    height: 10px;
    left: -1.55rem;
    position: absolute;
    top: 0.45rem;
    width: 10px;
}

#blazor-error-ui {
    display: none;
}

@media (max-width: 920px) {
    .hero {
        min-height: auto;
        padding-top: 4rem;
    }

    .hero-grid,
    .data-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid,
    .profile-grid,
    .story-grid,
    .world-grid,
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .page-section {
        padding: 3rem 1rem;
    }
}

.member-summary {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.leader-strip {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 1.25rem 0 1rem;
}

.leader-card {
    background: linear-gradient(180deg, rgba(226, 184, 75, 0.14), rgba(28, 36, 49, 0.96));
    border: 1px solid rgba(242, 193, 78, 0.24);
    border-radius: 8px;
    min-height: 180px;
    padding: 1.1rem;
}

.leader-rank {
    color: var(--accent);
    display: block;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.leader-card h4 {
    font-size: 1.25rem;
    margin: 0.8rem 0 1rem;
}

.leader-stats {
    align-items: baseline;
    display: flex;
    gap: 0.45rem;
}

.leader-stats strong {
    font-size: 2.25rem;
    line-height: 1;
}

.leader-stats span,
.leader-card p,
.subtle,
.table-tools {
    color: var(--muted);
}

.table-tools {
    display: flex;
    flex-wrap: wrap;
    font-size: 0.9rem;
    gap: 0.8rem;
    justify-content: space-between;
    margin-top: 1.5rem;
}

.member-table td strong,
.member-table td .subtle {
    display: block;
}

.rank-cell,
.number-cell {
    color: var(--accent);
    font-weight: 900;
}

.status-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    min-width: 68px;
    justify-content: center;
    padding: 0.32rem 0.6rem;
}

.status-active {
    background: rgba(103, 208, 179, 0.16);
    color: #9ff2dc;
    border: 1px solid rgba(89, 200, 174, 0.24);
}

.status-quiet {
    background: rgba(232, 134, 108, 0.12);
    color: var(--muted);
    border: 1px solid rgba(232, 134, 108, 0.18);
}

@media (max-width: 920px) {
    .member-summary,
    .leader-strip {
        grid-template-columns: 1fr;
    }
}

.row-actions,
.club-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    white-space: nowrap;
}

.row-actions .btn-soft,
.club-actions .btn-soft,
.btn-disabled {
    border: 0;
    border-radius: 8px;
    font-size: 0.82rem;
    min-height: 36px;
    padding: 0.45rem 0.7rem;
    text-decoration: none;
}

.row-actions .btn-table-action {
    background: rgba(14, 19, 27, 0.94);
    border: 1px solid rgba(125, 166, 255, 0.18);
    color: #f8f4ec;
    white-space: nowrap;
}

.actions-column,
.report-column,
.report-inline {
    white-space: nowrap;
}

.row-actions .btn-table-action:hover,
.row-actions .btn-table-action:focus-visible {
    background: rgba(30, 39, 54, 0.98);
    border-color: rgba(95, 211, 185, 0.45);
    color: var(--accent-2);
}

.btn-disabled {
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(248, 244, 236, 0.38);
    display: inline-flex;
    font-weight: 800;
}

.detail-row td {
    background: rgba(89, 200, 174, 0.08);
}

.detail-panel {
    background: linear-gradient(180deg, rgba(16, 23, 32, 0.92) 0%, rgba(21, 29, 40, 0.92) 100%);
    border: 1px solid rgba(125, 166, 255, 0.12);
    border-radius: 10px;
    padding: 1rem;
}

.detail-panel h4 {
    color: var(--ink);
    font-size: 1rem;
    margin: 0 0 0.8rem;
}

.history-grid {
    display: grid;
    gap: 0.45rem 1rem;
    grid-template-columns: repeat(6, max-content);
}

.history-grid h4 {
    color: var(--accent);
}

.history-grid strong {
    color: var(--accent);
}

.history-grid span {
    color: var(--accent);
}

.member-history-grid {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(7, minmax(80px, auto));
    overflow-x: auto;
}

.member-history-grid > span,
.member-history-grid > strong {
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    padding: 0.4rem 0.6rem;
    white-space: nowrap;
}

.member-history-grid > strong {
    color: var(--accent);
}

.member-history-grid-header {
    color: var(--muted) !important;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.marathons-grid {
    display: grid;
    gap: 0.45rem 1rem;
    grid-template-columns: repeat(6, max-content);
}

.marathons-grid h4 {
    color: var(--accent);
}

.marathons-grid strong {
    color: var(--accent);
}

.marathons-grid span {
    color: var(--accent);
}


.detail-panel .member-history-title {
    background: linear-gradient(135deg, var(--accent) 0%, #f0d277 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-left: 6px solid var(--accent-2) !important;
    border-radius: 8px;
    color: #08090c !important;
    display: block;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.3;
    margin: 0 0 0.9rem;
    padding: 0.7rem 0.9rem;
}

.detail-panel .member-marathon-title {
    background: linear-gradient(135deg, var(--accent) 0%, #f0d277 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-left: 6px solid var(--accent-2) !important;
    border-radius: 8px;
    color: #08090c !important;
    display: block;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.3;
    margin: 0 0 0.9rem;
    padding: 0.7rem 0.9rem;
}
