:root {
    --primary: #ff7b00;
    --primary-light: #fdc811;
    --primary-dark: #3b3b3b;
    --secondary: #000000;
    --secondary-light: #ffcc5d;
    --light-bg: #323232;
    --light-accent: #ffe484;
    --dark-text: white;
    --muted-text: #ffffff;
}

body {
    font-family: 'Anek Tamil', sans-serif;
    background: #232323;
    background-position: top;
    background-size: 100%;
    background-attachment: fixed;
    background-attachment: fixed;
    background-size: cover;
    color: var(--dark-text);
}

::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}

::-webkit-scrollbar-track {
    background: #fff3cd !important; 
    border-radius: 3px !important;
}

::-webkit-scrollbar-thumb {
    background: #ffc107 !important; 
    border-radius: 3px !important;
}

::-webkit-scrollbar-thumb:hover {
    background: #ffb300 !important; 
}

* {
    scrollbar-width: thin !important;
    scrollbar-color: #ffc107 #fff3cd !important;
}

.table-responsive, .prize-table-container {
    scrollbar-width: thin !important;
    scrollbar-color: #ffc107 #fff3cd !important;
}

body {
    scrollbar-width: thin !important;
    scrollbar-color: #ffc107 #fff3cd !important;
}

html {
    scrollbar-width: thin !important;
    scrollbar-color: #ffc107 #fff3cd !important;
}


.tournament-header {
    /* background: linear-gradient(135deg, var(--primary), var(--primary-light)); */
    background: linear-gradient(135deg, #ff7b00, #ff9800);
    padding: 2rem 0;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tournament-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="2" cy="2" r="1" fill="white" opacity="0.2"/></svg>');
    background-size: 20px 20px;
}

.logo img {
    max-height: 64px;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
}

.logo:hover img {
    transform: scale(1.05);
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.btn-login, .btn-register {
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    width: 140px;
    height: 50px;
}

.btn-login {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-login:hover {
    background-color: rgba(255, 255, 255, 0.4);
    color: white;
    transform: translateY(-2px);
}

.btn-register {
    background-color: var(--secondary);
    color: var(--light-accent);
}

.btn-register:hover {
    background-color: var(--secondary-light);
    transform: translateY(-2px);
    color: var(--dark-text);
}

.btn-login::after, .btn-register::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.5s;
}

.btn-login:hover::after, .btn-register:hover::after {
    left: 100%;
}

.tournament-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin: 1.5rem 0 0.5rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tournament-subtitle {
    color: var(--light-accent);
    font-size: 1.2rem;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Info Section */
.info-section {
    margin-top: 2rem; /* Changed from -30px to positive 2rem */
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
}

/* Event Info Cards - Fixed Top Margin */
.info-card {
    background-color: #323232;
    border-radius: 10px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    height: 100%;
    border-left: 3px solid var(--primary);
}

/* Event start/end date boxes specific styling */
.info-card:has(i.fa-calendar),
.info-card:has(i.fa-calendar-day),
.info-card:has(i.fa-clock),
.info-card:has(i.fa-hourglass-end) {
    margin-top: 1rem;
}

/* For browsers that don't support :has() */
.event-date-card,
.event-time-card {
    margin-top: 1rem;
}

.info-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.info-card .icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.5rem;
    box-shadow: 0 3px 10px 0000004d;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.info-card:hover .icon {
    transform: rotate(360deg);
}

.info-card h5 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted-text);
    margin-bottom: 0.2rem;
}

.info-card p {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--dark-text);
}

/* Countdown Section */
.countdown-section {
    background-color: #323232;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.countdown-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #323232;
    z-index: 1;
}

.countdown-section .row {
    position: relative;
    z-index: 2;
}

.countdown-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--light-accent);
    line-height: 1.3;
}

.countdown-timer {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.timer-item {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: 10px;
    padding: 1rem;
    min-width: 90px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(14, 14, 14, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.timer-item::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    top: 0;
    left: -120px;
    transform: skew(-30deg);
    transition: all 0.5s ease;
}

.timer-item:hover::before {
    left: 120%;
}

.timer-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px #0000004d;
}

.timer-count {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.timer-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 500;
    opacity: 0.9;
}

.nav-tabs {
    border: none;
    margin-bottom: 0;
    gap: 10px;
}

.nav-tabs .nav-link {
    color: var(--dark-text);
    background-color: var(--light-bg);
    border: none;
    border-radius: 10px 10px 0 0;
    padding: 1rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    background-color: #e0e0e0;
}

.nav-tabs .nav-link.active {
    background-color: var(--light-bg);
    color: var(--primary);
    box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.05);
}

.nav-tabs .nav-link i {
    margin-right: 8px;
}

.tab-content {
    background-color: var(--light-bg);
    border-radius: 0 15px 15px 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
    position: relative;
    padding-bottom: 0.8rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 10px;
}

#topWinners {
    padding: 1rem 0.5rem;
}

#topWinners .row {
    justify-content: center;
    align-items: stretch;
}

.trophy-img {
    width: auto !important;
    height: clamp(100px, 15vw, 180px) !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: 0 auto !important;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
}

.winner-card:hover .trophy-img {
    transform: translateY(-5px) scale(1.05);
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.2));
}

.winner-card {
    display: grid;
    grid-template-rows: auto auto auto auto auto;
    grid-template-areas: 
        "trophy"
        "position"
        "prize"
        "name"
        "amount";
    align-items: center;
    justify-items: center;
    background-color: var(--light-bg);
    border-radius: 15px;
    padding: 1.5rem 1rem 1.2rem;
    row-gap: 0.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    border: 2px solid var(--light-accent);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.winner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    z-index: 1;
}

.winner-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.winner-card .trophy-container {
    grid-area: trophy;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 0.5rem;
    position: relative;
}

.winner-position {
    grid-area: position;
    color: var(--muted-text);
    font-weight: 600;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem); 
    margin: 0;
    padding: 0;
    width: 100%;
}

.winner-prize {
    grid-area: prize;
    color: white;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 50px;
    padding: 0.5rem 1rem;
    width: 90%;
    display: inline-block;
    margin: 0;
    font-size: clamp(0.7rem, 1.3vw, 0.9rem); 
    line-height: 1.3;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(196, 12, 12, 0.15);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.winner-card:hover .winner-prize {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(196, 12, 12, 0.25);
}

/* Winner Name */
.winner-name {
    grid-area: name;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    font-weight: 700;
    margin: 0;
    color: var(--dark-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    padding: 0 0.5rem;
}

/* Winner Amount */
.winner-amount {
    grid-area: amount;
    color: var(--primary);
    font-weight: 700;
    font-size: clamp(0.85rem, 1.5vw, 1.1rem); 
    margin: 0;
}

/* First Place Special Styling */
.winner-card.first-place {
    border: 2px solid var(--primary);
    background: var(--light-bg);
    box-shadow: 0 10px 30px rgba(255, 183, 0, 0.15);
}

.winner-card.first-place::before {
    background: linear-gradient(90deg, var(--primary), #FFD700);
}

.winner-card.first-place .trophy-img {
    height: clamp(120px, 18vw, 220px) !important;
    filter: drop-shadow(0 8px 25px rgba(255, 183, 0, 0.2));
}

.winner-card.first-place:hover .trophy-img {
    filter: drop-shadow(0 12px 30px rgba(255, 183, 0, 0.3));
}

.winner-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.3), 
                transparent);
    animation: lightSweep 4s infinite;
    pointer-events: none;
}

@keyframes lightSweep {
    0% {
        left: -50%;
    }
    100% {
        left: 150%;
    }
}

.winner-card.first-place::after {
    background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 245, 200, 0.4), 
                transparent);
    animation: lightSweep 3s infinite;
}

.winner-prize::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(30deg);
    transition: all 0.3s ease;
}

.winner-card:hover .winner-prize::after {
    left: 120%;
    transition: all 0.8s ease;
}

.winner-card:nth-child(1) .trophy-img { 
    filter: drop-shadow(0 8px 20px rgba(192, 192, 192, 0.3));
}

.winner-card:nth-child(1):hover .trophy-img {
    filter: drop-shadow(0 12px 25px rgba(192, 192, 192, 0.4));
}

.winner-card:nth-child(3) .trophy-img { 
    filter: drop-shadow(0 8px 20px rgba(205, 127, 50, 0.3));
}

.winner-card:nth-child(3):hover .trophy-img {
    filter: drop-shadow(0 12px 25px rgba(205, 127, 50, 0.4));
}

#topWinners .col-md-4 {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

#topWinners .col-md-4:nth-child(1) {
    animation-delay: 0.2s;
}

#topWinners .col-md-4:nth-child(2) {
    animation-delay: 0s;
}

#topWinners .col-md-4:nth-child(3) {
    animation-delay: 0.4s;
}

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

.table-container {
    background-color: #686868;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
}

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

.leaderboard-table thead th {
    background-color: var(--primary);
    color: white;
    padding: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.leaderboard-table thead th:first-child {
    border-radius: 10px 0 0 0;
}

.leaderboard-table thead th:last-child {
    border-radius: 0 10px 0 0;
}

.leaderboard-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.leaderboard-table tbody tr:last-child {
    border-bottom: none;
}

.leaderboard-table tbody tr:hover {
    background-color: #ffa14d;
    transform: scale(1.01);
}

.leaderboard-table td {
    padding: 1rem;
    vertical-align: middle;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    margin-right: 0.5rem;
    box-shadow: 0 3px 8px rgba(196, 12, 12, 0.2);
}

.player-id {
    font-weight: 600;
    color: var(--dark-text);
}

.turnover-amount {
    font-weight: 700;
    color: var(--primary);
}

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.page-item .page-link {
    background-color: var(--light-bg);
    color: var(--primary);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.page-item .page-link:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
    color: var(--light-accent);
    z-index: 2;
}

.page-item.active .page-link {
    background-color: var(--primary-light);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    z-index: 3;
}

.page-item.disabled .page-link {
    opacity: 0.6;
    cursor: not-allowed;
}

.empty-state {
    text-align: center;
    padding: 3rem 0;
}

.empty-state img {
    max-width: 120px;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--muted-text);
    max-width: 400px;
    margin: 0 auto;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 3rem 0;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--light-accent);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.loader:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 5px solid transparent;
    border-top-color: var(--primary);
    border-right-color: var(--primary);
    animation: spin 1s linear infinite;
}

.loader-text {
    margin-top: 1rem;
    color: var(--muted-text);
    font-weight: 500;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.prize-table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-radius: 10px;
}

.prize-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    background-color: #686868;
}

.prize-table thead th {
    background-color: var(--primary);
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
}

.prize-table tbody td {
    padding: 0.8rem 1rem;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}



.prize-table tbody tr:hover {
    background-color: #ffa14d;
}

.prize-table tbody tr.total-row {
    background-color: #686868;
    font-weight: 700;
}

.terms-container {
    max-width: 900px;
    margin: 0 auto;
}

.terms-header {
    text-align: center;
    margin-bottom: 2rem;
}

.terms-header h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 1rem;
}

.terms-content {
    margin-bottom: 2rem;
}

.terms-content h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.terms-content ol {
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}

.terms-content li {
    margin-bottom: 0.8rem;
    color: var(--dark-text);
}

.terms-content a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.terms-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}


.footer {
    /* background-color: #f0f0f0; */
    padding: 1.5rem 0;
    text-align: center;
    color: var(--light-accent);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
    margin-top: 3rem;
}


.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    height: 20px;
}

@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.loading-row td {
    padding: 1rem;
}

@keyframes flip {
    0% { transform: rotateX(0deg); }
    50% { transform: rotateX(90deg); }
    100% { transform: rotateX(0deg); }
}

.flip-animation {
    animation: flip 0.5s ease;
    transform-style: preserve-3d;
    perspective: 300px;
}

.animate-on-scroll {
    opacity: 0;
}

.animated {
    opacity: 1;
}

.fade-in.animated {
    animation: fadeIn 0.5s ease forwards;
}

.slide-up.animated {
    animation: slideUp 0.5s ease forwards;
}

.bounce-in.animated {
    animation: bounceIn 0.5s ease forwards;
}

.scale-in.animated {
    animation: scaleIn 0.5s ease forwards;
}

.slide-left.animated {
    animation: slideLeft 0.5s ease forwards;
}

.slide-right.animated {
    animation: slideRight 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes bounceIn {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes slideLeft {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideRight {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.leaderboard-table tbody tr {
    position: relative;
}

.leaderboard-table tbody tr::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.leaderboard-table tbody tr:hover::after {
    width: 100%;
}

.event-date-container {
    margin-top: 2rem !important;
}


@media (min-width: 1400px) {
    .winner-card {
        padding: 1.8rem 1.2rem 1.5rem;
        row-gap: 0.7rem;
    }
    
    .trophy-img {
        height: clamp(120px, 15vw, 200px) !important;
    }
    
    .winner-card.first-place .trophy-img {
        height: clamp(140px, 18vw, 240px) !important;
    }
}

@media (max-width: 1200px) {
    .tournament-title {
        font-size: 2rem;
    }
    
    .countdown-title {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .timer-item {
        min-width: 80px;
    }
    
    .timer-count {
        font-size: 2rem;
    }
    
    .winner-card {
        padding: 1.5rem 1rem 1.2rem;
        row-gap: 0.5rem;
    }
    
    .trophy-img {
        height: clamp(110px, 14vw, 180px) !important;
    }
    
    .winner-card.first-place .trophy-img {
        height: clamp(130px, 16vw, 200px) !important;
    }
    
    #topWinners .col-md-4 {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 992px) {
    .tournament-title {
        font-size: 1.8rem;
    }
    
    .tournament-subtitle {
        font-size: 1.1rem;
    }
    
    .btn-login, .btn-register {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .info-card {
        padding: 1.1rem;
    }
    
    .info-card .icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .countdown-title {
        font-size: 1.6rem;
    }
    
    .timer-item {
        min-width: 70px;
        padding: 0.9rem;
    }
    
    .timer-count {
        font-size: 1.9rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.9rem 1.2rem;
    }
    
    .winner-card {
        padding: 1.3rem 0.8rem 1rem;
        row-gap: 0.4rem;
    }
    
    .trophy-img {
        height: clamp(100px, 13vw, 160px) !important;
    }
    
    .winner-card.first-place .trophy-img {
        height: clamp(120px, 15vw, 180px) !important;
    }
}

@media (max-width: 768px) {
    .tournament-title {
        font-size: 1.6rem;
    }
    
    .tournament-subtitle {
        font-size: 1rem;
    }
    
    .btn-login, .btn-register {
        padding: 0.45rem 0.9rem;
        font-size: 0.85rem;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    .info-card .icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .countdown-title {
        font-size: 1.4rem;
    }
    
    .timer-item {
        min-width: 65px;
        padding: 0.8rem;
    }
    
    .timer-count {
        font-size: 1.7rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .tab-content {
        padding: 1.5rem 1rem;
    }
    
    .winner-card {
        padding: 1.2rem 0.7rem 0.9rem;
        row-gap: 0.3rem;
    }
    
    .trophy-img {
        height: clamp(90px, 25vw, 150px) !important; 
    }
    
    .winner-card.first-place .trophy-img {
        height: clamp(110px, 28vw, 170px) !important; 
    }
    
    .winner-name {
        font-size: clamp(0.95rem, 4vw, 1.1rem);
    }
    
    .winner-position {
        font-size: clamp(0.85rem, 3.5vw, 1rem);
    }
    
    .winner-prize {
        font-size: clamp(0.75rem, 3vw, 0.9rem);
        padding: 0.4rem 0.8rem;
    }
    
    .winner-amount {
        font-size: clamp(0.8rem, 3.5vw, 1rem);
    }
    
    .rank-badge {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }
        /* === TAMBAHKAN INI === */
    #topWinners .row {
        align-items: initial; 
    }

    .winner-col-1 {
        order: 1; 
    }
    .winner-col-2 {
        order: 2; 
    }
    .winner-col-3 {
        order: 3; 
    }
}

/* Extra Small Devices */
@media (max-width: 576px) {
    .tournament-title {
        font-size: 1.4rem;
    }
    
    .tournament-subtitle {
        font-size: 0.9rem;
    }
    
    .logo img {
        max-height: 48px;
    }
    
    .auth-buttons {
        gap: 6px;
    }
    
    .btn-login, .btn-register {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .btn-login i, .btn-register i {
        margin-right: 3px;
    }
    
    .info-card h5 {
        font-size: 0.8rem;
    }
    
    .info-card p {
        font-size: 1rem;
    }
    
    .countdown-title {
        font-size: 1.3rem;
    }
    
    .timer-item {
        min-width: 60px;
        padding: 0.6rem;
    }
    
    .timer-count {
        font-size: 1.5rem;
    }
    
    .nav-tabs {
        gap: 5px;
    }
    
    .nav-tabs .nav-link {
        padding: 0.7rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .nav-tabs .nav-link i {
        margin-right: 0;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .winner-card {
        padding: 1rem 0.6rem 0.8rem;
        row-gap: 0.25rem;
    }
    
    .trophy-img {
        height: clamp(80px, 28vw, 140px) !important; 
    }
    
    .winner-card.first-place .trophy-img {
        height: clamp(100px, 32vw, 160px) !important;
    }
    
    .winner-name {
        font-size: clamp(0.9rem, 4.5vw, 1rem);
        padding: 0 0.3rem;
    }
    
    .winner-position {
        font-size: clamp(0.8rem, 4vw, 0.9rem);
    }
    
    .winner-prize {
        font-size: clamp(0.7rem, 3.5vw, 0.8rem);
        padding: 0.3rem 0.7rem;
        width: 95%;
    }
    
    .winner-amount {
        font-size: clamp(0.75rem, 4vw, 0.9rem);
    }
    
    .leaderboard-table thead th,
    .leaderboard-table td {
        padding: 0.7rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .rank-badge {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
        margin-right: 0.3rem;
    }
    
    .prize-table thead th,
    .prize-table tbody td {
        padding: 0.6rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .terms-content li {
        font-size: 0.9rem;
    }
    
    .page-item .page-link {
        width: 35px;
        height: 35px;
        font-size: 0.85rem;
    }
    
    #topWinners .row {
        margin: 0 -5px;
    }
    
    #topWinners .col-md-4 {
        padding-left: 5px;
        padding-right: 5px;
    }
}

@media (max-width: 400px) {
    .tournament-title {
        font-size: 1.25rem;
    }
    
    .tournament-subtitle {
        font-size: 0.85rem;
    }
    
    .btn-login, .btn-register {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
    }
    
    .info-card .icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .info-card h5 {
        font-size: 0.75rem;
    }
    
    .info-card p {
        font-size: 0.95rem;
    }
    
    .countdown-title {
        font-size: 1.2rem;
    }
    
    .timer-item {
        min-width: 50px;
        padding: 0.5rem;
    }
    
    .timer-count {
        font-size: 1.3rem;
    }
    
    .timer-label {
        font-size: 0.7rem;
    }
    
    .winner-card {
        padding: 0.8rem 0.5rem 0.7rem;
        row-gap: 0.2rem;
    }
    
    .trophy-img {
        height: clamp(70px, 30vw, 120px) !important; 
    }
    
    .winner-card.first-place .trophy-img {
        height: clamp(85px, 34vw, 140px) !important;
    }
}

.archives-link {
    text-align: center;
    margin-top: 15px;
}

.btn-archives {
    background: linear-gradient(135deg, #ff9900, #ff6600);
    color: white;
    font-weight: 600;
    border-radius: 50px;
    padding: 8px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.btn-archives:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    color: white;
}

@media (max-width: 768px) {
    .archives-link {
        margin-top: 10px;
    }
    
    .btn-archives {
        font-size: 0.9rem;
        padding: 7px 15px;
    }
}
@media (max-width: 576px) {
    .auth-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin-top: 10px;
    }

    .auth-buttons a {
        width: 60%;
        margin-bottom: 6px;
        justify-content: center;
    }

    .archives-link {
        width: 100%;
        margin-top: 10px;
        display: flex;
        justify-content: center;
    }

    .d-flex.justify-content-between.align-items-center {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .logo {
        margin-bottom: 10px;
    }
}
