/* Previous Leaderboards Section */
.prev-leaderboards {
    margin-top: 4rem;
    padding: 1rem;
    background: rgba(20, 20, 25, 0.7);
    border: 1px solid rgba(248, 193, 75, 0.2);
    border-radius: 8px;
}

.history-title {
    text-align: center;
    color: #f8c14b;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 1rem;
}

.history-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(248, 193, 75, 0.5),
        rgba(248, 193, 75, 0.8),
        rgba(248, 193, 75, 0.5),
        transparent
    );
}

.history-cards {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.prev-leaderboard-card {
    background: rgba(20, 20, 25, 0.95);
    border: 1px solid rgba(248, 193, 75, 0.2);
    border-radius: 8px;
    width: 320px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prev-leaderboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(248, 193, 75, 0.15);
}

.card-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(248, 193, 75, 0.1);
}

.date-range {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.started, .ended {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888;
    font-size: 0.8rem;
}

.status {
    background: rgba(248, 193, 75, 0.1);
    color: #f8c14b;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    text-align: center;
    font-size: 0.75rem;
    margin: 0.25rem 0;
}

.date, .time {
    color: #fff;
    font-size: 0.8rem;
}

.card-body {
    padding: 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(248, 193, 75, 0.1);
}

.winner-avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #f8c14b;
    padding: 2px;
}

.winner-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.winner-name {
    font-size: 1.2rem;
    color: #f8c14b;
    margin-bottom: 0.25rem;
}

.winner-label {
    color: #888;
    font-size: 0.8rem;
}

.card-footer {
    padding: 1rem;
    text-align: center;
    background: rgba(248, 193, 75, 0.05);
}

.prize-pool {
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.prize-amount {
    color: #f8c14b;
    font-size: 1.25rem;
    font-weight: bold;
}

.view-leaderboard {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: none;
    color: #f8c14b;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-top: 1px solid rgba(248, 193, 75, 0.1);
}

.view-leaderboard:hover {
    background: rgba(248, 193, 75, 0.1);
}

/* Modal Styles */
.leaderboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: rgba(20, 20, 25, 0.95);
    border: 1px solid rgba(248, 193, 75, 0.2);
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(248, 193, 75, 0.1);
    position: relative;
}

.modal-header h2 {
    color: #f8c14b;
    margin: 0 0 0.5rem;
}

.modal-header p {
    color: #888;
    margin: 0;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: #f8c14b;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.close-modal:hover {
    color: #fff;
}

.modal-body {
    padding: 1.5rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .prev-leaderboards {
        gap: 1.5rem;
    }
    
    .prev-leaderboard-card {
        width: calc(50% - 1rem);
    }
}

@media (max-width: 768px) {
    .prev-leaderboard-card {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

.rules-button {
    background-color: rgb(255, 193, 7);
    color: #000;
    padding: 3px 3px 5px 13px;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    left: 50px;
    letter-spacing: 1px;
    box-shadow: 10 0 100px rgba(255, 193, 7, 0.3);
}

.rules-button:hover {
    transition: all 0.8s ease;
    transform: scale(1.1) translateX(1px);

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 204, 1, 0.7);
}

.rules-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rules-popup.active {
    display: flex;
    opacity: 1;
}

.rules-content {
    background: rgba(20, 20, 25, 0.98);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    padding: 2rem;
    max-width: 800px;
    width: 90%;
    position: relative;
    transform: translateY(-30px);
    opacity: 0;
    transition: all 0.3s ease;
    margin: 2rem;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.rules-popup.active .rules-content {
    transform: translateY(0);
    opacity: 1;
}

.rules-content h2 {
    color: #ffc107;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    text-align: center;
}

.rules-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rules-content li {
    color: #fff;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.5;
}

.rules-content li::before {
    content: "•";
    color: #ffc107;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.close-rules {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #ffc107;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.close-rules:hover {
    transform: rotate(90deg);
} 