/* VTUCrack Dashboard Styles (V1.0) */

/* Animation Keyframes */
@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fade-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fade-in 0.3s ease-out;
}

.animate-fade-out {
    animation: fade-out 0.2s ease-out;
}

.animate-slide-up {
    animation: slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-slide-down {
    animation: slide-down 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Leaderboard Modal Specific Styles */
#leaderboard-modal-overlay {
    animation: fade-in 0.3s ease-out;
}

#leaderboard-modal-overlay.animate-fade-out {
    animation: fade-out 0.2s ease-out;
}

/* Utility Classes */
.cursor-pointer {
    cursor: pointer;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.05) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

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

    100% {
        background-position: -200% 0;
    }
}

/* Glass Card Effects */
.card-glass {
    background: rgba(17, 17, 24, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-glass:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Smooth Transitions */
* {
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom Scrollbar for Leaderboard Modal (simple, stable) */
.leaderboard-modal-shell {
    max-height: 92vh;
}

.leaderboard-scroll {
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-width: none;
    scrollbar-color: transparent transparent;
    scrollbar-gutter: stable;
}

.leaderboard-scroll::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none;
}

.leaderboard-scroll::-webkit-scrollbar-track {
    background: transparent !important;
}

.leaderboard-scroll::-webkit-scrollbar-thumb {
    background: transparent !important;
    border-radius: 999px;
}

/* Hide marks table horizontal scrollbar line while preserving scroll. */
.marks-scroll-hidden {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.marks-scroll-hidden::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    #leaderboard-modal-overlay>div {
        max-width: 95vw !important;
        margin: 1rem;
    }

    .leaderboard-scroll,
    .marks-scroll-hidden {
        -webkit-overflow-scrolling: touch;
    }

    button,
    input,
    select,
    textarea,
    a {
        min-height: 44px;
    }

    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    table tbody {
        display: table;
        width: 100%;
    }
}

@media (max-width: 480px) {
    #leaderboard-modal-overlay>div {
        max-width: 98vw !important;
        margin: 0.5rem;
    }
}