:root {
    --color-ink: #0d0e0d;
    --color-panel: #171917;
    --color-panel-2: #20231f;
    --color-gold: #e7f35b;
    --color-ink-soft: #f2f2ed;
    --font-pixel: "DM Mono", monospace;
    --font-sans: "Manrope", system-ui, sans-serif;
}

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

html,
body {
    background: var(--color-ink);
    color: var(--color-ink-soft);
    font-family: var(--font-sans);
    min-height: 100%;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 55% 35% at 50% -5%, rgba(231, 243, 91, 0.11), transparent 70%),
        linear-gradient(180deg, #151713 0%, var(--color-ink) 48%);
}

@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-rise {
    animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.site-header {
    border-bottom: 1px solid rgba(255,255,255,.09);
    background: rgba(13,14,13,.86);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-inner {
    margin: 0 auto;
    max-width: 72rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #f2f2ed;
    font: 500 0.75rem/1 var(--font-pixel);
    letter-spacing: 0.12em;
    text-decoration: none;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-gold);
    border-radius: 50%;
    color: #12130e;
    font-weight: 500;
    height: 1.75rem;
    width: 1.75rem;
    letter-spacing: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.season-label {
    display: none;
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
}

.discord-link {
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 0.45rem;
    color: #f2f2ed;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.55rem 0.75rem;
    transition: background-color 0.18s ease, border-color 0.18s ease;
    text-decoration: none;
}

.discord-link:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.32);
}

.main-content {
    margin: 0 auto;
    max-width: 72rem;
    padding: 2.25rem 1.25rem 3rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    padding-bottom: 2.25rem;
}

.eyebrow {
    display: flex;
    align-items: center;
    color: #afb4a8;
    font: 500 0.67rem/1 var(--font-pixel);
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.eyebrow span {
    background: var(--color-gold);
    border-radius: 50%;
    height: 0.42rem;
    width: 0.42rem;
    margin-right: 0.6rem;
}

.hero-title {
    color: var(--color-ink-soft);
    font-size: clamp(2.8rem, 7vw, 5.8rem);
    font-weight: 800;
    letter-spacing: -0.075em;
    line-height: 0.93;
    margin: 0.8rem 0 0.85rem;
}

.hero-title em {
    color: var(--color-gold);
    font-style: normal;
}

.hero-copy {
    color: #a1a59e;
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 30rem;
}

.rank-summary {
    display: flex;
    gap: 0.85rem;
    border-left: 1px solid rgba(255,255,255,.14);
    padding: 0.25rem 0 0.25rem 1.15rem;
}

.summary-number {
    color: var(--color-gold);
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -0.08em;
    line-height: 1;
}

.summary-label {
    color: #92978e;
    font: 400 0.65rem/1.35 var(--font-pixel);
    padding-top: 0.15rem;
}

.rankings-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tier-row {
    background: rgba(23,25,23,.76);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 0.7rem;
    display: flex;
    min-height: 9.6rem;
    overflow: hidden;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.tier-row:hover {
    background: rgba(31,34,30,.92);
    border-color: rgba(255,255,255,.18);
}

.tier-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 6.4rem;
    background: color-mix(in srgb, var(--tier-color) 10%, transparent);
    border-right: 1px solid rgba(255,255,255,.1);
    color: var(--tier-color);
}

.tier-badge > span {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.1em;
    line-height: 1;
}

.tier-badge small {
    color: rgba(242,242,237,.45);
    font: 500 0.55rem/1 var(--font-pixel);
    letter-spacing: 0.1em;
    margin-top: 0.55rem;
}

.tier-skins {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
    gap: 0.85rem;
    padding: 1rem;
}

.tier-skins h3 {
    flex-basis: 100%;
}

.skin-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    min-width: 5.3rem;
    padding: 0.2rem;
    transition: transform 0.18s ease;
}

.skin-card:hover {
    transform: translateY(-3px);
}

.skin-render {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5.25rem;
    height: 6.25rem;
    background: linear-gradient(145deg, color-mix(in srgb, var(--card-color) 19%, #242722), #111211);
    border: 1px solid color-mix(in srgb, var(--card-color) 42%, transparent);
    border-radius: 0.45rem;
    overflow: hidden;
    isolation: isolate;
}

.skin-render::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, #2a2d2a 0%, #1a1d1a 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skin-render.is-loading::before {
    opacity: 1;
    animation: skeleton-pulse 1.1s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

.skin-render:empty::before {
    opacity: 1;
}

.skin-render img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skin-render img[src] {
    opacity: 1;
}

.skin-render::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(112deg, transparent 36%, color-mix(in srgb, var(--card-color) 20%, transparent) 44%, color-mix(in srgb, white 72%, var(--card-color)) 50%, color-mix(in srgb, var(--card-color) 25%, transparent) 56%, transparent 64%);
    transform: translateX(-125%);
    pointer-events: none;
    animation: skin-shine 3.8s ease-in-out infinite;
}

@keyframes skin-shine {
    0%, 32% { transform: translateX(-125%); }
    60%, 100% { transform: translateX(125%); }
}

.skin-name {
    color: #d8dad4;
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
    max-width: 6.8rem;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.skin-team {
    color: #8f968c;
    font-size: 0.6rem;
    font-weight: 500;
    text-align: center;
    max-width: 6.8rem;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: -0.3rem;
}

.empty-tier {
    color: #8f968c;
    font-size: 0.78rem;
    font-weight: 600;
    padding-left: 0.45rem;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: #8f968c;
    font-size: 1rem;
}

.ranking-note {
    color: #7c8179;
    font-size: 0.72rem;
    margin-top: 1.5rem;
    text-align: right;
}

.footer {
    border-top: 1px solid rgba(255,255,255,.09);
    color: #73776f;
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    padding: 1.5rem max(1.25rem, calc((100vw - 72rem)/2));
}

@media (min-width: 640px) {
    .season-label {
        display: block;
    }
    
    .header-inner {
        padding: 1rem 2rem;
    }
    
    .main-content {
        padding: 3.5rem 2rem 3rem;
    }
    
    .hero-grid {
        margin-bottom: 2.5rem;
        padding-bottom: 2.25rem;
    }
}

@media (max-width: 600px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .rank-summary {
        border-left: 0;
        border-top: 1px solid rgba(255,255,255,.14);
        padding: 1rem 0 0;
    }
    
    .tier-row {
        min-height: 0;
    }
    
    .tier-badge {
        flex-basis: 4.3rem;
    }
    
    .tier-badge > span {
        font-size: 2rem;
    }
    
    .tier-skins {
        gap: 0.55rem;
        padding: 0.75rem;
    }
    
    .skin-render {
        height: 5.5rem;
        width: 4.6rem;
    }
    
    .footer {
        gap: 0.5rem;
        padding: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .animate-rise,
    .skin-render::after,
    .skin-render.is-loading::before {
        animation: none;
    }
    
    .skin-card {
        transition: none;
    }
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: #2a2f3a;
    border-radius: 6px;
}
