* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


:root {
    --primary-bg: #000000;
    --secondary-bg: #0a0a00;
    --card-bg: #1a1a0a;
    --accent-orange: #FF8C00;
    --accent-yellow: #FF8C00;
    --accent-glow: #FFA500;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border-color: #FF8C00;
    --gradient-primary: linear-gradient(135deg, #FF8C00 0%, #FF6B00 50%, #FF4500 100%);
    --shadow-main: 0 20px 60px rgba(255, 140, 0, 0.3);
}

body {
    background: #000000;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 2px 2px, rgba(255, 215, 0, 0.08) 1px, transparent 0),
        radial-gradient(circle at 8px 8px, rgba(255, 215, 0, 0.04) 1px, transparent 0);
    background-size: 40px 40px, 80px 80px;
    pointer-events: none;
    z-index: 0;
    animation: moveBackground 60s linear infinite;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

@media (max-width: 768px) {
    body::before {
        animation: none;
        background-image: none;
    }
}

@keyframes moveBackground {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 40px 40px, 80px 80px;
    }
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 15px 0 0 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    z-index: 1000;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.navbar-brand {
    font-size: 2rem;
    font-weight: 900;
    color: #FF8C00;
    letter-spacing: 3px;
    text-decoration: none;
    text-shadow: 0 0 20px rgba(255, 140, 0, 0.5);
}

.navbar-brand img {
    width: 200px;
    height: auto;
}

.navbar-menu {
    display: flex;
    gap: 30px;
    padding: 5px 0 15px 0;
}

.navbar-link {
    color: #999999;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

@media (min-width: 1031px) and (max-width: 1399px) {
    .countdown-large {
        font-size: 42px;
        color: #FF8C00;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .top-three {
        gap: 30px;
    }

    .leaderboard-table-wrapper {
        padding: 35px 20px;
    }
}

.navbar-link:hover {
    color: #cccccc;
}

.navbar-link.active {
    color: var(--accent-yellow);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.main-content {
    flex: 1;
    position: relative;
    z-index: 1;
    padding-top: 100px;
    width: 100%;
}

.leaderboard-section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: -2rem;
    margin-top: 7rem;
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.leaderboard-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.leaderboard-title .highlight-red {
    color: var(--accent-yellow);
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 215, 0, 0.6);
}

.leaderboard-title .highlight-yellow {
    color: #FF8C00;
    text-shadow: 0 0 20px rgba(255, 140, 0, 0.9), 0 0 40px rgba(255, 140, 0, 0.7);
    font-weight: 900;
}

.title-icon {
    width: 50px;
    height: 50px;
    vertical-align: baseline;
    display: inline-block;
    margin-right: 8px;
    position: relative;
    top: 8px;
}

.leaderboard-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.leaderboard-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.leaderboard-countdown {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-yellow);
    margin-top: 10px;
    text-shadow: 0 0 15px rgba(255, 51, 51, 0.5);
}

.countdown-large {
    text-align: center;
    font-size: 48px;
    font-weight: 900;
    color: #FF8C00;
    margin: 40px 0;
    text-shadow: 0 0 20px rgba(255, 140, 0, 0.9), 0 0 40px rgba(255, 140, 0, 0.7);
    letter-spacing: 2px;
    background: transparent;
    padding: 20px;
    border-radius: 15px;
    border: none;
    box-shadow: none;
}

.top-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 50px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 10px;
}

@media (max-width: 1030px) {
    .top-three {
        gap: 10px;
        padding: 0 5px;
    }

    .top-card {
        padding: 20px 15px;
    }
}

.top-card {
    background: linear-gradient(135deg, rgba(26, 13, 0, 0.95) 0%, rgba(0, 0, 0, 0.9) 100%);
    border-radius: 20px;
    padding: 35px;
    border: 3px solid rgba(255, 140, 0, 0.6);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 140, 0, 0.2);
}

.top-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.top-card:hover {
    border-color: rgba(255, 140, 0, 0.9);
    box-shadow: 0 10px 40px rgba(255, 140, 0, 0.5);
}

.top-card.first {
    order: 2;
    transform: translateY(-30px);
}

.top-card.second {
    order: 1;
}

.top-card.third {
    order: 3;
    transform: translateY(20px);
}

.place-badge {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 70px;
    height: 70px;
    background: #FF8C00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.7), 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 140, 0, 0.4);
}

.user-avatar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.avatar-img {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    border: 3px solid var(--accent-orange);
    object-fit: cover;
}

.user-info h3 {
    color: var(--text-primary);
    font-size: 1.6rem;
    margin-bottom: 5px;
}

.wagered-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.wagered-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.wagered-amount {
    font-size: 2rem;
    font-weight: 900;
    color: #FF8C00;
    text-shadow: 0 0 8px rgba(255, 140, 0, 0.7);
}

.prize-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.prize-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.prize-amount {
    font-size: 2.5rem;
    font-weight: 900;
    color: #FF8C00;
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.prize-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.prize-cell .prize-icon {
    width: 20px;
    height: 20px;
    vertical-align: -3.5px;
    margin-right: 6px;
    display: inline-block;
}

.leaderboard-table-wrapper {
    background: transparent;
    border-radius: 20px;
    padding: 30px 15px;
    box-shadow: none;
    border: 3px solid rgba(255, 140, 0, 0.6);
    margin: 0 auto 50px auto;
    width: 100%;
    max-width: 100%;
    position: relative;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

@media (min-width: 1400px) {
    .leaderboard-table-wrapper {
        transform: scale(1.15);
        transform-origin: top center;
        margin-bottom: 150px;
        width: 95%;
        max-width: 95%;
    }
}


.leaderboard-table {
    width: 100%;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .leaderboard-table {
        min-width: 800px;
    }
}

.table-container {
    width: 100%;
    display: block;
}

.table-header {
    text-align: center;
    margin-bottom: 30px;
}

.table-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #FF8C00;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.7);
    letter-spacing: 1px;
}

.table-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    table-layout: fixed;
}

thead tr {
    border-bottom: 2px solid rgba(255, 140, 0, 0.5);
}

th {
    padding: 10px 5px;
    text-align: left;
    color: #FF8C00;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

th:first-child {
    text-align: center;
    width: 10%;
}

th:last-child {
    text-align: right;
    width: 25%;
}

th:nth-child(3) {
    text-align: center;
    width: 15%;
}

th:nth-child(2) {
    width: 50%;
}

td {
    padding: 10px 5px;
    border-bottom: 1px solid rgba(255, 140, 0, 0.2);
    white-space: nowrap;
    overflow: hidden;
    vertical-align: middle;
}

th, td {
    border-left: none;
    border-right: none;
}

tr {
    border: none;
}

tr:hover {
    background: rgba(255, 140, 0, 0.05);
}

tr:last-child td {
    border-bottom: 2px solid rgba(255, 140, 0, 0.3);
}

.place-cell {
    text-align: center;
    font-weight: 700;
    color: #FF8C00;
    text-shadow: 0 0 8px rgba(255, 140, 0, 0.6);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
    max-width: 100%;
    white-space: nowrap;
}

.user-cell img {
    width: 35px;
    height: 35px;
    border-radius: 6px;
    border: 1px solid var(--accent-yellow);
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.user-cell span {
    color: var(--text-primary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: 100%;
    display: block;
}

.prize-cell {
    text-align: center;
    color: #ffffff;
    font-weight: 700;
    white-space: nowrap;
}

.prize-cell.empty {
    color: var(--text-muted);
}

.wagered-cell {
    text-align: right;
    font-weight: 700;
    color: #FF8C00;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(255, 140, 0, 0.5);
}

.loading-state {
    text-align: center;
    padding: 50px;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.error-state {
    text-align: center;
    padding: 50px;
    color: var(--accent-yellow);
    font-size: 1.2rem;
}


@media (max-width: 768px) {
    .top-three {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .top-card.first {
        order: 1;
        transform: none;
    }

    .top-card.second {
        order: 2;
    }

    .top-card.third {
        order: 3;
        transform: none;
    }

    .leaderboard-title {
        font-size: 1.8rem;
    }

    .leaderboard-section {
        padding: 20px 5px;
    }

    th, td {
        padding: 10px 5px;
        font-size: 0.85rem;
    }

    .wagered-amount {
        font-size: 1.2rem;
    }

    .prize-amount {
        font-size: 1.4rem;
    }

    .countdown-large {
        font-size: 24px;
        margin: 30px 0;
        color: #FF8C00;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .leaderboard-table-wrapper {
        transform: scale(1);
        margin: 0 auto 0 auto;
        padding: 15px 8px;
        overflow: hidden;
        width: 100%;
        max-width: 100%;
    }

    .leaderboard-table {
        min-width: 100%;
        width: 100%;
    }

    table {
        width: 100%;
        min-width: 100%;
        font-size: 0.75rem;
    }

    th, td {
        padding: 8px 5px;
        font-size: 0.85rem;
    }

    .user-cell {
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .user-cell span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.9rem;
    }

    .place-cell {
        font-size: 0.8rem;
    }

    .prize-cell, .wagered-cell {
        font-size: 0.8rem;
    }

    th {
        font-size: 0.9rem;
    }


    .table-header {
        margin-bottom: 20px;
    }

    .table-title {
        font-size: 1.2rem;
    }

    .top-card {
        padding: 20px;
    }

    .avatar-img {
        width: 60px;
        height: 60px;
    }

    .user-info h3 {
        font-size: 1.2rem;
    }

    .place-badge {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        top: -10px;
        right: -10px;
    }

    .navbar-brand img {
        width: 150px;
    }

    .title-icon {
        width: 35px;
        height: 35px;
    }

    .user-cell img {
        width: 35px;
        height: 35px;
    }

    .prize-icon {
        width: 40px;
        height: 40px;
    }

    .navbar-menu {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .countdown-large {
        font-size: 24px;
        margin: 20px 0;
        color: #FF8C00;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .leaderboard-title {
        font-size: 1.4rem;
    }

    .leaderboard-subtitle {
        font-size: 1rem;
    }

    .leaderboard-info {
        font-size: 0.8rem;
    }

    .navbar-brand img {
        width: 120px;
    }

    .top-three {
        gap: 15px;
    }

    .top-card {
        padding: 18px 12px;
    }

    .avatar-img {
        width: 50px;
        height: 50px;
    }

    .user-info h3 {
        font-size: 1.1rem;
    }

    th, td {
        padding: 8px 4px;
        font-size: 0.8rem;
    }

    th {
        font-size: 0.85rem;
    }

    .user-cell img {
        width: 30px;
        height: 30px;
    }

    .prize-icon {
        width: 30px;
        height: 30px;
    }

    .leaderboard-table-wrapper {
        padding: 12px 5px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .leaderboard-table {
        min-width: 100%;
        width: 100%;
    }

    table {
        width: 100%;
        min-width: 100%;
        font-size: 0.65rem;
    }

    th, td {
        padding: 6px 3px;
        font-size: 0.65rem;
    }

    .user-cell img {
        width: 25px;
        height: 25px;
    }

    .prize-cell .prize-icon {
        width: 18px;
        height: 18px;
    }

    .user-cell {
        max-width: 160px;
    }

    .user-cell span {
        font-size: 0.85rem;
    }

    .place-cell, .prize-cell, .wagered-cell {
        font-size: 0.75rem;
    }

    .table-header {
        margin-bottom: 15px;
    }

    .table-title {
        font-size: 0.9rem;
    }

    .navbar-menu {
        gap: 15px;
    }

    .navbar-link {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    .prize-amount {
        font-size: 1.8rem;
    }

    .wagered-amount {
        font-size: 1rem;
    }
}
