@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ======================== */
/*   DESIGN TOKENS          */
/* ======================== */
:root {
    /* Background & Surface */
    --bg-primary: #080b1a;
    --bg-secondary: #0d1129;
    --bg-card: rgba(15, 19, 45, 0.65);
    --bg-card-hover: rgba(22, 28, 60, 0.7);
    --bg-glass: rgba(15, 19, 50, 0.5);
    --bg-input: rgba(0, 0, 0, 0.35);

    /* Neon Palette */
    --neon-purple: #8b5cf6;
    --neon-pink: #ec4899;
    --neon-cyan: #22d3ee;
    --neon-blue: #3b82f6;
    --neon-green: #10b981;
    --neon-amber: #f59e0b;
    --neon-red: #ef4444;

    /* Semantic Colors */
    --gold: #fbbf24;
    --silver: #cbd5e1;
    --bronze: #f97316;
    --fc-color: #fbbf24;

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-dim: #475569;
    --text-white: #ffffff;

    /* Borders */
    --border-subtle: rgba(139, 92, 246, 0.1);
    --border-glow: rgba(139, 92, 246, 0.25);
    --border-active: rgba(139, 92, 246, 0.5);

    /* Gradients */
    --grad-purple-pink: linear-gradient(135deg, #8b5cf6, #ec4899);
    --grad-cyan-blue: linear-gradient(135deg, #22d3ee, #3b82f6);
    --grad-warm: linear-gradient(135deg, #f59e0b, #ef4444);
    --grad-surface: linear-gradient(145deg, rgba(15, 19, 50, 0.6), rgba(8, 11, 26, 0.9));
    --grad-gold: linear-gradient(135deg, #fbbf24, #f97316);
    --grad-silver: linear-gradient(135deg, #e2e8f0, #94a3b8);
    --grad-bronze: linear-gradient(135deg, #f97316, #dc2626);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow-purple: 0 0 30px rgba(139, 92, 246, 0.25);
    --shadow-glow-pink: 0 0 30px rgba(236, 72, 153, 0.2);
    --shadow-glow-cyan: 0 0 20px rgba(34, 211, 238, 0.2);
    --shadow-glow-gold: 0 0 20px rgba(251, 191, 36, 0.3);

    /* Radius */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 20px;
    --r-2xl: 24px;
    --r-full: 9999px;
}

/* ======================== */
/*   RESET & BASE           */
/* ======================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ======================== */
/*   ANIMATED BACKGROUND    */
/* ======================== */
.background-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(ellipse at 20% 50%, rgba(139, 92, 246, 0.08), transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(236, 72, 153, 0.06), transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(34, 211, 238, 0.05), transparent 50%),
        var(--bg-primary);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
}

.blob1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4), rgba(236, 72, 153, 0.2));
    top: -200px;
    left: -100px;
    animation: drift1 30s infinite alternate ease-in-out;
}

.blob2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.3), rgba(59, 130, 246, 0.15));
    bottom: -150px;
    right: -100px;
    animation: drift2 35s infinite alternate ease-in-out;
}

.blob3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.25), rgba(139, 92, 246, 0.1));
    top: 40%;
    left: 40%;
    animation: drift3 40s infinite alternate ease-in-out;
}

@keyframes drift1 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(15vw, 25vh) scale(1.2);
    }
}

@keyframes drift2 {
    0% {
        transform: translate(0, 0) scale(1.1);
    }

    100% {
        transform: translate(-20vw, -15vh) scale(0.9);
    }
}

@keyframes drift3 {
    0% {
        transform: translate(0, 0) scale(0.9);
    }

    100% {
        transform: translate(-10vw, 10vh) scale(1.15);
    }
}

/* ======================== */
/*   LAYOUT                 */
/* ======================== */
.page-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    padding: 12px 16px;
    overflow: hidden;
    position: relative;
}

.app-body {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: 1500px;
    height: 100%;
    position: relative;
}

/* ======================== */
/*   SIDE BUTTONS           */
/* ======================== */
.side-button-container {
    position: absolute;
    left: -55px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 100;
}

.side-button {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    padding: 10px 8px;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-weight: 600;
    text-decoration: none;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.75em;
    border-radius: var(--r-md);
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-button:hover {
    color: var(--neon-cyan);
    background: var(--bg-card-hover);
    border-color: rgba(34, 211, 238, 0.3);
    box-shadow: var(--shadow-glow-cyan);
    transform: translateY(-50%) translateX(-2px);
}

/* ======================== */
/*   PANELS                 */
/* ======================== */
.column-left,
.column-center-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--grad-surface);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 18px;
    border-radius: var(--r-2xl);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.column-left {
    flex: 0 0 320px;
    min-width: 320px;
    z-index: 10;
}

.column-center-container {
    flex: 1;
    min-width: 0;
    margin-left: 16px;
}

/* ======================== */
/*   HEADER CONTROLS        */
/* ======================== */
.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.column-title {
    font-size: 1.2em;
    font-weight: 800;
    letter-spacing: -0.3px;
    background: var(--grad-purple-pink);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ======================== */
/*   LANGUAGE SWITCHER      */
/* ======================== */
.language-switcher {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--r-full);
    padding: 3px;
    border: 1px solid var(--border-subtle);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 5px 14px;
    border-radius: var(--r-full);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.8em;
    transition: all 0.25s;
    font-family: 'Outfit', sans-serif;
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--grad-purple-pink);
    color: var(--text-white);
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.4);
}

/* ======================== */
/*   COUNTDOWN              */
/* ======================== */
.countdown-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.countdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    transition: all 0.3s;
}

.countdown-item:hover {
    border-color: var(--border-glow);
}

.countdown-label {
    font-size: 0.7em;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.countdown-timer {
    font-size: 0.9em;
    font-weight: 800;
    background: var(--grad-cyan-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* ======================== */
/*   FORM ELEMENTS          */
/* ======================== */
.form-group {
    margin-bottom: 10px;
    flex-shrink: 0;
}

.form-label,
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    color: var(--text-dim);
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

select,
input[type="search"] {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--r-md);
    border: 1px solid var(--border-subtle);
    background-color: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.88em;
    font-family: 'Outfit', sans-serif;
    transition: all 0.25s;
    outline: none;
}

select:focus,
input[type="search"]:focus {
    border-color: var(--neon-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), var(--shadow-glow-purple);
}

select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 8px 12px;
}

select option:checked {
    background: rgba(139, 92, 246, 0.3);
    color: var(--text-white);
}

#song-search-input {
    margin-bottom: 10px;
}

/* ======================== */
/*   SONG LIST              */
/* ======================== */
.song-list {
    overflow-y: auto;
    flex-grow: 1;
    min-height: 0;
}

.song-list::-webkit-scrollbar,
.leaderboard-content::-webkit-scrollbar {
    width: 4px;
}

.song-list::-webkit-scrollbar-track,
.leaderboard-content::-webkit-scrollbar-track {
    background: transparent;
}

.song-list::-webkit-scrollbar-thumb,
.leaderboard-content::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.2);
    border-radius: 10px;
}

.song-list::-webkit-scrollbar-thumb:hover,
.leaderboard-content::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.4);
}

.song-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--r-md);
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.song-item:hover {
    background: rgba(139, 92, 246, 0.06);
    border-color: var(--border-subtle);
    transform: translateX(4px);
}

.song-item.active {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.08));
    border-color: var(--neon-purple);
    box-shadow: inset 3px 0 0 var(--neon-purple);
}

.song-cover {
    width: 42px;
    height: 42px;
    border-radius: var(--r-sm);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.song-details {
    flex-grow: 1;
    min-width: 0;
}

.song-list-title,
.song-list-artist {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.song-list-title {
    font-weight: 600;
    font-size: 0.88em;
}

.song-list-artist {
    font-size: 0.72em;
    color: var(--text-secondary);
}

/* ======================== */
/*   RESULTS AREA           */
/* ======================== */
.results-area {
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ======================== */
/*   LEADERBOARD HEADER     */
/* ======================== */
.leaderboard-header {
    display: flex;
    gap: 20px;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.leaderboard-album-art {
    width: 90px;
    height: 90px;
    border-radius: var(--r-lg);
    flex-shrink: 0;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-subtle);
}

.header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.leaderboard-title {
    font-size: 1.8em;
    color: var(--text-white);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.leaderboard-artist {
    color: var(--text-secondary);
    font-size: 1.05em;
    font-weight: 500;
}

/* ======================== */
/*   INSTRUMENT SELECTOR    */
/* ======================== */
.instrument-selector {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.instrument-icon {
    width: 48px;
    height: 48px;
    border: 2px solid var(--border-subtle);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-input);
    padding: 7px;
    position: relative;
}

.instrument-icon img {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.instrument-icon:hover {
    border-color: var(--neon-cyan);
    transform: scale(1.08);
    box-shadow: var(--shadow-glow-cyan);
}

.instrument-icon.active {
    border-color: var(--neon-purple);
    background: rgba(139, 92, 246, 0.15);
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), var(--shadow-glow-purple);
}

/* ======================== */
/*   STATS CARDS            */
/* ======================== */
.stats-bar {
    display: flex;
    gap: 10px;
    margin: 14px 0;
    flex-shrink: 0;
    animation: fadeSlideUp 0.4s ease;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    padding: 14px 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

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

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    flex-shrink: 0;
}

.stat-icon.purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.05));
    box-shadow: inset 0 0 15px rgba(139, 92, 246, 0.15);
}

.stat-icon.teal {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(34, 211, 238, 0.05));
    box-shadow: inset 0 0 15px rgba(34, 211, 238, 0.15);
}

.stat-icon.gold {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.05));
    box-shadow: inset 0 0 15px rgba(251, 191, 36, 0.15);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.3em;
    font-weight: 900;
    color: var(--text-white);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.65em;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* ======================== */
/*   USER SEARCH            */
/* ======================== */
.user-search-wrapper {
    margin: 12px 0;
    flex-shrink: 0;
}

/* ======================== */
/*   LEADERBOARD TABLE      */
/* ======================== */
.leaderboard-content {
    flex-grow: 1;
    overflow-y: auto;
    position: relative;
}

.leaderboard-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 3px;
}

.leaderboard-content thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.leaderboard-content th {
    background: rgba(8, 11, 26, 0.97);
    padding: 10px 14px;
    font-size: 0.65em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-align: left;
    letter-spacing: 1.2px;
    font-weight: 800;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}

td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.04);
    white-space: nowrap;
    text-align: left;
    vertical-align: middle;
    font-size: 0.88em;
}

tbody tr {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: var(--r-sm);
}

tbody tr:hover {
    background: rgba(139, 92, 246, 0.06);
}

.score-col {
    text-align: left;
}

/* ======================== */
/*   RANK CELL & MEDALS     */
/* ======================== */
.rank-cell {
    font-weight: 800;
    font-size: 1em;
    min-width: 44px;
    text-align: center;
}

.rank-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.85em;
    font-weight: 900;
    box-shadow: var(--shadow-sm);
}

.rank-1 {
    background: var(--grad-gold);
    color: #422006;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: medal-glow 2.5s infinite alternate ease-in-out;
}

@keyframes medal-glow {
    0% {
        box-shadow: 0 0 12px rgba(251, 191, 36, 0.3), 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    100% {
        box-shadow: 0 0 28px rgba(251, 191, 36, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
    }
}

.rank-2 {
    background: var(--grad-silver);
    color: #1e293b;
    box-shadow: 0 0 14px rgba(226, 232, 240, 0.3), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.rank-3 {
    background: var(--grad-bronze);
    color: #431407;
    box-shadow: 0 0 14px rgba(249, 115, 22, 0.3), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ======================== */
/*   USER CELL              */
/* ======================== */
.user-cell {
    font-weight: 600;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-gold {
    color: var(--gold);
    font-weight: 800;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

.rank-silver {
    color: var(--silver);
    font-weight: 700;
}

.rank-bronze {
    color: var(--bronze);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(249, 115, 22, 0.2);
}

/* ======================== */
/*   TOP 3 ROW HIGHLIGHT    */
/* ======================== */
.row-top1 {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.02), transparent) !important;
    border-left: 3px solid var(--gold);
}

.row-top2 {
    background: linear-gradient(90deg, rgba(203, 213, 225, 0.06), transparent) !important;
    border-left: 3px solid var(--silver);
}

.row-top3 {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.08), transparent) !important;
    border-left: 3px solid var(--bronze);
}

.row-top1:hover {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.14), rgba(251, 191, 36, 0.03), transparent) !important;
}

.row-top2:hover {
    background: linear-gradient(90deg, rgba(203, 213, 225, 0.1), transparent) !important;
}

.row-top3:hover {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.12), transparent) !important;
}

/* ======================== */
/*   FC BADGE               */
/* ======================== */
.fc-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(236, 72, 153, 0.1));
    color: var(--fc-color);
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 2px 9px;
    border-radius: var(--r-full);
    font-size: 0.68em;
    font-weight: 800;
    letter-spacing: 0.8px;
    animation: fc-glow 2s infinite alternate;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

@keyframes fc-glow {
    0% {
        box-shadow: 0 0 4px rgba(251, 191, 36, 0.15);
    }

    100% {
        box-shadow: 0 0 16px rgba(251, 191, 36, 0.4), 0 0 4px rgba(236, 72, 153, 0.2);
    }
}

/* ======================== */
/*   ATTEMPTS BADGE         */
/* ======================== */
.attempts-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(139, 92, 246, 0.08);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    padding: 3px 10px;
    border-radius: var(--r-full);
    font-size: 0.78em;
    font-weight: 700;
}

.attempts-badge .attempt-icon {
    font-size: 0.85em;
}

/* ======================== */
/*   SCORE DISPLAY          */
/* ======================== */
.score-value {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.score-high {
    background: var(--grad-warm);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.3));
}

.score-mid {
    color: var(--neon-cyan);
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.25);
}

.score-low {
    color: var(--text-primary);
}

/* ======================== */
/*   ACCURACY               */
/* ======================== */
.accuracy-text {
    font-weight: 600;
}

.accuracy-perfect {
    color: var(--fc-color);
    font-weight: 800;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

.accuracy-great {
    color: var(--neon-cyan);
    text-shadow: 0 0 6px rgba(34, 211, 238, 0.25);
}

.accuracy-good {
    color: var(--text-primary);
}

.accuracy-fc {
    background: var(--grad-gold);
    color: #422006;
    padding: 3px 10px;
    border-radius: var(--r-sm);
    font-weight: 900;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
    font-size: 0.85em;
}

/* ======================== */
/*   STARS                  */
/* ======================== */
.stars-container {
    display: flex;
    align-items: center;
    gap: 3px;
}

.star-icon {
    height: 15px;
    display: block;
}

.difficulty-icon {
    height: 20px;
    vertical-align: middle;
}

.difficulty-cell {
    width: 1%;
    white-space: nowrap;
}

/* ======================== */
/*   EXPAND ROW DETAIL      */
/* ======================== */
.expand-arrow {
    display: inline-block;
    font-size: 0.65em;
    color: var(--text-dim);
    transition: all 0.2s;
    margin-left: 6px;
}

tr.expanded .expand-arrow {
    transform: rotate(90deg);
    color: var(--neon-purple);
}

tr.expanded {
    background: rgba(139, 92, 246, 0.08) !important;
    box-shadow: inset 0 1px 0 var(--border-glow), inset 0 -1px 0 var(--border-glow);
}

.detail-row {
    display: none;
}

.detail-row.visible {
    display: table-row;
}

.detail-row td {
    padding: 0;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.04), rgba(8, 11, 26, 0.6));
}

.detail-panel {
    padding: 18px 22px;
    animation: panelReveal 0.15s ease-out;
}

@keyframes panelReveal {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.detail-stat {
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    padding: 12px 16px;
    border-radius: var(--r-md);
    text-align: center;
    transition: all 0.25s;
}

.detail-stat:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.detail-stat-value {
    font-size: 1.4em;
    font-weight: 900;
    color: var(--text-white);
    line-height: 1.2;
}

.detail-stat-label {
    font-size: 0.6em;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-top: 3px;
    font-weight: 700;
}

.detail-stat-value.accent {
    background: var(--grad-cyan-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-stat-value.gold {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ======================== */
/*   DETAIL TABS            */
/* ======================== */
.detail-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--r-full);
    padding: 3px;
    border: 1px solid var(--border-subtle);
}

.detail-tab {
    flex: 1;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-weight: 700;
    font-size: 0.78em;
    cursor: pointer;
    border-radius: var(--r-full);
    transition: all 0.25s;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.3px;
}

.detail-tab:hover {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.08);
}

.detail-tab.active {
    background: var(--grad-purple-pink);
    color: var(--text-white);
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}

.detail-tab-content {
    display: none;
}

.detail-tab-content.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ======================== */
/*   SESSION HISTORY        */
/* ======================== */
.session-history {
    margin-top: 6px;
}

.session-title {
    font-size: 0.75em;
    font-weight: 800;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.session-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-subtle), transparent);
}

.session-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82em;
}

.session-table th {
    padding: 8px 10px;
    font-size: 0.75em;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border-subtle);
    font-weight: 800;
    background: transparent;
    position: static;
}

.session-table td {
    padding: 7px 10px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.04);
    color: var(--text-primary);
    cursor: default;
}

.session-table tbody tr:hover {
    background: rgba(139, 92, 246, 0.04);
}

.session-best {
    color: var(--neon-cyan);
    font-weight: 800;
    text-shadow: 0 0 6px rgba(34, 211, 238, 0.3);
}

.session-fc-yes {
    color: var(--fc-color);
    font-weight: 700;
}

.session-fc-no {
    color: var(--text-dim);
}

/* ======================== */
/*   PLACEHOLDER            */
/* ======================== */
.placeholder-view {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
}

.placeholder-view h2 {
    font-size: 1.6em;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--grad-purple-pink);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.placeholder-view p {
    color: var(--text-secondary);
}

/* ======================== */
/*   LOADING                */
/* ======================== */
#loading-indicator {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bg-input);
    overflow: hidden;
    z-index: 20;
    border-radius: 4px;
}

.progress-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--neon-purple), var(--neon-pink), var(--neon-cyan), transparent);
    animation: progress-scan 1.2s infinite linear;
}

@keyframes progress-scan {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

#leaderboard-body {
    transition: opacity 0.3s ease;
}

/* ======================== */
/*   LOAD MORE BUTTON       */
/* ======================== */
.load-more-container {
    text-align: center;
    margin: 16px 0;
    padding-bottom: 16px;
    flex-shrink: 0;
}

.load-more-btn {
    background: var(--grad-purple-pink);
    color: var(--text-white);
    border: none;
    padding: 11px 32px;
    font-size: 0.85em;
    font-weight: 700;
    border-radius: var(--r-full);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.3px;
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4), 0 0 15px rgba(236, 72, 153, 0.2);
}

.load-more-btn:disabled {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ======================== */
/*   FOOTER                 */
/* ======================== */
.footer-wrapper {
    position: relative;
    padding: 1.5px;
    border-radius: var(--r-xl);
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-pink), var(--neon-cyan), var(--neon-blue));
    background-size: 300% 100%;
    animation: gradient-shift 6s infinite linear;
    margin: 10px 16px;
    flex-shrink: 0;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.footer-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-pink), var(--neon-cyan));
    filter: blur(20px);
    opacity: 0.35;
    z-index: -1;
    border-radius: var(--r-xl);
}

.page-footer {
    background: var(--bg-secondary);
    border-radius: calc(var(--r-xl) - 1.5px);
    text-align: center;
    padding: 10px;
    color: var(--text-secondary);
    font-size: 0.72em;
}

/* ======================== */
/*   NO DATA                */
/* ======================== */
.no-data {
    text-align: center;
    padding: 40px 16px !important;
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* ======================== */
/*   ROW ANIMATIONS         */
/* ======================== */
.animate-row {
    animation: rowFadeIn 0.3s ease backwards;
}

@keyframes rowFadeIn {
    from {
        opacity: 0;
        transform: translateX(-6px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ======================== */
/*   FLAWLESS EFFECT        */
/* ======================== */
.flawless-effect {
    position: relative;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flawless-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 10px 3px transparent;
    animation: none;
}

.flawless-effect.animate-flawless::before {
    animation: fire-glow 1.5s infinite alternate;
}

@keyframes fire-glow {
    from {
        box-shadow: 0 0 6px 2px rgba(251, 191, 36, 0.3);
    }

    to {
        box-shadow: 0 0 14px 4px rgba(249, 115, 22, 0.5);
    }
}

/* ======================== */
/*   RESPONSIVE TOUCHES     */
/* ======================== */
@media (max-width: 1100px) {
    .column-left {
        flex: 0 0 280px;
        min-width: 280px;
    }

    .side-button-container {
        display: none;
    }
}

@media (max-width: 768px) {
    .app-body {
        flex-direction: column;
    }

    .column-left {
        flex: none;
        min-width: auto;
        height: 300px;
    }

    .column-center-container {
        margin-left: 0;
        padding-left: 18px;
    }

    .stats-bar {
        flex-direction: column;
    }

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