:root {
    color-scheme: dark;
    --bg-primary: #0f172a;
    --bg-secondary: rgba(15, 23, 42, 0.75);
    --surface: rgba(30, 41, 59, 0.85);
    --surface-strong: rgba(30, 41, 59, 0.95);
    --accent: #7f5af0;
    --accent-soft: rgba(127, 90, 240, 0.15);
    --accent-strong: #2cb1bc;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --danger: #ef4444;
    --success: #22c55e;
    --crit-color: #ff6b6b;
    --damage-color: #ff6b6b;
    --healing-color: #22c55e;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg-primary);
    color: var(--text);
    min-height: 100vh;
}

a {
    color: var(--accent-strong);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.icon {
    font-style: normal;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.background-gradient {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(127, 90, 240, 0.25), transparent 55%),
                radial-gradient(circle at 80% 10%, rgba(44, 177, 188, 0.2), transparent 60%),
                radial-gradient(circle at 50% 80%, rgba(56, 189, 248, 0.15), transparent 60%);
    filter: blur(60px);
    opacity: 0.9;
    pointer-events: none;
    z-index: -2;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 3rem;
    position: sticky;
    top: 0;
    backdrop-filter: blur(16px);
    background: rgba(15, 23, 42, 0.7);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    z-index: 5;
}

.top-bar__brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar__brand img {
    width: 40px;
    height: 40px;
}

.top-bar__brand .brand-logo {
    width: auto;
    height: 48px;
    max-width: 200px;
    object-fit: contain;
}

.top-bar__brand-copy {
    display: flex;
    flex-direction: column;
}

.top-bar__brand strong {
    display: block;
    font-size: 1.1rem;
}

.top-bar__brand span {
    color: var(--muted);
    font-size: 0.85rem;
}

.top-bar__nav {
    display: flex;
    gap: 1rem;
    font-weight: 600;
}

.top-bar__nav-link {
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.top-bar__nav-link .icon {
    font-size: 0.9rem;
}

.top-bar__nav-link.active,
.top-bar__nav-link:hover {
    color: var(--text);
    background: rgba(127, 90, 240, 0.18);
    transform: translateY(-2px);
}

.profile-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(148, 163, 184, 0.12);
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.profile-chip:hover {
    background: rgba(148, 163, 184, 0.18);
}

.profile-chip__initials {
    width: 32px;
    height: 32px;
    background: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
}

.profile-chip__details strong {
    display: block;
    font-size: 0.95rem;
}

.profile-chip__details .link {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
}

.page-shell {
    padding: 3rem;
    display: flex;
    justify-content: center;
}

.content-card {
    width: min(1100px, 100%);
    background: var(--surface-strong);
    border-radius: 28px;
    padding: 3rem;
    box-shadow: 0 40px 120px rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
}

.page-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.page-intro .lead {
    margin-top: 0.5rem;
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    align-items: center;
}

.hero__copy h1 {
    font-size: 2.6rem;
    margin-bottom: 1rem;
}

.hero__copy p {
    color: var(--muted);
    line-height: 1.6;
    font-size: 1.05rem;
}

.hero__actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.hero__metrics {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.2rem;
}

.metric {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    padding: 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.metric strong {
    font-size: 1.4rem;
}

.metric__label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.metric__trend {
    font-size: 0.85rem;
    color: var(--muted);
}

.metric__trend.positive {
    color: var(--success);
}

.glossy-card {
    background: linear-gradient(135deg, rgba(127, 90, 240, 0.25), rgba(44, 177, 188, 0.25));
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: inset 0 0 40px rgba(127, 90, 240, 0.15);
}

.glossy-card h3 {
    margin-top: 0;
}

.glossy-card ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.glossy-card li {
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero__showcase {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.hero__showcase header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero__showcase ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}

.hero__showcase-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--muted);
}

.section {
    margin-top: 3rem;
}

.section__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.section__header .muted {
    max-width: 520px;
}

.section__title {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
}

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

.grid.three {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.buff-uptime__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}

.buff-card {
    background: rgba(15, 23, 42, 0.78);
    border-radius: 22px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.08);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
}

.buff-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.buff-card__identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.buff-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(127, 90, 240, 0.45), rgba(44, 177, 188, 0.45));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.buff-card__identity h3 {
    margin: 0;
    font-size: 1.1rem;
}

.buff-card__identity span {
    color: var(--muted);
    font-size: 0.85rem;
}

.buff-card__headline {
    text-align: right;
    display: grid;
    gap: 0.35rem;
}

.buff-card__uptime {
    font-size: 1.5rem;
    font-weight: 700;
}

.buff-card__uptime-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.buff-card__highlight {
    display: grid;
    gap: 0.35rem;
    background: rgba(127, 90, 240, 0.12);
    border-radius: 16px;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(127, 90, 240, 0.2);
}

.buff-card__highlight strong {
    font-size: 1rem;
}

.buff-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-strong);
}

.buff-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.buff-list__item {
    background: rgba(148, 163, 184, 0.08);
    border-radius: 16px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.08);
}

.buff-row__title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.buff-name {
    font-weight: 600;
}

.buff-uptime {
    font-weight: 600;
    color: var(--accent-strong);
}

.buff-bar {
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    overflow: hidden;
}

.buff-bar__fill {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(127, 90, 240, 0.65), rgba(44, 177, 188, 0.75));
    border-radius: inherit;
    transition: width 0.3s ease;
}

.buff-row__meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--muted);
}

@media (max-width: 720px) {
    .buff-card__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .buff-card__headline {
        text-align: left;
    }
}

.grid.reports {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid.fights {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.tile {
    background: rgba(148, 163, 184, 0.08);
    border-radius: 20px;
    padding: 1.6rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: transform 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.tile:hover {
    transform: translateY(-4px);
    border-color: rgba(127, 90, 240, 0.4);
}

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

.tile.report {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.tile.report h3 {
    margin: 0;
}

.report__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.9rem;
}

.meta-chip {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    display: grid;
    gap: 0.2rem;
    justify-items: flex-start;
}

.meta-chip strong {
    font-size: 1.3rem;
}

.meta-chip span:last-child {
    color: var(--muted);
    font-size: 0.85rem;
}

.badge {
    background: var(--accent-soft);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--accent-strong);
    font-weight: 600;
}

.status {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    background: rgba(148, 163, 184, 0.12);
}

.status--parsed,
.status--success {
    background: rgba(34, 197, 94, 0.18);
    color: var(--success);
}

.status--uploaded,
.status--danger {
    background: rgba(239, 68, 68, 0.18);
    color: var(--danger);
}

.status--failed {
    background: rgba(239, 68, 68, 0.18);
    color: var(--danger);
}

.muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.feature-grid .feature {
    display: grid;
    gap: 0.6rem;
}

.feature__icon {
    font-size: 1.8rem;
}

.feature ul {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.cta {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    font-weight: 700;
    padding: 0.85rem 1.8rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(127, 90, 240, 0.25);
}

.cta:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ghost {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: var(--text);
    padding: 0.75rem 1.6rem;
    border-radius: 999px;
    cursor: pointer;
}

/* OAuth Provider Buttons */
.oauth-providers {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(30, 41, 59, 0.5);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.oauth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(148, 163, 184, 0.4);
}

.oauth-btn__icon {
    font-size: 1.25rem;
}

.oauth-btn--google:hover {
    border-color: rgba(66, 133, 244, 0.5);
    background: rgba(66, 133, 244, 0.1);
}


.oauth-btn--discord:hover {
    border-color: rgba(88, 101, 242, 0.5);
    background: rgba(88, 101, 242, 0.1);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--muted);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(148, 163, 184, 0.2);
}

.auth-divider span {
    padding: 0 1rem;
}

.cta.secondary {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: var(--text);
    box-shadow: none;
}

.cta.secondary:hover {
    border-color: var(--accent);
    background: rgba(127, 90, 240, 0.1);
}

.footer {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 3rem 3rem;
    color: var(--muted);
}

.page-intro + .section__header,
.page-intro + .section {
    margin-top: 0;
}

.loading,
.empty-state {
    text-align: center;
    padding: 3rem;
    background: rgba(148, 163, 184, 0.08);
    border-radius: 20px;
}

.upload-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
    color: var(--muted);
}

.upload-steps .icon {
    margin-right: 0.4rem;
}

.upload-panel {
    margin-top: 2rem;
    background: rgba(148, 163, 184, 0.1);
    border-radius: 18px;
    padding: 2rem;
    border: 1px dashed rgba(127, 90, 240, 0.4);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.upload-dropzone {
    border: 1px dashed rgba(127, 90, 240, 0.6);
    border-radius: 14px;
    padding: 2rem;
    text-align: center;
    position: relative;
    background: rgba(15, 23, 42, 0.4);
}

.upload-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-dropzone p {
    margin: 0;
    color: var(--muted);
}

.upload-panel__meta {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.95rem;
}

.upload-actions {
    display: flex;
    gap: 1rem;
}

.status-message {
    color: var(--muted);
}

.upload-highlights {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: stretch;
}

.callout {
    background: rgba(148, 163, 184, 0.08);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    display: grid;
    gap: 0.8rem;
}

.callouts {
    display: grid;
    gap: 1rem;
    margin-top: 1.2rem;
}

.callouts div {
    background: rgba(148, 163, 184, 0.08);
    border-radius: 16px;
    padding: 1rem;
}

.workflow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: start;
}

.workflow__card ol {
    padding-left: 1.2rem;
    color: var(--muted);
    line-height: 1.8;
}

.workflow__aside p {
    color: var(--muted);
    line-height: 1.6;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.2rem;
}

.stat {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 16px;
    padding: 1.2rem;
    display: grid;
    gap: 0.3rem;
}

.stat__label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.stat__hint {
    font-size: 0.85rem;
    color: var(--muted);
}

.report-overview .stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.fight__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-cta .glossy-card {
    display: grid;
    gap: 1rem;
}

.status {
    display: inline-block;
}

.status--parsed {
    color: var(--success);
}

.status--uploaded {
    color: var(--muted);
}

.status--failed {
    color: var(--danger);
}

.status-message,
.status {
    font-size: 0.9rem;
}

.data-grid {
    width: 100%;
    border-collapse: collapse;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 16px;
    overflow: hidden;
}

.data-grid th,
.data-grid td {
    padding: 0.85rem 1rem;
    text-align: left;
}

.data-grid tr:nth-child(even) {
    background: rgba(148, 163, 184, 0.05);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    background: rgba(148, 163, 184, 0.08);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.report-meta {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.timeline-card {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.timeline-card svg {
    width: 100%;
    height: 160px;
}

.timeline-line {
    fill: none;
    stroke: rgba(127, 90, 240, 0.8);
    stroke-width: 3;
    stroke-linejoin: round;
}

.timeline-line.healing {
    stroke: rgba(44, 177, 188, 0.8);
}

.timeline-legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    color: var(--muted);
}

.timeline-legend .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.4rem;
}

.timeline-legend .dot.damage {
    background: rgba(127, 90, 240, 0.8);
}

.timeline-legend .dot.healing {
    background: rgba(44, 177, 188, 0.8);
}

.filters {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filters label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.filters input,
.filters select,
textarea {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: var(--text);
    font-size: 1rem;
}

textarea {
    resize: vertical;
}

.leaderboard-chart {
    margin-bottom: 2rem;
    background: rgba(148, 163, 184, 0.08);
    border-radius: 18px;
    padding: 1rem;
}

.leaderboard-summary {
    background: rgba(148, 163, 184, 0.08);
    border-radius: 16px;
    padding: 1rem 1.2rem;
    display: grid;
    gap: 0.3rem;
    min-width: 220px;
}

.leaderboard-summary .summary-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.chart-label {
    font-size: 0.85rem;
    fill: var(--muted);
}

.bar {
    fill: rgba(148, 163, 184, 0.2);
}

.bar.p95 {
    fill: rgba(127, 90, 240, 0.35);
}

.bar.p90 {
    fill: rgba(127, 90, 240, 0.28);
}

.bar.p75 {
    fill: rgba(127, 90, 240, 0.22);
}

.bar.p50 {
    fill: rgba(127, 90, 240, 0.16);
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.team-performance__grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
    gap: 1.5rem;
}

.row-warning {
    background: rgba(239, 68, 68, 0.08);
}

.coach-grid {
    margin-top: 2.5rem;
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(300px, 1fr);
    gap: 2rem;
}

.coach-examples {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.coach-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(148, 163, 184, 0.08);
    border-radius: 20px;
    padding: 1.5rem;
}

.coach-actions {
    display: flex;
    gap: 0.8rem;
}

.coach-scope {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
}

.coach-response {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 20px;
    padding: 1.8rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
    min-height: 320px;
}

.coach-answer {
    margin-top: 1rem;
    line-height: 1.6;
}

.coach-answer:not(.expanded) {
    max-height: 220px;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0));
}

.coach-meta {
    margin-top: 1.5rem;
    color: var(--muted);
}

.coach-meta ul {
    padding-left: 1.2rem;
}

.coach-context {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    background: rgba(148, 163, 184, 0.12);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
}

.auth-wall {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(148, 163, 184, 0.08);
    border-radius: 24px;
}

.auth-wall h1 {
    margin-bottom: 0.5rem;
}

.player-link {
    color: var(--text);
    font-weight: 600;
}

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

.armory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.armory-header h1 {
    margin: 0 0 0.35rem;
}

.loadout-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.loadout-tab {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: var(--text);
    padding: 0.55rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.loadout-tab .badge {
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
}

.loadout-tab:hover {
    transform: translateY(-1px);
}

.loadout-tab.active {
    background: rgba(127, 90, 240, 0.2);
    border-color: rgba(127, 90, 240, 0.45);
}

.talent-section {
    margin-top: 2rem;
}

.talent-grid {
    display: grid;
    gap: 1.75rem;
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
}

.talent-tree {
    display: grid;
    gap: 1.5rem;
}

.talent-tree__panel {
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 25px 80px rgba(15, 23, 42, 0.45);
    padding: 1.25rem 1.5rem 1.75rem;
    display: grid;
    gap: 1.25rem;
}

.talent-tree__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.talent-tree__header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.talent-tree__canvas {
    --columns: 7;
    --rows: 8;
    display: grid;
    grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
    grid-template-rows: repeat(var(--rows), minmax(64px, 1fr));
    gap: 0.9rem;
    padding: 1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(127, 90, 240, 0.12), rgba(44, 177, 188, 0.1));
    border: 1px solid rgba(127, 90, 240, 0.18);
    position: relative;
}

.talent-node {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.75);
    padding: 0;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.talent-node:not(.is-selected) {
    opacity: 0.45;
}

.talent-node__icon {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: saturate(0.9);
}

.talent-node__rank {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(15, 23, 42, 0.85);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid rgba(127, 90, 240, 0.6);
}

.talent-node.is-selected {
    border-color: rgba(127, 90, 240, 0.8);
    box-shadow: 0 12px 32px rgba(127, 90, 240, 0.35);
}

.talent-node.is-selected .talent-node__icon {
    filter: saturate(1.15);
}

.talent-node:focus-visible {
    outline: 3px solid rgba(127, 90, 240, 0.8);
    outline-offset: 2px;
}

.talent-tree__fallback {
    border-radius: 20px;
    padding: 2rem;
    background: rgba(30, 41, 59, 0.9);
    border: 1px dashed rgba(148, 163, 184, 0.3);
    text-align: center;
}

.talent-summary {
    background: rgba(15, 23, 42, 0.65);
    padding: 1.5rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.talent-summary h2 {
    margin: 0;
}

.talent-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.talent-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(127, 90, 240, 0.12);
    border-radius: 14px;
    padding: 0.75rem 1rem;
}

.talent-list strong {
    font-size: 0.95rem;
}

.talent-list span {
    color: var(--muted);
    font-size: 0.85rem;
}

@media (max-width: 960px) {
    .armory-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .talent-grid {
        grid-template-columns: 1fr;
    }

    .talent-tree__panel {
        padding: 1rem 1.1rem 1.4rem;
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 0.75rem 1rem;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: center;
    }

    .top-bar__brand {
        flex-shrink: 0;
    }

    .top-bar__brand-copy {
        display: none;
    }

    .top-bar__brand .brand-logo {
        height: 32px;
    }

    .top-bar__nav {
        flex: 1;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.3rem;
        min-width: 0;
    }

    .top-bar__nav-link {
        padding: 0.5rem 0.7rem;
        font-size: 0.75rem;
        flex-direction: row;
        gap: 0.3rem;
        white-space: nowrap;
    }

    .top-bar__nav-link .icon {
        font-size: 1rem;
    }

    .top-bar__nav-link span:not(.icon) {
        font-size: 0.75rem;
    }

    .profile-chip {
        width: 100%;
        order: 10;
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
        font-size: 0.8rem;
        justify-content: center;
    }

    .profile-chip__initials {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .profile-chip__details {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .profile-chip__details strong {
        font-size: 0.85rem;
    }

    .profile-chip__details .link {
        font-size: 0.75rem;
    }

    .hero__copy h1 {
        font-size: 2.1rem;
    }

    .hero__metrics {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .page-shell {
        padding: 1rem;
    }

    .content-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .page-intro {
        flex-direction: column;
    }

    .upload-highlights,
    .leaderboard-grid,
    .team-performance__grid,
    .workflow {
        grid-template-columns: 1fr;
    }

    .coach-grid {
        grid-template-columns: 1fr;
    }

    .footer {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .top-bar {
        padding: 0.5rem 0.75rem;
    }

    .top-bar__brand .brand-logo {
        height: 28px;
    }

    .top-bar__nav {
        gap: 0.25rem;
    }

    .top-bar__nav-link {
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
    }

    .top-bar__nav-link .icon {
        font-size: 1.1rem;
    }

    .top-bar__nav-link span:not(.icon) {
        display: none;
    }

    .profile-chip {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .profile-chip__initials {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .profile-chip__details strong {
        font-size: 0.8rem;
    }

    .content-card {
        padding: 1rem;
    }

    .page-shell {
        padding: 0.75rem;
    }
}

/* ===================================
   WCL-Style Event Views
   =================================== */

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 0;
    border-bottom: 2px solid rgba(148, 163, 184, 0.15);
    align-items: center;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.tab-button:hover {
    color: var(--text);
    background: rgba(127, 90, 240, 0.1);
}

.tab-button.active {
    color: var(--accent-strong);
    border-bottom-color: var(--accent-strong);
    font-weight: 600;
}

/* Events View Container */
.events-view {
    background: var(--surface);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

/* Filter Bar */
.events-filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem 0.75rem;
    background: var(--surface-strong);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9rem;
    min-width: 180px;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--accent-strong);
}

/* Timeline Chart */
.timeline-chart-container {
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
}

.timeline-chart-container h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--text);
}

.events-timeline-chart {
    width: 100%;
    height: 300px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.grid-line {
    stroke: rgba(148, 163, 184, 0.1);
    stroke-width: 1;
}

.dps-line {
    fill: none;
    stroke: var(--damage-color);
    stroke-width: 2;
    filter: drop-shadow(0 0 4px rgba(255, 107, 107, 0.5));
}

.hps-line {
    fill: none;
    stroke: var(--healing-color);
    stroke-width: 2;
    filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.5));
}

.time-label {
    fill: var(--muted);
    font-size: 10px;
    text-anchor: middle;
}

/* Abilities Table */
.abilities-table-container {
    margin-top: 1.5rem;
}

.abilities-table-container h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--text);
}

.abilities-table {
    width: 100%;
}

.abilities-table th.num,
.abilities-table td.num {
    text-align: right;
}

.ability-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spell-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(127, 90, 240, 0.2);
    border-radius: 4px;
    font-size: 14px;
}

.crit-value {
    color: var(--crit-color);
    font-weight: 600;
}

/* Events Table */
.events-table-container {
    margin-top: 1.5rem;
}

.events-summary {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--muted);
}

.events-table {
    width: 100%;
}

.events-table .time-col {
    width: 120px;
    font-family: 'Courier New', monospace;
    color: var(--muted);
    font-size: 0.85rem;
}

.event-row {
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.event-row:hover {
    background: rgba(127, 90, 240, 0.05);
}

.event-description {
    padding: 0.5rem 0;
    line-height: 1.6;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    padding: 1rem;
}

.pagination button {
    padding: 0.5rem 1rem;
}

/* Data Grid Enhancements for Events */
.data-grid.abilities-table tbody tr:hover,
.data-grid.events-table tbody tr:hover {
    background: rgba(127, 90, 240, 0.08);
    cursor: pointer;
}

.data-grid.abilities-table th,
.data-grid.events-table th {
    position: sticky;
    top: 0;
    background: var(--surface-strong);
    z-index: 1;
}
