/* فایل: assets/css/wakeup-leaderboard.css */

.wakeup-leaderboard-wrapper {
    margin: 40px auto;
    padding: 0 20px;
    max-width: 900px; /* محدود کردن عرض در دسکتاپ */
}

.leaderboard-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(77, 150, 255, 0.1);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.leaderboard-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 35px 60px -15px rgba(77, 150, 255, 0.25),
                0 0 0 1px rgba(77, 150, 255, 0.2);
}

/* ========== هدر جدول ========== */
.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: linear-gradient(135deg, #4D96FF 0%, #3B82F6 100%);
    position: relative;
    overflow: hidden;
}

.leaderboard-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    animation: rotateGlow 20s linear infinite;
}

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

.header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.header-title i {
    font-size: 1.8rem;
    color: #FFD700;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
    animation: sunPulse 3s ease-in-out infinite;
}

@keyframes sunPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.1); opacity: 1; }
}

.header-title h3 {
    margin: 0;
    font-family: 'lalezar', 'vazir', sans-serif;
    font-size: 1.4rem;
    color: white;
    letter-spacing: 1px;
}

.header-date {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 8px 18px;
    border-radius: 60px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.header-date i {
    font-size: 0.9rem;
    color: #FFD700;
}

.header-date span {
    font-size: 0.9rem;
    color: white;
    font-weight: 600;
}

/* ========== ستون‌های جدول ========== */
.leaderboard-columns {
    display: grid;
    grid-template-columns: 80px 1fr 110px;
    padding: 14px 24px;
    background: rgba(77, 150, 255, 0.05);
    border-bottom: 1px solid rgba(77, 150, 255, 0.15);
    font-weight: 700;
    font-size: 0.85rem;
    color: #475569;
    text-align: center;
}

.leaderboard-columns .col-rank,
.leaderboard-columns .col-time {
    text-align: center;
}

.leaderboard-columns .col-user {
    text-align: center;
    padding-right: 0;
}

/* ========== ردیف‌های جدول ========== */
.leaderboard-rows {
    max-height: 480px;
    overflow-y: auto;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 80px 1fr 110px;
    align-items: center;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    background: transparent;
    text-align: center;
}

.leaderboard-row:hover {
    background: linear-gradient(90deg, rgba(77, 150, 255, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
    transform: scale(1.01);
}

.leaderboard-row .col-rank {
    text-align: center;
}

.leaderboard-row .col-user {
    text-align: center;
    padding-right: 0;
}

.leaderboard-row .col-time {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* رتبه */
.rank-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
}

.rank-medal i {
    font-size: 1.8rem;
}

.rank-medal.gold i { color: #F59E0B; text-shadow: 0 0 10px rgba(245, 158, 11, 0.5); }
.rank-medal.silver i { color: #94A3B8; text-shadow: 0 0 8px rgba(148, 163, 184, 0.5); }
.rank-medal.bronze i { color: #CD7F32; text-shadow: 0 0 8px rgba(205, 127, 50, 0.5); }

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.9rem;
    color: #4D96FF;
}

/* اطلاعات کاربر */
.user-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #4D96FF, #F59E0B);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(77, 150, 255, 0.3);
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4D96FF, #6C5CE7);
    color: white;
}

.avatar-placeholder i {
    font-size: 1.2rem;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
}

/* ساعت بیداری */
.col-time i {
    font-size: 0.85rem;
    color: #4D96FF;
    
}

.wake-time {
    font-weight: 700;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #4D96FF10, #F59E0B10);
    padding: 5px 12px;
    border-radius: 40px;
    color: #4D96FF;
    border: 1px solid rgba(77, 150, 255, 0.2);
}

/* ========== فوتر ========== */
.leaderboard-footer {
    padding: 14px 24px;
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(77, 150, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #4D96FF;
    font-weight: 600;
}

.leaderboard-footer i {
    font-size: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ========== حالت خالی ========== */
.empty-leaderboard {
    padding: 60px 30px;
    text-align: center;
}

.empty-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatEmpty 3s ease-in-out infinite;
}

@keyframes floatEmpty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-icon i {
    font-size: 2.8rem;
    color: #94a3b8;
}

.empty-message h4 {
    margin: 0 0 12px 0;
    font-family: 'lalezar', 'vazir', sans-serif;
    font-size: 1.4rem;
    color: #4D96FF;
}

.empty-message p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

/* ========== اسکرول بار ========== */
.leaderboard-rows::-webkit-scrollbar {
    width: 5px;
}

.leaderboard-rows::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.leaderboard-rows::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4D96FF, #F59E0B);
    border-radius: 10px;
}

/* ========== انیمیشن ورود ردیف‌ها ========== */
.leaderboard-row {
    animation: slideInRow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
    transform: translateX(-20px);
}

@keyframes slideInRow {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.leaderboard-row:nth-child(1) { animation-delay: 0.05s; }
.leaderboard-row:nth-child(2) { animation-delay: 0.1s; }
.leaderboard-row:nth-child(3) { animation-delay: 0.15s; }
.leaderboard-row:nth-child(4) { animation-delay: 0.2s; }
.leaderboard-row:nth-child(5) { animation-delay: 0.25s; }
.leaderboard-row:nth-child(6) { animation-delay: 0.3s; }
.leaderboard-row:nth-child(7) { animation-delay: 0.35s; }
.leaderboard-row:nth-child(8) { animation-delay: 0.4s; }
.leaderboard-row:nth-child(9) { animation-delay: 0.45s; }
.leaderboard-row:nth-child(10) { animation-delay: 0.5s; }

/* ========== ریسپانسیو ========== */
@media (max-width: 768px) {
    .wakeup-leaderboard-wrapper {
        margin: 25px auto;
        padding: 0 15px;
        max-width: 100%;
    }
    
    .leaderboard-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 12px;
    }
    
    .leaderboard-columns {
        grid-template-columns: 60px 1fr 95px;
        padding: 10px 16px;
        font-size: 0.75rem;
    }
    
    .leaderboard-row {
        grid-template-columns: 60px 1fr 95px;
        padding: 10px 16px;
    }
    
    .rank-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .rank-medal i {
        font-size: 1.4rem;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
    }
    
    .user-name {
        font-size: 0.85rem;
    }
    
    .wake-time {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
    
    .col-time i {
        display: none;
    }
}

@media (max-width: 480px) {
    .leaderboard-columns {
        grid-template-columns: 50px 1fr 85px;
        padding: 8px 12px;
        font-size: 0.7rem;
    }
    
    .leaderboard-row {
        grid-template-columns: 50px 1fr 85px;
        padding: 8px 12px;
    }
    
    .user-name {
        font-size: 0.75rem;
        max-width: 100px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .rank-number {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
}
/* ========== دکمه دعوت به رقابت ========== */
.competition-cta {
    text-align: center;
    margin-top: 28px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #4D96FF, #3B82F6);
    padding: 14px 32px;
    border-radius: 60px;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 10px 25px -5px rgba(77, 150, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 35px -8px rgba(77, 150, 255, 0.5);
    gap: 16px;
}

.cta-button i:first-child {
    animation: flamePulse 1.5s ease-in-out infinite;
}

@keyframes flamePulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
}

.cta-button i:last-child {
    transition: transform 0.3s ease;
}

.cta-button:hover i:last-child {
    transform: translateX(-5px);
}

@media (max-width: 768px) {
    .cta-button {
        padding: 12px 24px;
        font-size: 0.85rem;
        gap: 8px;
    }
    
    .competition-cta {
        margin-top: 20px;
    }
}
.cta-button i.fa-fire {
    animation: flameFlicker 1.2s ease-in-out infinite;
    transform-origin: center;
}

@keyframes flameFlicker {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
        text-shadow: 0 0 3px #F59E0B;
    }
    25% {
        transform: scale(1.15);
        opacity: 1;
        text-shadow: 0 0 8px #F59E0B;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.95;
        text-shadow: 0 0 5px #F59E0B;
    }
    75% {
        transform: scale(1.1);
        opacity: 1;
        text-shadow: 0 0 6px #F59E0B;
    }
}