﻿* { box-sizing: border-box; }

        :root {
            --text-main: #eef4ff;
            --text-soft: #9ebaf0;
            --line: rgba(145, 190, 255, 0.18);
            --panel: rgba(8,20,42,0.82);
            --panel-2: rgba(8,15,28,0.94);
            --gold: #ffcf78;
            --blue: #89d8ff;
            --blue-strong: #62b8ff;
            --violet: #9aa9ff;
            --shadow-heavy: 0 20px 48px rgba(0,0,0,0.36);
        }

        body {
            margin: 0;
            font-family: Arial, sans-serif;
            color: var(--text-main);
            background:
                radial-gradient(circle at top, #16315d 0%, #09111f 42%, #050a13 100%);
            min-height: 100vh;
            overflow-x: hidden;
        }

        body::before {
            content: "";
            position: fixed;
            inset: 0;
            background:
                linear-gradient(rgba(4,10,20,0.50), rgba(4,10,20,0.82)),
                radial-gradient(circle at 18% 12%, rgba(123,170,255,0.20), transparent 22%),
                radial-gradient(circle at 82% 18%, rgba(123,170,255,0.10), transparent 18%);
            z-index: -1;
        }

        .wrap {
            max-width: 1450px;
            margin: 0 auto;
            padding: 24px;
        }

        .topbar {
            display: flex;
            gap: 12px;
            margin-bottom: 22px;
            flex-wrap: wrap;
        }

        .navbtn {
            display: inline-block;
            padding: 11px 16px;
            border-radius: 14px;
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(157, 193, 255, 0.18);
            color: #fff;
            text-decoration: none;
            font-weight: 700;
            transition: 0.2s ease;
        }

        .navbtn:hover {
            background: rgba(118, 168, 255, 0.18);
            transform: translateY(-1px);
        }

        .board-shell {
            background: linear-gradient(180deg, var(--panel), var(--panel-2));
            border: 1px solid var(--line);
            border-radius: 28px;
            padding: 28px;
            box-shadow: var(--shadow-heavy);
            position: relative;
            overflow: hidden;
        }

        .board-shell::before {
            content: "";
            position: absolute;
            inset: -20% 12% auto;
            height: 220px;
            background: radial-gradient(circle, rgba(116, 160, 255, 0.16), transparent 62%);
            pointer-events: none;
        }

        .board-shell.ranked::after,
        .board-shell.unranked::after {
            content: "";
            position: absolute;
            inset: 0;
            pointer-events: none;
            background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.015) 48%, transparent 100%);
        }

        .board-shell.ranked {
            border-color: rgba(255, 191, 92, 0.20);
        }

        .board-shell.unranked {
            border-color: rgba(111, 185, 255, 0.22);
        }

        .board-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            gap: 18px;
            flex-wrap: wrap;
            margin-bottom: 26px;
            position: relative;
            z-index: 1;
        }

        .board-kicker {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 14px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 900;
            letter-spacing: 1.2px;
            text-transform: uppercase;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.10);
            margin-bottom: 12px;
        }

        .board-shell.ranked .board-kicker {
            color: #ffd595;
            border-color: rgba(255, 192, 106, 0.22);
            box-shadow: 0 0 20px rgba(255, 173, 71, 0.08);
        }

        .board-shell.unranked .board-kicker {
            color: #9ed9ff;
            border-color: rgba(98, 190, 255, 0.20);
            box-shadow: 0 0 20px rgba(88, 179, 255, 0.08);
        }

        .board-title {
            font-size: 42px;
            font-weight: 900;
            letter-spacing: 0.2px;
            line-height: 1.02;
        }

        .board-subtitle {
            color: var(--text-soft);
            font-size: 15px;
            margin-top: 6px;
        }

        .board-summary {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            margin-top: 16px;
        }

        .summary-pill {
            padding: 10px 14px;
            border-radius: 16px;
            background: rgba(255,255,255,0.045);
            border: 1px solid rgba(157, 193, 255, 0.12);
            min-width: 124px;
        }

        .summary-label {
            display: block;
            color: var(--text-soft);
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 1px;
            text-transform: uppercase;
            margin-bottom: 6px;
        }

        .summary-value {
            display: block;
            color: var(--text-main);
            font-size: 22px;
            font-weight: 900;
        }

        .refresh-badge {
            padding: 10px 14px;
            border-radius: 16px;
            background: rgba(255,255,255,0.05);
            color: var(--text-soft);
            font-size: 14px;
            border: 1px solid rgba(157, 193, 255, 0.14);
        }

        .board-tabs {
            display: inline-flex;
            gap: 8px;
            padding: 6px;
            background: rgba(255,255,255,0.045);
            border: 1px solid rgba(157, 193, 255, 0.12);
            border-radius: 16px;
            margin-bottom: 22px;
            position: relative;
            z-index: 1;
        }

        .board-tab {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 112px;
            padding: 10px 14px;
            border-radius: 12px;
            color: var(--text-soft);
            text-decoration: none;
            font-weight: 800;
            font-size: 14px;
            transition: 0.2s ease;
        }

        .board-tab.active {
            color: #fff;
            background: linear-gradient(180deg, rgba(110, 150, 255, 0.28), rgba(72, 112, 218, 0.18));
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 24px rgba(0,0,0,0.18);
        }

        .podium-grid {
            display: grid;
            grid-template-columns: 1fr 1.12fr 1fr;
            gap: 22px;
            align-items: end;
            margin-top: 6px;
            margin-bottom: 30px;
        }

        .podium-card {
            position: relative;
            min-height: 500px;
            padding: 22px 20px 20px;
            background: linear-gradient(180deg, rgba(124,170,255,0.17), rgba(78,122,218,0.08));
            border: 1px solid rgba(156, 194, 255, 0.28);
            border-radius: 26px;
            box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 18px 40px rgba(0,0,0,0.30);
            overflow: hidden;
        }

        .podium-card::before {
            content: "";
            position: absolute;
            inset: 0;
            background:
                linear-gradient(180deg, rgba(255,255,255,0.10), transparent 35%),
                radial-gradient(circle at top, rgba(150,190,255,0.22), transparent 45%);
            pointer-events: none;
        }

        .podium-card.first {
            transform: translateY(-18px);
            min-height: 560px;
            background: linear-gradient(180deg, rgba(255, 204, 111, 0.16), rgba(100, 134, 228, 0.10) 44%, rgba(58, 92, 162, 0.08));
            border-color: rgba(255, 207, 118, 0.30);
            box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 24px 50px rgba(0,0,0,0.34);
        }

        .podium-card.second,
        .podium-card.third {
            min-height: 470px;
        }

        .rank-chip {
            position: absolute;
            top: 18px;
            right: 20px;
            font-size: 42px;
            font-weight: 900;
            color: rgba(240,247,255,0.95);
            letter-spacing: 1px;
            text-shadow: 0 0 15px rgba(160,190,255,0.25);
        }

        .medal {
            width: 52px;
            height: 52px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 16px;
            font-size: 28px;
            margin-bottom: 18px;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.08);
            backdrop-filter: blur(10px);
        }

        .avatar {
            width: 112px;
            height: 112px;
            margin: 8px auto 18px;
            position: relative;
            opacity: 1;
            border-radius: 24px;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.10);
            box-shadow: 0 16px 34px rgba(0,0,0,0.26);
            background: rgba(255,255,255,0.06);
        }

        .avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .podium-label {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            border-radius: 999px;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.10);
            font-size: 12px;
            font-weight: 900;
            letter-spacing: 1px;
            text-transform: uppercase;
            color: var(--text-soft);
            margin-bottom: 14px;
        }

        .podium-card.first .podium-label {
            color: #ffd595;
            border-color: rgba(255, 206, 115, 0.24);
            background: rgba(255, 196, 88, 0.08);
        }

        .player-name {
            text-align: center;
            font-size: 26px;
            font-weight: 800;
            margin-bottom: 10px;
            word-break: break-word;
            position: relative;
            display: block;
            width: 100%;
            max-width: 100%;
            margin-left: auto;
            margin-right: auto;
            z-index: 2;
        }

        .player-name.donor,
        .rest-name.donor {
            padding: 0;
            border-radius: 0;
            overflow: visible;
            isolation: auto;
        }

        .player-link {
            color: inherit;
            text-decoration: none;
        }

        .player-link:hover {
            text-decoration: underline;
        }

        .rest-name {
            position: relative;
            display: inline-block;
            width: fit-content;
            max-width: 100%;
            font-weight: 800;
        }

        .rest-name .rest-link,
        .player-name .player-link {
            position: relative;
            z-index: 1;
        }

        .player-name.donor-founder,
        .rest-name.donor-founder {
            color: #8fe8ff;
            text-shadow:
                0 0 8px rgba(128, 234, 255, 0.26),
                0 0 16px rgba(62, 182, 255, 0.14);
            animation: donorTextElectric 2.2s ease-in-out infinite;
        }

        .player-name.donor-legend,
        .rest-name.donor-legend {
            color: #ffd08e;
            text-shadow:
                0 0 7px rgba(255, 176, 73, 0.20),
                0 0 14px rgba(255, 104, 42, 0.10);
            animation: donorFireText 2.8s ease-in-out infinite;
        }

        .player-name.donor-elite,
        .rest-name.donor-elite {
            color: #d6f6ff;
            text-shadow:
                0 0 6px rgba(164, 235, 255, 0.18),
                0 0 12px rgba(88, 194, 255, 0.10);
        }

        .player-name.donor-supporter,
        .rest-name.donor-supporter {
            color: #f2fbff;
            text-shadow:
                0 0 3px rgba(220, 246, 255, 0.12),
                0 0 6px rgba(134, 220, 255, 0.05);
        }

        .player-tier {
            text-align: center;
            color: var(--text-soft);
            font-size: 15px;
            margin-bottom: 18px;
            position: relative;
            z-index: 2;
        }

        .podium-tier-chip {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 10px 14px;
            border-radius: 999px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.08);
            max-width: 100%;
        }

        .podium-prize {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
            margin-bottom: 18px;
            position: relative;
            z-index: 2;
        }

        .prize-card {
            padding: 12px 10px;
            border-radius: 16px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.08);
            text-align: center;
        }

        .prize-label {
            display: block;
            font-size: 11px;
            color: var(--text-soft);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 6px;
        }

        .prize-value {
            display: block;
            font-size: 22px;
            font-weight: 900;
            color: #fff;
        }

        .player-stats {
            width: 100%;
            margin-top: 10px;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(157,193,255,0.12);
            border-radius: 18px;
            overflow: hidden;
            position: relative;
            z-index: 2;
        }

        .stat-row {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            padding: 11px 12px;
            border-top: 1px solid rgba(255,255,255,0.07);
            font-size: 14px;
        }

        .stat-row:first-child {
            border-top: none;
        }

        .stat-label {
            color: var(--text-soft);
        }

        .stat-value {
            font-weight: 800;
            color: var(--text-main);
        }

        .medal-1 { color: #ffd76a; }
        .medal-2 { color: #dfe9ff; }
        .medal-3 { color: #dfae85; }

        .rest-board {
            margin-top: 10px;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(145,190,255,0.12);
            border-radius: 22px;
            overflow-x: auto;
            position: relative;
        }

        .rest-header {
            display: grid;
            grid-template-columns: 80px 2.2fr 1.5fr 90px 120px 100px 100px;
            gap: 10px;
            padding: 14px 16px;
            background: rgba(95, 138, 255, 0.14);
            font-size: 14px;
            color: var(--text-soft);
            font-weight: 800;
            min-width: 900px;
        }

        .rest-intro {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            margin: 18px 4px 14px;
        }

        .rest-title {
            font-size: 20px;
            font-weight: 900;
        }

        .rest-subtitle {
            color: var(--text-soft);
            font-size: 14px;
            margin-top: 4px;
        }

        .rest-row {
            display: grid;
            grid-template-columns: 80px 2.2fr 1.5fr 90px 120px 100px 100px;
            gap: 10px;
            padding: 14px 16px;
            border-top: 1px solid rgba(255,255,255,0.06);
            align-items: center;
            min-width: 900px;
        }

        .rest-row:hover {
            background: rgba(118,168,255,0.06);
        }

        .rest-link {
            color: #fff;
            text-decoration: none;
            font-weight: 700;
        }

        .rest-link:hover {
            text-decoration: underline;
        }

        .rank-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 50px;
            padding: 8px 10px;
            border-radius: 10px;
            background: rgba(255,255,255,0.07);
            font-weight: 900;
        }

        .empty {
            margin-top: 20px;
            background: rgba(255,255,255,0.08);
            padding: 20px;
            border-radius: 16px;
            font-size: 18px;
            border: 1px solid rgba(145,190,255,0.14);
        }

        .muted {
            color: var(--text-soft);
        }

        @keyframes donorTextElectric {
            0%, 100% { filter: brightness(1) saturate(1); }
            28% { filter: brightness(1.14) saturate(1.2); }
            30% { filter: brightness(1.32) saturate(1.34); }
            33% { filter: brightness(1.1) saturate(1.12); }
            64% { filter: brightness(1.08) saturate(1.14); }
        }

        @keyframes donorFireText {
            0%, 100% { filter: brightness(1) saturate(1); }
            40% { filter: brightness(1.12) saturate(1.18); }
            55% { filter: brightness(1.2) saturate(1.24); }
        }

        @media (max-width: 1180px) {
            .podium-grid {
                grid-template-columns: 1fr;
            }

            .podium-card.first {
                transform: none;
            }

            .podium-card,
            .podium-card.first {
                min-height: auto;
            }
        }

        @media (max-width: 700px) {
            .wrap {
                padding: 12px;
            }

            .board-shell {
                padding: 16px;
            }

            .board-title {
                font-size: 30px;
            }

            .player-name {
                font-size: 22px;
            }

            .rank-chip {
                font-size: 32px;
            }

            .board-summary {
                display: grid;
                grid-template-columns: 1fr 1fr;
            }

            .podium-prize {
                grid-template-columns: 1fr;
            }
        }
