:root {
  --primary: #D3FF5F;
  --secondary: #7AFFB0;
  --accent: #00B894;
  --background-dark: #121212;
  --card-bg: rgba(18, 18, 18, 0.8);
  --card-border: rgba(211, 255, 95, 0.2);
  --text-white: #FFFFFF;
  --text-muted: #A0A0A0;
  --transition-speed: 0.3s;
  --border-radius: 12px;
  --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.rustclash-content {
  max-width: auto;
  margin: 0 auto;
  padding: 40px 20px 80px;
  position: relative;
  z-index: 1;
  background: transparent;
  min-height: 100vh;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 20px;
  padding: 30px;
  text-align: center;
}

.logo-title {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  gap: 30px;
}

.header-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

h1 {
  color: var(--primary);
  font-size: 3.5rem;
  margin: 0;
  text-shadow: 0 0 15px rgba(211, 255, 95, 0.4);
  letter-spacing: 2px;
  font-weight: 700;
}

.subtitle {
  color: var(--secondary);
  font-size: 1.8rem;
  margin: 15px 0 0;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 600;
  text-shadow: 0 0 12px rgba(122, 255, 176, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.coin-icon {
  height: 1.2em;
  width: auto;
  vertical-align: middle;
  margin: 0 5px;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
  transition: transform 0.3s ease;
}

.coin-icon:hover {
  transform: rotate(20deg) scale(1.2);
}

.header-logo:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .header-container {
    padding: 20px 15px;
    margin-bottom: 30px;
  }
  
  .logo-title {
    flex-direction: column;
    gap: 10px;
  }
  
  .header-logo {
    height: 70px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .subtitle {
    font-size: 1rem;
    letter-spacing: 1px;
  }
}

.rules-container {
    max-width: 1000px;
    width: 90%;
    margin: 0 auto 30px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.rules-container h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

.rules-container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
}

.rules-container ul {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 800px;
    text-align: left;
    display: inline-block;
}

.rules-container li {
    color: var(--text-white);
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    line-height: 1.6;
    font-size: 1rem;
}

.rules-container li::before {
    content: '•';
    color: var(--primary);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rules-container {
        padding: 20px 15px;
        margin: 20px auto;
        width: 85%;
    }
    
    .rules-container h2 {
        font-size: 1.5rem;
    }
    
    .rules-container li {
        font-size: 0.9rem;
        padding-left: 25px;
    }
}

/* PREV LEADERBOARD */
.prev-leaderboard-container {
    text-align: center;
    margin: 30px 0 40px;
    padding: 0 20px;
}

.prev-leaderboard-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #ffb347 0%, #ffcc33 100%);
    color: #1a1a1a;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 179, 71, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.prev-leaderboard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 179, 71, 0.4);
    color: #1a1a1a;
}

.prev-leaderboard-btn:active {
    transform: translateY(0);
}

.prev-leaderboard-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffcc33 0%, #ffb347 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.prev-leaderboard-btn:hover::before {
    opacity: 1;
}

.prev-leaderboard-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.prev-leaderboard-btn:hover i {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .prev-leaderboard-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
}


/* Podium Styles */
.podium-container {
    max-width: 1000px;
    height: auto;
    width: 90%;
    margin: 0 auto 50px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    padding: 0 20px;
}

.podium-card {
    background: rgba(18, 18, 18, 0.8);
    border: 1px solid rgba(211, 255, 95, 0.2);
    border-radius: 12px;
    padding: 50px 20px 40px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 300px;
    overflow: visible;
}

.podium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Podium positions */
.podium-card {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    padding-bottom: 40px;
    margin: 0 auto;
}

.podium-card:nth-child(1) { 
    margin-top: 60px;
}

.podium-card:nth-child(2) { 
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.9), rgba(50, 50, 50, 0.9));
    border: 1px solid var(--primary);
    box-shadow: 0 0 20px rgba(211, 255, 95, 0.2);
    z-index: 2;
    margin: 0 auto; 
}

.podium-card:nth-child(3) {  
    margin-top: 80px;
}

/* Rank Badge */
.rank-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -65px auto 15px; 
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-white);
    position: relative;
    z-index: 10; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.podium-card:nth-child(1) .rank-badge {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.3);
}

.crown-badge {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #D4AF37);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: -60px auto 15px;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    position: relative;
    z-index: 10;
}

.crown-icon {
    width: 50px;
    height: auto;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.podium-card:nth-child(3) .rank-badge {
    background: linear-gradient(135deg, #CD7F32, #A67C52);
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.3);
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    border: 3px solid var(--primary);
    object-fit: cover;
    background: #2a2a2a;
    padding: 5px;
}

.podium-card:nth-child(2) .avatar {
    width: 100px;
    height: 100px;
    border-width: 4px;
}

.username {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin: 10px 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wagered, .prize {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 8px 0;
    line-height: 1.4;
}

.prize {
    color: var(--secondary);
    font-weight: 600;
    font-size: 1.2rem;
    text-shadow: 0 0 8px rgba(122, 255, 176, 0.3);
}

.podium-base {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15px;
    border-radius: 0 0 10px 10px;
    margin: 0;
}

.podium-card:nth-child(1) .podium-base {
    background: linear-gradient(90deg, #C0C0C0, #A0A0A0);
}

.podium-card:nth-child(2) .podium-base {
    height: 20px;
    background: linear-gradient(90deg, #FFD700, #D4AF37);
}

.podium-card:nth-child(3) .podium-base {
    background: linear-gradient(90deg, #CD7F32, #A67C52);
}

/* Countdown Timer Styles */
.countdown-timer-container {
    max-width: 600px;
    width: 90%;
    margin: 30px auto 50px;
    padding: 0 20px;
}

.countdown-timer {
    background: rgba(18, 18, 18, 0.7);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(5px);
}

.countdown-title {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 500;
    letter-spacing: 1px;
}

.countdown-display {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.time-block {
    flex: 1;
    min-width: 60px;
}

.time-block span {
    display: block;
}

.time-block span:first-child {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(122, 255, 176, 0.3);
}

.time-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .podium-container {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .podium-card {
        width: 80%;
        max-width: 300px;
        margin: 0 auto !important;
        height: auto !important;
    }
    
    .podium-card:nth-child(2) {
        order: -1;
    }
    
    .rank-badge, .crown-badge {
        margin-top: -30px !important;
    }
    
    .podium-card:nth-child(2) .rank-badge,
    .podium-card:nth-child(2) .crown-badge {
        margin-top: -40px !important;
    }
    
    .podium-card:nth-child(1),
    .podium-card:nth-child(3) {
        align-self: center !important;
    }
    
    /* Countdown Timer Mobile Styles */
    .countdown-timer {
        padding: 12px 8px;
    }
    
    .countdown-title {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .countdown-display {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    .time-segment {
        min-width: 60px;
        padding: 5px;
        margin: 5px 0;
    }
    
    .time-segment span:first-child {
        font-size: 1.5rem;
    }
    
    .time-segment .time-label {
        font-size: 0.7rem;
    }
    
    /* Adjust for very small screens */
    @media (max-width: 350px) {
        .countdown-timer {
            padding: 8px 5px;
        }
        
        .countdown-title {
            font-size: 0.9rem;
            margin-bottom: 8px;
        }
        
        .time-segment {
            min-width: 50px;
            padding: 3px;
            margin: 3px 0;
        }
        
        .time-segment span:first-child {
            font-size: 1.2rem;
        }
        
        .time-segment .time-label {
            font-size: 0.6rem;
        }
    }
    
    .time-block span:first-child {
        font-size: 1.5rem;
    }
    
    .time-label {
        font-size: 0.6rem;
    }
}

/* Leaderboard Styles */
.leaderboard-container {
    width: 80%;
    max-width: 100vw;
    margin: 0 auto 30px;
    padding: 0 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    box-sizing: border-box;
}

.leaderboard {
    background: rgba(18, 18, 18, 0.8);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 15px 10px;
    backdrop-filter: blur(5px);
    width: 100%;
    min-width: 1000px;
    margin: 0;
    box-sizing: border-box;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-white);
}

.leaderboard-header {
    display: flex;
    padding: 12px 10px;
    background: rgba(211, 255, 95, 0.1);
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
    min-width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .leaderboard {
        padding: 12px 8px;
        min-width: 900px;
    }
    
    .user-col {
        min-width: 100px;
        padding: 0 8px;
        font-size: 0.95rem !important;
    }
    
    .rank-col {
        min-width: 50px;
        width: 50px;
        font-size: 1rem !important;
    }
    
    .wagered-col, .prize-col {
        min-width: 100px;
        padding: 0 8px;
        font-size: 0.95rem !important;
    }
    
    .leaderboard-header {
        padding: 10px 8px;
        font-size: 0.65rem;
    }
}

@media (max-width: 768px) {
    .leaderboard-container {
        padding: 0 5px;
        margin-bottom: 20px;
    }
    
    .leaderboard {
        padding: 8px 5px;
        min-width: 800px;
    }
    
    .leaderboard-header {
        padding: 8px 5px;
        font-size: 0.6rem;
        gap: 3px;
    }
    
    .rank-col {
        min-width: 40px;
        width: 40px;
        font-size: 0.8rem !important;
    }
    
    .user-col {
        font-size: 0.8rem !important;
        min-width: 80px;
        padding: 0 5px;
        flex: 1;
    }
    
    .wagered-col, .prize-col {
        min-width: 70px;
        padding: 0 5px;
        font-size: 0.8rem !important;
    }
}


.rank-col {
    width: 100px;
    min-width: 100px;
    text-align: center;
    font-size: 1.2rem;
}

.user-col {
    flex: 2;
    padding: 0 10px;
    min-width: 120px;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.wagered-col, .prize-col {
    width: 180px;
    min-width: 120px;
    text-align: right;
    font-size: 1rem;
    font-weight: 600;
    padding: 0 10px;
    white-space: nowrap;
    box-sizing: border-box;
}

.leaderboard-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    min-width: 100%;
    padding: 12px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 1.05rem;
}

.leaderboard-row:hover {
    background: rgba(211, 255, 95, 0.05);
    transform: translateX(5px);
}

.leaderboard-row .rank-col {
    font-weight: 600;
    color: var(--text-muted);
}

.leaderboard-row .user-col {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    background: #2a2a2a;
    padding: 2px;
}

.leaderboard-username {
    color: var(--text-white);
    font-weight: 500;
    font-size: 1.05rem;
}

.leaderboard-row .wagered-col,
.leaderboard-row .prize-col {
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
}

.leaderboard-row .prize-col {
    color: var(--secondary);
    font-weight: 600;
}

.leaderboard-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-style: italic;
}

/* Responsive Design for Leaderboard */
@media (max-width: 1024px) {
    .leaderboard-container {
        width: 100%;
        padding: 0 15px;
    }
    
    .leaderboard {
        padding: 15px 10px;
    }
    
    .leaderboard-header {
        padding: 10px 8px;
        font-size: 0.7rem;
    }
    
    .rank-col {
        width: 40px;
    }
    
    .wagered-col, .prize-col {
        width: 100px;
        text-align: right;
    }
    
    .leaderboard-row {
        padding: 10px 8px;
    }
    
    .leaderboard-avatar {
        width: 25px;
        height: 25px;
    }
    
    .leaderboard-username {
        font-size: 0.9rem;
    }
    
    .leaderboard-row .wagered-col,
    .leaderboard-row .prize-col {
        font-size: 0.85rem;
    }
}

