/* =============================================
   PhantomsAnime — Styles
   ============================================= */

body {
    font-family: 'Inter', 'system-ui', 'sans-serif';
    background-color: #000000;
    color: #e2e8f0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
    background: #2d2d2d;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #444444;
}

/* Glass panel — lighter for performance */
.glass-panel {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (prefers-reduced-motion: reduce) {
    .glass-panel {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* Loader spinner */
.loader {
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-left-color: #eab308;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 0.8s linear infinite;
}

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

/* Anime card hover — reduced shadow for perf */
.anime-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    will-change: transform;
}
.anime-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px -4px rgba(234, 179, 8, 0.25);
}
.anime-card img {
    transition: transform 0.4s ease;
}
.anime-card:hover img {
    transform: scale(1.04);
}

/* Pagination */
.page-btn {
    transition: background 0.15s ease, color 0.15s ease;
}
.page-btn.active {
    background: #eab308;
    color: #000;
    border-color: #eab308;
}

/* --- PERFORMANCE: Reduce motion for accessibility --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .anime-card:hover {
        transform: none;
    }
    .anime-card:hover img {
        transform: none;
    }
}

/* --- PERFORMANCE: No backdrop-blur on low-end devices --- */
@media (max-width: 640px) {
    .glass-panel {
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
}

/* toast animation */
#globalToast, #serverToast {
    will-change: transform, opacity;
}
