/* CSS for Donation Leaderboard */

/* General Container */
.leaderboard-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Inter', sans-serif;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: #b45309;
    /* Darker Gold/Bronze */
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #4b5563;
    /* Dark Gray */
    font-weight: 500;
}

/* Glassmorphism Table/List */
.leaderboard-list {
    background: rgba(255, 255, 255, 0.9);
    /* More opaque */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    padding: 20px 30px;
    background: rgba(255, 215, 0, 0.2);
    /* Light gold header */
    font-weight: 700;
    color: #78350f;
    /* Dark brown text */
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    padding: 20px 30px;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: default;
    opacity: 0;
    animation: fadeInUp 0.5s forwards;
    background: #fff;
}

.leaderboard-row:hover {
    background: #fffbeb;
    /* Light yellow hover */
    transform: translateX(5px);
}


.leaderboard-row:last-child {
    border-bottom: none;
}

/* Columns */
.rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4b5563;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}


.donor-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.donor-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1.2rem;
}

.donor-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    /* Very dark gray for contrast */
}

.amount {
    text-align: right;
    font-size: 1.2rem;
    font-weight: 700;
    color: #059669;
    /* Dark Green */
    font-family: 'Roboto Mono', monospace;
}


/* Top 3 Styles */
.leaderboard-row:nth-child(1) .rank {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    font-size: 2rem;
}

.leaderboard-row:nth-child(2) .rank {
    color: #C0C0C0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
    font-size: 1.8rem;
}

.leaderboard-row:nth-child(3) .rank {
    color: #CD7F32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
    font-size: 1.6rem;
}

.leaderboard-row:nth-child(1) {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), transparent);
}

.leaderboard-row:nth-child(2) {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.05), transparent);
}

.leaderboard-row:nth-child(3) {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.05), transparent);
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar for container if needed */
.leaderboard-list::-webkit-scrollbar {
    width: 6px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Loading State */
.loading-spinner {
    text-align: center;
    padding: 50px;
    color: #4b5563;
}

/* Pagination & Controls */
.leaderboard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 0 10px;
}

.pagination {
    display: flex;
    gap: 5px;
}

.pagination button {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.pagination button.active {
    background: #FFD700;
    color: #78350f;
    border-color: #FFD700;
    font-weight: 700;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.print-btn {
    padding: 8px 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.print-btn:hover {
    background: #059669;
}

/* Updated Info */
.updated-info {
    text-align: center;
    margin-top: 10px;
    color: #6b7280;
    font-size: 0.9rem;
    font-style: italic;
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    #sidebar-container,
    .header-mobile,
    .leaderboard-controls,
    .hero-subtitle {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        width: 100% !important;
    }

    .leaderboard-container {
        box-shadow: none;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .leaderboard-list {
        border: 1px solid #ccc;
        box-shadow: none;
        backdrop-filter: none;
    }

    .leaderboard-row {
        page-break-inside: avoid;
        border-bottom: 1px solid #eee;
        opacity: 1 !important;
        animation: none !important;
        background: white !important;
    }

    .hero-title {
        color: black;
        font-size: 2rem;
        -webkit-text-fill-color: black;
        text-shadow: none;
    }

    .rank {
        color: black !important;
        text-shadow: none !important;
    }

    .amount {
        color: black !important;
    }
}


.leaderboard-header,
.leaderboard-row {
    grid-template-columns: 50px 1fr auto;
    padding: 15px;
}

.hero-title {
    font-size: 2rem;
}

.donor-avatar {
    display: none;
}


/* Website Life Bar */
.website-life-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin: 30px auto;
    max-width: 800px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.life-stats-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.life-stat-item {
    flex: 1;
    text-align: center;
    min-width: 150px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 600;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    font-family: 'Roboto Mono', monospace;
}

.stat-value.highlight {
    color: #059669;
    font-size: 1.3rem;
}

.life-progress-wrapper {
    position: relative;
    padding: 10px 0;
}

.life-progress-bar {
    height: 25px;
    background: #e5e7eb;
    border-radius: 12.5px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.life-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 12.5px;
    transition: width 1.5s ease-in-out;
    position: relative;
}

.life-days-remaining {
    text-align: center;
    margin-top: 15px;
    font-size: 1.1rem;
    color: #374151;
    font-weight: 600;
}

.days-count {
    font-size: 1.4rem;
    color: #d97706;
    /* Amber */
    font-weight: 800;
}

.daily-deduction-info {
    text-align: center;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #9ca3af;
    font-style: italic;
}

/* Print Hide */
@media print {
    .website-life-container {
        display: none !important;
    }
}