/* ===========================
   AnimeVault – Core Styles
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');

/* --- Design Tokens --- */
:root {
    --neon-cyan: #00f2ff;
    --neon-magenta: #ff00ea;
    --neon-purple: #7000ff;
    --neon-green: #39ff14;
    --bg-dark: #020617;
}

/* --- Base --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: #f8fafc;
    background-image: radial-gradient(circle at 50% -20%, #1e1b4b 0%, #020617 80%);
    overflow-x: hidden;
    transition: background-color 0.5s ease;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); filter: blur(4px); }
    to   { opacity: 1; transform: translateY(0);    filter: blur(0);  }
}

.animate-item {
    animation: fadeInUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.3); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--neon-purple), var(--neon-cyan));
    border-radius: 10px;
}

/* --- Glass Card --- */
.glass-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- List / Expanded Card --- */
.expanded {
    grid-column: 1 / -1;
    width: 100%;
    z-index: 50;
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5);
}

.anime-card-content {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.expanded .anime-card-content {
    max-height: 5000px;
    opacity: 1;
    padding-top: 1.5rem;
}

/* --- Grid Poster --- */
.grid-poster {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s;
    aspect-ratio: 2/3;
    background: #020617;
}

.grid-poster:hover {
    transform: translateY(-8px);
    border-color: var(--neon-cyan);
    box-shadow: 0 10px 30px -5px rgba(0, 242, 255, 0.2);
}

.grid-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-score-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s;
    z-index: 20;
}

.grid-poster:hover .grid-score-overlay { opacity: 1; }

/* --- Layout Toggle --- */
.layout-active {
    background: var(--neon-cyan) !important;
    color: black !important;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
}

/* --- Filter Pills --- */
.genre-pill {
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.genre-pill.active {
    background: rgba(0, 242, 255, 0.1);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

/* --- Dropdown Menus --- */
#genreDropdownMenu,
#statusDropdownMenu,
#airingDropdownMenu {
    display: none;
    padding-top: 12px;
}

#genreDropdown:hover #genreDropdownMenu,
#statusDropdown:hover #statusDropdownMenu,
#airingDropdown:hover #airingDropdownMenu {
    display: block;
    animation: fadeInUp 0.3s forwards;
}

/* --- Checkbox --- */
.neon-checkbox {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.4);
}

.neon-checkbox:checked {
    background-color: var(--neon-cyan);
    border-color: var(--neon-cyan);
}

.neon-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: #000;
    font-weight: 900;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* --- Status Indicators --- */
.status-watching { border-left: 4px solid var(--neon-purple); }
.status-watched  { border-left: 4px solid var(--neon-cyan); }

/* --- Transitions --- */
.switching { opacity: 0; pointer-events: none; }

/* --- Modal --- */
.modal-bg {
    background-color: rgba(2, 6, 23, 0.96);
    backdrop-filter: blur(14px);
}

/* --- Lazy-load image placeholder --- */
.lazy-img {
    opacity: 0;
    transition: opacity 0.4s ease-in;
}

.lazy-img.loaded {
    opacity: 1;
}

/* --- Infinite scroll sentinel --- */
.scroll-sentinel {
    height: 1px;
    width: 100%;
    visibility: hidden;
}
