/* ===================================
   CSS VARIABLES (kun én gang)
   =================================== */

:root {
    --primary-blue: #00A7E1;
    --primary-dark: #041C2C;
    --accent-yellow: #FFC107;
    --accent-green: #00E676;
    --accent-red: #FF5252;
    --text-white: #ffffff;
    --text-gray: rgba(255, 255, 255, 0.8);
    --text-light-gray: rgba(255, 255, 255, 0.6);
    --background-dark: #0f1419;
    --background-secondary: rgba(4, 28, 44, 0.6);
    --border-blue: rgba(0, 167, 225, 0.3);
    --shadow-blue: rgba(0, 167, 225, 0.2);
}

/* ===================================
   BASE STYLES (kun én gang)
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   HEADER STYLING (kun én gang)
   =================================== */

header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, rgba(0, 167, 225, 0.1) 100%);
    border-bottom: 2px solid rgba(0, 167, 225, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    flex-shrink: 0;
}

.logo a {
    display: block;
    text-decoration: none;
}

.header-logo {
    height: 70px;
    width: auto;
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

nav li {
    margin: 0;
}

nav a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

nav a:hover {
    color: #ffffff;
    background-color: rgba(0, 167, 225, 0.2);
    transform: translateY(-2px);
}

.login-btn {
    background: linear-gradient(135deg, var(--primary-blue), #0090c1);
    color: white;
    border: none;
    padding: 0.7rem 1.3rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 167, 225, 0.3);
}

/* ===================================
   LEADERBOARD HERO SECTION
   =================================== */

.leaderboard-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, rgba(0, 167, 225, 0.15) 50%, var(--primary-dark) 100%);
    padding: 3rem 0 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.leaderboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 193, 7, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 230, 118, 0.08) 0%, transparent 50%);
    pointer-events: none;
    animation: backgroundShift 8s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, var(--primary-blue), #0090c1);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 167, 225, 0.4);
    font-size: 1rem;
    border: 2px solid transparent;
}

.back-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 167, 225, 0.6);
    text-decoration: none;
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.trophy-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    animation: trophy-bounce 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(255, 193, 7, 0.5));
}

@keyframes trophy-bounce {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        text-shadow: 0 0 30px rgba(255, 193, 7, 0.6);
    }
    25% {
        transform: scale(1.05) rotate(3deg);
        text-shadow: 0 0 40px rgba(255, 193, 7, 0.8);
    }
    50% { 
        transform: scale(1.1) rotate(0deg);
        text-shadow: 0 0 50px rgba(255, 193, 7, 1);
    }
    75% {
        transform: scale(1.05) rotate(-3deg);
        text-shadow: 0 0 40px rgba(255, 193, 7, 0.8);
    }
}

.leaderboard-hero h1 {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-weight: bold;
    text-shadow: 0 0 30px rgba(0, 167, 225, 0.5);
    background: linear-gradient(135deg, var(--primary-blue), #42A5F5, var(--accent-yellow));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientText 3s ease-in-out infinite;
}

@keyframes gradientText {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-gray);
    margin-bottom: 2.5rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-weight: 500;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2.5rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.stat-box {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--border-blue);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    min-width: 160px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 167, 225, 0.3);
    border-color: var(--primary-blue);
}

.stat-box:hover::before {
    left: 100%;
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--accent-yellow);
    margin-bottom: 0.8rem;
    text-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
}

.stat-label {
    color: var(--text-gray);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* ===================================
   MAIN LEADERBOARD CONTAINER
   =================================== */

.leaderboard-main {
    display: flex;
    flex-direction: column;
}

.leaderboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ===================================
   PODIUM SECTION
   =================================== */

.podium-section {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-blue);
    border-radius: 25px;
    padding: 2rem;
    margin-top: 4rem;
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 167, 225, 0.2);
}

.podium-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 20%, rgba(255, 193, 7, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.podium-title {
    text-align: center;
    color: var(--accent-yellow);
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2rem;
    text-shadow: 0 0 25px rgba(255, 193, 7, 0.5);
    position: relative;
    z-index: 2;
}

.podium-display {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
    position: relative;
    z-index: 2;
}

/* Podium desktop layout */
@media (min-width: 769px) {
    .podium-display {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-areas: "second first third";
        gap: 2rem;
        max-width: 900px;
        margin: 0 auto;
        padding: 3rem 2rem;
        align-items: end;
        justify-items: center;
    }

    .podium-place.first {
        grid-area: first;
        order: 0;
    }

    .podium-place.second {
        grid-area: second;
        order: 0;
    }

    .podium-place.third {
        grid-area: third;
        order: 0;
        height: 140px;
        margin-top: 0;
    }
}

.podium-place {
    background: linear-gradient(135deg, rgba(0, 167, 225, 0.15), rgba(255, 255, 255, 0.08));
    border: 3px solid rgba(0, 167, 225, 0.4);
    border-radius: 20px 20px 0 0;
    padding: 1.5rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.4s ease;
    min-width: 200px;
    flex: 1;
    max-width: 250px;
    position: relative;
    text-align: center;
    overflow: hidden;
    gap: 0.8rem;
}

.podium-place::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.podium-place:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px var(--shadow-blue);
}

.podium-place:hover::before {
    left: 100%;
}

.podium-place.first {
    height: 280px;
    order: 2;
    border-color: var(--accent-yellow);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.25), rgba(255, 255, 255, 0.12));
    box-shadow: 0 0 30px rgba(255, 193, 7, 0.5);
    border-width: 4px;
}

.podium-place.second {
    height: 240px;
    order: 1;
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.25), rgba(255, 255, 255, 0.08));
    border-color: #C0C0C0;
    border-width: 3px;
}

.podium-place.third {
    height: 200px;
    order: 3;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.25), rgba(255, 255, 255, 0.08));
    border-color: #CD7F32;
    border-width: 3px;
}

.podium-rank {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 0 15px rgba(0, 167, 225, 0.5);
    flex-shrink: 0;
}

.podium-place.first .podium-rank {
    color: var(--accent-yellow);
    font-size: 2.2rem;
    text-shadow: 0 0 25px rgba(255, 193, 7, 0.7);
}

.podium-place.second .podium-rank {
    color: #C0C0C0;
    text-shadow: 0 0 15px rgba(192, 192, 192, 0.7);
}

.podium-place.third .podium-rank {
    color: #CD7F32;
    text-shadow: 0 0 15px rgba(205, 127, 50, 0.7);
}

.podium-name {
    font-size: 1.2rem;
    color: var(--text-white);
    font-weight: 600;
    margin: 0;
    flex-shrink: 0;
    text-align: center;
    line-height: 1.2;
}

.podium-score {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--accent-green);
    text-shadow: 0 0 15px rgba(0, 230, 118, 0.5);
    margin: 0;
    flex-shrink: 0;
    display: inline-block;
    margin-right: 0.4rem;
}

.podium-date {
    font-size: 0.85rem;
    color: var(--text-light-gray);
    font-style: italic;
    margin: 0;
    flex-shrink: 0;
    display: inline-block;
    margin-left: 0.4rem;
}

/* ===================================
   FULLSTENDIG LEADERBOARD SECTION
   =================================== */

.section-header {
    text-align: center;
    margin-bottom: 0.5rem;
    padding: 0 1rem;
}

.section-header h2 {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
    font-weight: bold;
    text-shadow: 0 0 20px rgba(0, 167, 225, 0.4);
}

.section-header p {
    color: var(--text-gray);
    font-size: 0.9rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.4;
    font-weight: 500;
}

/* ===================================
   LEADERBOARD TABLE - FIKSET VERSJON
   =================================== */

.full-leaderboard {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-blue);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 167, 225, 0.2);
    width: 100%;
    padding: 0; /* VIKTIG: Ingen padding */
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0;
    border-spacing: 0;
}

/* BLÅ HEADER SOM GÅR HELT TIL KANTENE */
.leaderboard-table thead {
    background: linear-gradient(135deg, var(--primary-blue), #0090c1);
    position: relative;
    width: 100%;
    display: table-header-group;
}

.leaderboard-table thead::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: headerShine 3s ease-in-out infinite;
}

@keyframes headerShine {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* HEADER CELLER - PERFEKT ALIGNMENT */
.leaderboard-table th {
    padding: 1.5rem;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
    border: none;
    white-space: nowrap;
}

/* PERFEKT KOLONNE ALIGNMENT */
.leaderboard-table th:nth-child(1) { text-align: center; width: 100px; }  /* Rang */
.leaderboard-table th:nth-child(2) { text-align: left; width: auto; }      /* Navn */
.leaderboard-table th:nth-child(3) { text-align: center; width: 120px; }   /* Score */
.leaderboard-table th:nth-child(4) { text-align: center; width: 150px; }   /* Dato */

/* DATA CELLER - MATCHER HEADER ALIGNMENT PERFEKT */
.leaderboard-table td {
    padding: 1.5rem;
    color: var(--text-gray);
    font-size: 1.1rem;
    font-weight: 500;
    border: none;
    border-bottom: 1px solid rgba(0, 167, 225, 0.15);
}

/* PERFEKT CELLE ALIGNMENT */
.rank-cell { text-align: center !important; font-weight: bold; font-size: 1.3rem; }
.name-cell { text-align: left !important; font-weight: 700; color: var(--text-white); font-size: 1.2rem; }
.score-cell { text-align: center !important; font-weight: bold; font-size: 1.3rem; color: var(--accent-green); text-shadow: 0 0 10px rgba(0, 230, 118, 0.4); }
.date-cell { text-align: center !important; font-size: 1rem; color: var(--text-light-gray); font-style: italic; }

/* RANG FARGER */
.rank-cell.gold { color: var(--accent-yellow); text-shadow: 0 0 12px rgba(255, 193, 7, 0.6); }
.rank-cell.silver { color: #C0C0C0; text-shadow: 0 0 12px rgba(192, 192, 192, 0.6); }
.rank-cell.bronze { color: #CD7F32; text-shadow: 0 0 12px rgba(205, 127, 50, 0.6); }

/* RAD STYLING */
.leaderboard-table tbody tr {
    transition: all 0.3s ease;
    position: relative;
}

.leaderboard-table tbody tr::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 167, 225, 0.1), transparent);
    transition: left 0.5s ease;
}

.leaderboard-table tbody tr:hover {
    background: rgba(0, 167, 225, 0.12);
}

.leaderboard-table tbody tr:hover::before {
    left: 100%;
}

/* TOPP 3 STYLING */
.leaderboard-table tbody tr.top-three {
    background: rgba(255, 193, 7, 0.08);
    border-left: 6px solid var(--accent-yellow);
    box-shadow: inset 0 0 10px rgba(255, 193, 7, 0.2);
}

/* LOADING OG EMPTY STATES */
.loading-state,
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-gray);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 167, 225, 0.2);
    border-left: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

/* ===================================
   PRIZE INFO SECTION
   =================================== */

.prize-info {
    background: linear-gradient(135deg, var(--primary-dark), rgba(255, 193, 7, 0.12));
    padding: 4rem 0;
    border-top: 3px solid var(--border-blue);
    position: relative;
    overflow: hidden;
}

.prize-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 193, 7, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 167, 225, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.prize-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.prize-header {
    text-align: center;
    margin-bottom: 3rem;
}

.prize-header h2 {
    color: var(--accent-yellow);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
    text-shadow: 0 0 25px rgba(255, 193, 7, 0.5);
    background: linear-gradient(135deg, var(--accent-yellow), #FF8F00);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.prize-header p {
    color: var(--text-gray);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 500;
}

.prize-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.prize-card {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--border-blue);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 167, 225, 0.15);
}

.prize-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.prize-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 167, 225, 0.3);
    border-color: var(--primary-blue);
}

.prize-card:hover::before {
    left: 100%;
}

.prize-card.featured {
    border-color: var(--accent-yellow);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 255, 255, 0.08));
    box-shadow: 0 0 30px rgba(255, 193, 7, 0.3);
    transform: scale(1.05);
}

.prize-card.featured:hover {
    transform: translateY(-10px) scale(1.08);
    box-shadow: 0 25px 60px rgba(255, 193, 7, 0.4);
    border-color: rgba(255, 193, 7, 0.8);
}

.prize-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.prize-card h3 {
    color: var(--primary-blue);
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
    line-height: 1.3;
}

.prize-card.featured h3 {
    color: var(--accent-yellow);
    text-shadow: 0 0 15px rgba(255, 193, 7, 0.4);
}

.prize-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.prize-list li {
    color: var(--text-gray);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    font-size: 1.1rem;
    line-height: 1.5;
    padding: 0.5rem 0;
    text-align: left;
}

.prize-list li::before {
    content: "✓";
    color: var(--accent-green);
    font-weight: bold;
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 230, 118, 0.2);
    border-radius: 50%;
    border: 2px solid var(--accent-green);
}

.prize-info .disclaimer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.prize-info .disclaimer p {
    color: var(--text-light-gray);
    font-style: italic;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* ===================================
   FOOTER
   =================================== */

footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--background-dark) 100%);
    border-top: 2px solid var(--border-blue);
    padding: 2rem 0 1.5rem;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    order: 1;
}

.footer-content p {
    color: var(--text-gray);
    font-size: 1rem;
    margin: 0;
    order: 2;
}

.footer-links a {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

/* ===================================
   SCROLL-BASED ANIMATIONS (TILBAKE!)
   =================================== */

/* Skjul leaderboard-tabell og seksjoner til man scroller */
.section-header,
.full-leaderboard,
.prize-info {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Moderne scroll-animasjoner */
@supports (animation-timeline: view()) {
    @keyframes slideFadeIn {
        from { opacity: 0; transform: translateY(40px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .section-header,
    .full-leaderboard,
    .prize-info {
        animation: slideFadeIn 0.8s ease-out both;
        animation-timeline: view();           /* trigges av scroll */
        animation-range: cover 0% 40%;        /* start når seksjonen begynner å komme inn */
    }
}

/* Fallback for eldre nettlesere - JS kan sette body.scrolled */
body.scrolled .section-header,
body.scrolled .full-leaderboard,
body.scrolled .prize-info {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   ANDRE ANIMATIONS
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.podium-place {
    animation: fadeInUp 0.6s ease-out;
}

.podium-place.first { animation-delay: 0.2s; }
.podium-place.second { animation-delay: 0.1s; }
.podium-place.third { animation-delay: 0.3s; }

.prize-card {
    animation: fadeInUp 0.8s ease-out;
}

.prize-card:nth-child(1) { animation-delay: 0.1s; }
.prize-card:nth-child(2) { animation-delay: 0.2s; }
.prize-card:nth-child(3) { animation-delay: 0.3s; }

/* Glow effects */
.podium-place.first {
    animation: firstPlaceGlow 3s ease-in-out infinite;
}

@keyframes firstPlaceGlow {
    0%, 100% { box-shadow: 0 0 30px rgba(255, 193, 7, 0.5); }
    50% { box-shadow: 0 0 50px rgba(255, 193, 7, 0.8); }
}

/* Focus states */
.back-button:focus,
.leaderboard-table tbody tr:focus {
    outline: 3px solid var(--accent-yellow);
    outline-offset: 2px;
}

/* Text selection */
::selection {
    background: rgba(0, 167, 225, 0.3);
    color: var(--text-white);
}

::-moz-selection {
    background: rgba(0, 167, 225, 0.3);
    color: var(--text-white);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1200px) {
    .leaderboard-container {
        max-width: 100%;
        padding: 0 1.5rem;
    }
    
    .hero-content {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .leaderboard-hero {
        padding: 2rem 0 1.5rem;
    }

    .leaderboard-hero h1 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .stat-box {
        padding: 1.5rem 1rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .podium-section {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
    }

    .podium-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .podium-display {
        gap: 1.5rem;
        padding: 1.5rem 0;
    }

    .podium-place {
        min-width: 140px;
        max-width: 180px;
        padding: 1.5rem 1rem 2rem;
    }

    .podium-place.first { height: 220px; }
    .podium-place.second { height: 180px; }
    .podium-place.third { height: 140px; }

    .podium-rank {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }

    .podium-place.first .podium-rank {
        font-size: 2rem;
    }

    .podium-name {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .podium-score {
        font-size: 1.5rem;
        margin-bottom: 0.6rem;
    }

    .podium-date {
        font-size: 0.8rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .section-header p {
        font-size: 1.1rem;
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 1rem 0.8rem;
        font-size: 1rem;
    }

    .rank-cell { font-size: 1.1rem; }
    .name-cell { font-size: 1.1rem; }
    .score-cell { font-size: 1.1rem; }

    .prize-info {
        padding: 3rem 0;
    }

    .prize-container {
        padding: 0 1.5rem;
    }

    .prize-header h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .prize-header p {
        font-size: 1.1rem;
    }

    .prize-cards {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 2rem;
    }

    .prize-card {
        padding: 2rem 1.5rem;
    }

    .prize-card.featured {
        transform: scale(1);
    }

    .prize-card.featured:hover {
        transform: translateY(-5px) scale(1.02);
    }

    .prize-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .prize-card h3 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .prize-list li {
        font-size: 1rem;
        margin: 0.8rem 0;
    }
    
    .footer-links {
        gap: 1.5rem;
    }
    
    header .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    nav {
        order: 1;
        width: 100%;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        width: 100%;
    }
    
    .login-btn {
        order: 2;
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .leaderboard-hero h1 {
        font-size: 1.8rem;
    }

    .trophy-icon {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .stats-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-box {
        padding: 1.25rem;
    }

    .back-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .podium-section {
        padding: 1.5rem 1rem;
    }

    .podium-title {
        font-size: 1.4rem;
    }

    .podium-display {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }

    .podium-place {
        min-width: 200px;
        max-width: 280px;
        width: 100%;
        height: auto !important;
        padding: 1.5rem;
        margin: 0.5rem 0;
    }

    .podium-place.first,
    .podium-place.second,
    .podium-place.third {
        order: 0;
        height: auto !important;
    }

    .podium-rank {
        font-size: 1.4rem;
    }

    .podium-place.first .podium-rank {
        font-size: 1.8rem;
    }

    .podium-name {
        font-size: 1rem;
    }

    .podium-score {
        font-size: 1.3rem;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
    }

    /* Skjul dato-kolonne på små skjermer */
    .leaderboard-table th:nth-child(4),
    .leaderboard-table td:nth-child(4) {
        display: none;
    }

    .rank-cell { font-size: 1rem; }
    .name-cell { font-size: 1rem; }
    .score-cell { font-size: 1rem; }

    .prize-info {
        padding: 2rem 0;
    }

    .prize-container {
        padding: 0 1.25rem;
    }

    .prize-header h2 {
        font-size: 1.8rem;
    }

    .prize-header p {
        font-size: 1rem;
    }

    .prize-cards {
        gap: 1.5rem;
    }

    .prize-card {
        padding: 1.5rem 1.25rem;
    }

    .prize-icon {
        font-size: 2.5rem;
    }

    .prize-card h3 {
        font-size: 1.2rem;
    }

    .prize-list li {
        font-size: 0.95rem;
        margin: 0.6rem 0;
    }

    .prize-list li::before {
        font-size: 1.1rem;
        width: 1.2rem;
        height: 1.2rem;
    }

    .prize-info .disclaimer {
        padding: 1.5rem;
        margin-top: 2rem;
    }

    .prize-info .disclaimer p {
        font-size: 0.9rem;
    }
    
    footer {
        padding: 1.5rem 0 1rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-content p {
        font-size: 0.9rem;
    }
    
    .footer-links a {
        font-size: 0.9rem;
    }
    
    .header-logo {
        height: 55px;
    }
}

/* ===================================
   LEADERBOARD TABLE - KOMPLETT ERSTATNING
   Erstatt kun table-relatert CSS med dette
   =================================== */

/* CONTAINER - FJERN PADDING */
.full-leaderboard {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-blue);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 167, 225, 0.2);
    width: 100%;
    padding: 0; /* KRITISK: Ingen padding */
}

/* TABELL LAYOUT */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0;
    border-spacing: 0;
}

/* HEADER - BLÅ BAKGRUNN FULL BREDDE */
.leaderboard-table thead {
    background: linear-gradient(135deg, var(--primary-blue), #0090c1);
    position: relative;
    width: 100%;
    display: table-header-group;
}

.leaderboard-table thead::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: headerShine 3s ease-in-out infinite;
}

@keyframes headerShine {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* HEADER CELLER */
.leaderboard-table th {
    padding: 1.5rem;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
    border: none;
    white-space: nowrap;
}

/* EKSAKTE HEADER BREDDER */
.leaderboard-table th:nth-child(1) { text-align: center; width: 50px; }
.leaderboard-table th:nth-child(2) { text-align: center; width: auto; }
.leaderboard-table th:nth-child(3) { text-align: center; width: auto; }
.leaderboard-table th:nth-child(4) { text-align: center; width: 100px; }

/* ALLE TD CELLER */
.leaderboard-table td {
    padding: 1.5rem;
    color: var(--text-gray);
    font-size: 1.1rem;
    font-weight: 500;
    border: none;
    border-bottom: 1px solid rgba(0, 167, 225, 0.15);
}

/* TD BREDDER SOM MATCHER TH EKSAKT */
.leaderboard-table td:nth-child(1) { width: 50px; text-align: center; }
.leaderboard-table td:nth-child(2) { width: auto; text-align: center; }
.leaderboard-table td:nth-child(3) { width: 120px; text-align: center; }
.leaderboard-table td:nth-child(4) { width: 100px; text-align: center; }

/* DINE EKSISTERENDE KLASSER - PERFEKT STYLING */
.rank-cell {
    text-align: center !important;
    font-weight: bold !important;
    font-size: 1.3rem !important;
}

.name-cell {
    text-align: left !important;
    font-weight: 700 !important;
    color: var(--text-white) !important;
    font-size: 1.2rem !important;
}

.score-cell {
    text-align: center !important;
    font-weight: bold !important;
    font-size: 1.3rem !important;
    color: var(--accent-green) !important;
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.4) !important;
}

.date-cell {
    text-align: center !important;
    font-size: 1rem !important;
    color: var(--text-light-gray) !important;
    font-style: italic !important;
}

/* RANG FARGER */
.rank-cell.gold {
    color: var(--accent-yellow) !important;
    text-shadow: 0 0 12px rgba(255, 193, 7, 0.6) !important;
}

.rank-cell.silver {
    color: #C0C0C0 !important;
    text-shadow: 0 0 12px rgba(192, 192, 192, 0.6) !important;
}

.rank-cell.bronze {
    color: #CD7F32 !important;
    text-shadow: 0 0 12px rgba(205, 127, 50, 0.6) !important;
}

/* RAD STYLING */
.leaderboard-table tbody tr {
    transition: all 0.3s ease;
    position: relative;
}

.leaderboard-table tbody tr::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 167, 225, 0.1), transparent);
    transition: left 0.5s ease;
}

.leaderboard-table tbody tr:hover {
    background: rgba(0, 167, 225, 0.12);
}

.leaderboard-table tbody tr:hover::before {
    left: 100%;
}

/* TOPP 3 STYLING */
.leaderboard-table tbody tr.top-three {
    background: rgba(255, 193, 7, 0.08);
    border-left: 6px solid var(--accent-yellow);
    box-shadow: inset 0 0 10px rgba(255, 193, 7, 0.2);
}

/* LOADING/EMPTY STATES */
.loading-state,
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-gray);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 167, 225, 0.2);
    border-left: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

/* RESPONSIVE - MOBIL */
@media (max-width: 768px) {
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 1rem 0.8rem;
        font-size: 1rem;
    }

    /* Skjul dato-kolonne på mobil */
    .leaderboard-table th:nth-child(5),
    .leaderboard-table td:nth-child(5) {
        display: none;
    }

    /* Juster bredder for mobil */
    .leaderboard-table th:nth-child(2),
    .leaderboard-table td:nth-child(2) {
        width: 70px;
    }

    .leaderboard-table th:nth-child(4),
    .leaderboard-table td:nth-child(4) {
        width: 100px;
    }

    .rank-cell { font-size: 1.1rem !important; }
    .name-cell { font-size: 1.1rem !important; }
    .score-cell { font-size: 1.1rem !important; }
}

@media (max-width: 480px) {
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
    }

    .rank-cell { font-size: 1rem !important; }
    .name-cell { font-size: 1rem !important; }
    .score-cell { font-size: 1rem !important; }
}

/* Badge styling er inkludert i JavaScript */

/* Hidden rows for loading and empty states */
.hidden-row {
    display: none;
}

/* Disclaimer section styling */
.disclaimer-section {
    text-align: center;
    margin-top: 2rem;
}

.disclaimer-text {
    color: var(--text-light-gray);
    font-style: italic;
}