/* =========================================
   Berry Rift — Global Design System
   ========================================= */

/* === @property for animated CSS variables === */
@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* =========================================
   1. DESIGN TOKENS
   ========================================= */
:root {
    /* --- Depth System (Backgrounds) --- */
    --bg-base:       #07070c;
    --bg-raised:     #0d0d14;
    --surface-1:     #13131d;
    --surface-2:     #1a1a27;
    --surface-3:     #222233;

    /* --- Glass System --- */
    --glass-bg:        rgba(13, 13, 20, 0.65);
    --glass-border:    rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    --glass-blur:      20px;
    --glass-blur-heavy: 40px;

    /* --- Berry Accent Palette --- */
    --accent:           #e8005e;
    --accent-light:     #ff2d8a;
    --accent-dark:      #b80050;
    --accent-glow:      rgba(232, 0, 94, 0.35);
    --accent-surface:   rgba(232, 0, 94, 0.08);
    --accent-border:    rgba(232, 0, 94, 0.25);

    /* --- Harmony Colors --- */
    --harmony-purple:      #8b5cf6;
    --harmony-purple-glow: rgba(139, 92, 246, 0.3);
    --harmony-cyan:        #06b6d4;
    --harmony-cyan-glow:   rgba(6, 182, 212, 0.3);
    --harmony-gold:        #f59e0b;

    /* --- Gradient Presets --- */
    --gradient-accent:      linear-gradient(135deg, var(--accent) 0%, var(--harmony-purple) 100%);
    --gradient-accent-text: linear-gradient(135deg, var(--accent) 0%, #b122e5 100%);
    --gradient-surface:     linear-gradient(135deg, var(--surface-1) 0%, var(--bg-raised) 100%);
    --gradient-hero-fade:   linear-gradient(to right, var(--bg-base) 20%, transparent 65%);
    --gradient-card-overlay: linear-gradient(to top, var(--bg-base) 0%, transparent 100%);
    --gradient-glow:        radial-gradient(ellipse at 50% 0%, rgba(232, 0, 94, 0.08), transparent 60%);

    /* --- Typography --- */
    --text-primary:   #f0f0f5;
    --text-secondary: #a8a8b8;
    --text-tertiary:  #6b6b80;
    --text-muted:     #45455a;

    /* --- Spacing & Radii --- */
    --radius-xs:   6px;
    --radius-sm:   10px;
    --radius-md:   14px;
    --radius-lg:   18px;
    --radius-xl:   24px;
    --radius-full: 9999px;

    /* --- Transitions --- */
    --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast:   0.2s;
    --duration-normal: 0.4s;
    --duration-slow:   0.6s;
    --transition:      all var(--duration-normal) var(--ease-out);

    /* --- Shadows --- */
    --shadow-sm:     0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md:     0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg:     0 16px 40px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 8px 25px var(--accent-glow);

    /* --- Legacy Compatibility Aliases --- */
    --bg: var(--bg-base);
    --surface: var(--surface-1);
    --surface-glass: var(--glass-bg);
    --text-main: var(--text-secondary);
    --text-bright: var(--text-primary);
    --text-dim: var(--text-tertiary);
    --shadow-premium: var(--shadow-lg);

    /* --- Semantic Colors --- */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* --- Typography Scale --- */
    --font-size-hero: clamp(2.4rem, 5.6vw, 4.2rem);
    --font-size-h1: clamp(1.9rem, 4vw, 3rem);
    --font-size-h2: clamp(1.35rem, 2.8vw, 1.8rem);
    --font-size-body: 1rem;
    --font-size-caption: 0.86rem;

    /* --- Spacing Scale --- */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;

    /* --- Motion Tiers --- */
    --duration-micro: 0.15s;
    --duration-standard: 0.3s;
    --duration-expressive: 0.55s;
}


/* =========================================
   2. GLOBAL RESET & BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-base);
    color: var(--text-secondary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    opacity: 0;
    animation: pageFadeIn 0.8s ease forwards;
}

body.search-open { overflow: hidden; }


/* =========================================
   3. ANIMATIONS
   ========================================= */
@keyframes pageFadeIn {
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

@keyframes borderRotate {
    to { --border-angle: 360deg; }
}

@keyframes shimmerSweep {
    0%, 100% { left: -100%; }
    50% { left: 150%; }
}

@keyframes borderPulse {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.8; }
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 4px var(--accent-glow); }
    50% { box-shadow: 0 0 12px var(--accent); }
}

@keyframes cardStagger {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeInUp 0.8s var(--ease-out) forwards; }


/* =========================================
   4. AMBIENT BACKGROUND (CSS-Only Orbs)
   ========================================= */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
    will-change: transform;
    animation: float var(--orb-duration, 25s) ease-in-out infinite alternate;
}

.orb-1 {
    width: 500px; height: 500px;
    background: var(--accent);
    top: -10%; left: -5%;
    --orb-duration: 25s;
}

.orb-2 {
    width: 400px; height: 400px;
    background: var(--harmony-purple);
    bottom: -15%; right: -8%;
    --orb-duration: 30s;
    animation-delay: -8s;
}

.orb-3 {
    width: 350px; height: 350px;
    background: var(--harmony-cyan);
    top: 40%; left: 50%;
    --orb-duration: 35s;
    animation-delay: -15s;
    opacity: 0.06;
}

@keyframes float {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(30px, -40px) scale(1.05); }
    66%  { transform: translate(-20px, 25px) scale(0.95); }
    100% { transform: translate(15px, -15px) scale(1.02); }
}

/* Disable orbs on watch page for GPU priority */
body.watch-active .ambient-bg { display: none; }

@media (prefers-reduced-motion: reduce) {
    .orb { animation: none; }
    body { animation: none; opacity: 1; }
}


/* =========================================
   5. SCROLLBAR
   ========================================= */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: 10px;
    border: 2px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }


/* =========================================
   6. ACCESSIBILITY
   ========================================= */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    box-shadow: 0 0 15px var(--accent-glow);
}


/* =========================================
   7. MICRO-INTERACTIONS
   ========================================= */
.btn:active,
.anime-card:active,
.episode-row:active,
.close-search:active,
.search-trigger:active,
.search-result-row:active,
.tab:active,
.tool-btn:active,
.dropdown-item:active {
    transform: scale(0.97) !important;
}


/* =========================================
   8. NAVIGATION
   ========================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur-heavy));
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
    border-bottom: 1px solid var(--glass-border);
    padding: 0.8rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color var(--duration-standard) ease, background-color var(--duration-standard) ease;
}

.logo {
    font-size: clamp(1.4rem, 4vw, 1.7rem);
    font-weight: 900;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 8px var(--accent-glow));
    transition: transform var(--duration-normal) var(--ease-out);
}

.logo:hover img {
    transform: scale(1.15);
}

.logo span {
    background: var(--gradient-accent-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 10px rgba(232, 0, 94, 0.3));
}

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--duration-standard) ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

.nav-right { display: flex; align-items: center; justify-content: center; gap: 1.5rem; }

.search-trigger {
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-trigger:hover { color: var(--accent); }

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
    position: relative;
}
.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: left center;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg); width: 28px; }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg); width: 28px; }


/* =========================================
   9. SEARCH OVERLAY (Spotlight Style)
   ========================================= */
.search-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6vh 5% 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}
.search-overlay.active { opacity: 1; visibility: visible; }

.search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 650px;
    margin-bottom: 1rem;
    position: relative;
}
.search-input-wrapper { flex: 1; position: relative; }
.search-input {
    width: 100%;
    background: var(--surface-1);
    border: 1px solid var(--glass-border);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(232, 0, 94, 0.2);
}
.search-input::placeholder { color: var(--text-tertiary); font-weight: 400; }

.close-search {
    cursor: pointer;
    color: var(--text-tertiary);
    transition: var(--transition);
    background: var(--surface-1);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.close-search:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
}

.search-results {
    width: 100%;
    max-width: 650px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 2rem;
}
.search-results::-webkit-scrollbar { display: none; }

.search-result-row {
    background: var(--surface-1);
    border-radius: var(--radius-sm);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: background var(--duration-fast) ease;
    border: 1px solid var(--glass-border);
}
.search-result-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border-hover);
}

.search-thumb {
    width: 100px;
    aspect-ratio: 16/9;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-base);
    flex-shrink: 0;
}
.search-thumb img { width: 100%; height: 100%; object-fit: cover; }

.search-info { display: flex; flex-direction: column; justify-content: center; }
.search-info h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 4px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.search-info p { font-size: 0.8rem; color: var(--text-tertiary); font-weight: 400; }


/* =========================================
   10. MOBILE BOTTOM SHEET & OVERLAY
   ========================================= */
.mobile-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.mobile-overlay.active { opacity: 1; visibility: visible; }

.mobile-nav {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid var(--glass-border);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    z-index: 999;
    padding: 1rem 1.5rem 3.5rem;
    transform: translateY(100%);
    transition: transform var(--duration-normal) var(--ease-out);
    display: flex;
    flex-direction: column;
    gap: 0;
    height: auto;
    right: 0;
}
.mobile-nav.active {
    transform: translateY(0);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

.mobile-nav-handle {
    width: 40px;
    height: 4px;
    background: var(--text-tertiary);
    border-radius: 2px;
    margin: 0 auto 1.5rem;
    opacity: 0.3;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem 0.5rem;
    text-decoration: none;
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}
.mobile-nav-link:last-child { border-bottom: none; }
.mobile-nav-link:active { background: var(--accent-surface); }

.mobile-nav-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.mobile-nav-link span {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-nav-link .chevron {
    color: var(--text-tertiary);
    opacity: 0.5;
    transition: var(--transition);
}

.mobile-nav-link.active .mobile-nav-icon {
    color: var(--accent);
    background: var(--accent-surface);
}
.mobile-nav-link.active span { color: var(--accent); }
.mobile-nav-link.active .chevron {
    color: var(--accent);
    opacity: 1;
    transform: translateX(3px);
}


/* =========================================
   11. TOAST NOTIFICATIONS
   ========================================= */
.toast {
    position: fixed;
    bottom: 30px;
    right: -400px;
    background: rgba(13, 13, 20, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-left: 4px solid var(--accent);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 3000;
    box-shadow: -5px 10px 30px rgba(0,0,0,0.5);
    transition: right var(--duration-normal) var(--ease-out), opacity var(--duration-normal) ease;
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.toast.show { right: 30px; opacity: 1; }
.toast svg { color: var(--accent); width: 20px; height: 20px; flex-shrink: 0; }

@media (max-width: 600px) {
    .toast {
        bottom: 20px;
        right: -100%;
        width: calc(100% - 40px);
        border-left: none;
        border-bottom: 4px solid var(--accent);
        justify-content: center;
    }
    .toast.show { right: 20px; }
}


/* =========================================
   12. NOTIFICATION SYSTEM
   ========================================= */
.notification-trigger {
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.notification-trigger:hover { color: var(--accent); }

.notification-badge {
    position: absolute;
    top: 0px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 0 8px var(--accent);
}
.notification-badge.active {
    opacity: 1;
    animation: badgePulse 2s infinite;
}

.notifications-dropdown {
    position: fixed;
    top: 70px;
    right: 5%;
    width: 350px;
    max-height: 400px;
    background: rgba(19, 19, 29, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.notifications-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.notifications-dropdown::-webkit-scrollbar { width: 6px; }

.notifications-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--glass-border);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.notifications-clear {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color var(--duration-fast);
}
.notifications-clear:hover { color: var(--accent); }

.notification-item {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    gap: 12px;
    transition: background var(--duration-fast);
}
.notification-item:hover { background: rgba(255,255,255,0.05); }
.notification-item:last-child { border-bottom: none; }

.notif-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
}
.notif-icon.info    { background: rgba(59, 130, 246, 0.1);  color: #3b82f6; border-color: rgba(59, 130, 246, 0.3); }
.notif-icon.success { background: rgba(16, 185, 129, 0.1);  color: #10b981; border-color: rgba(16, 185, 129, 0.3); }
.notif-icon.warning { background: rgba(245, 158, 11, 0.1);  color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); }
.notif-icon.error   { background: rgba(232, 0, 94, 0.1);    color: var(--accent); border-color: var(--accent-border); }

.notif-content h4 { color: var(--text-primary); margin-bottom: 4px; font-size: 0.95rem; }
.notif-content p { color: var(--text-tertiary); font-size: 0.85rem; line-height: 1.4; }
.notif-time { display: block; font-size: 0.75rem; color: rgba(255,255,255,0.4); margin-top: 6px; }
.no-notifs { padding: 30px; text-align: center; color: var(--text-tertiary); font-size: 0.9rem; }

@media (max-width: 600px) {
    .notifications-dropdown { right: 2%; width: 96%; }
}


/* =========================================
   13. SKELETON & LOADING
   ========================================= */
.skeleton {
    background: linear-gradient(90deg, var(--surface-1) 25%, var(--surface-2) 50%, var(--surface-1) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--glass-border);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}


/* =========================================
   14. ANIME CARD SYSTEM
   ========================================= */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 28px;
}

.anime-card {
    position: relative;
    background: var(--surface-1);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    opacity: 0;
    box-shadow: var(--shadow-sm);
}

.anime-card.revealed {
    animation: cardStagger 0.6s var(--ease-out) forwards;
}

.anime-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-border);
    box-shadow: var(--shadow-md), 0 0 0 1px var(--accent-border);
    background: var(--surface-2);
}

.anime-card:hover .card-title {
    color: var(--text-primary);
}

.card-img-container {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
}

.card-img-container img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-out), opacity 0.5s ease;
    opacity: 0;
}

.card-img-container img.loaded { opacity: 1; }

.anime-card:hover .card-img-container img {
    transform: scale(1.08);
    opacity: 0.85;
}

.card-details {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.badge-container {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    z-index: 5;
    max-width: calc(100% - 20px);
}

.badge {
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255,255,255,0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.badge.hd { color: var(--harmony-gold); border-color: rgba(245, 158, 11, 0.3); }
.badge.ep {
    background: var(--accent);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px var(--accent-glow);
}
.badge-new {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #000;
    box-shadow: 0 2px 12px rgba(0, 255, 136, 0.4);
    border: none;
}

.card-title {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.card-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Card overlay variant (used in info/list pages) */
.card-overlay {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 60%;
    background: linear-gradient(transparent, rgba(7, 7, 12, 0.95));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

/* Card play icon overlay */
.card-img-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
    background: rgba(0, 0, 0, 0.3);
}
.anime-card:hover .card-img-overlay { opacity: 1; }

.card-play-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: transform var(--duration-normal) var(--ease-spring);
}
.card-play-icon svg { width: 24px; height: 24px; }
.anime-card:hover .card-play-icon { transform: scale(1.15); }


/* =========================================
   15. SECTION STYLING
   ========================================= */
section {
    padding: 0 5% 4rem;
    max-width: 1800px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
}

.section-title::before {
    content: '';
    width: 4px;
    height: 28px;
    background: var(--gradient-accent);
    border-radius: 4px;
    flex-shrink: 0;
}

.section-hidden { display: none !important; }

/* =========================================
   16. PAGE PRIMITIVES (PROFESSIONAL UI)
   ========================================= */
.page-shell {
    padding: 120px 5% 4rem;
    max-width: 1600px;
    margin: 0 auto;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.page-header h1 {
    color: var(--text-primary);
    font-size: var(--font-size-h1);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    letter-spacing: -0.6px;
}

.panel {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.panel:hover {
    border-color: var(--glass-border-hover);
}

.input-pro,
.select-pro,
.textarea-pro {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    transition: border-color var(--duration-standard) ease, box-shadow var(--duration-standard) ease;
}

.input-pro:focus,
.select-pro:focus,
.textarea-pro:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 0, 94, 0.18);
}

.btn-pro {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.85rem 1.35rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    border: 1px solid transparent;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform var(--duration-standard) var(--ease-out), box-shadow var(--duration-standard) ease, background-color var(--duration-standard) ease;
}

.btn-pro-primary {
    background: var(--gradient-accent);
    color: #fff;
    box-shadow: var(--shadow-accent);
}

.btn-pro-primary:hover {
    transform: translateY(-2px);
}

body.page-cinematic .hero p,
body.page-cinematic .report-details,
body.page-cinematic .card-meta,
body.page-cinematic .feed-count {
    color: #b8b8c7;
}

body.page-cinematic .form-container,
body.page-cinematic .sidebar-section,
body.page-cinematic .error-card,
body.page-cinematic .report-card {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--glass-border);
}

body.page-cinematic .report-card:hover,
body.page-cinematic .catalog-item:hover {
    transform: translateY(-2px);
}

body.page-cinematic .btn-submit,
body.page-cinematic .btn-primary,
body.page-cinematic .btn {
    transition: transform var(--duration-standard) var(--ease-out), box-shadow var(--duration-standard) ease;
}

body.page-cinematic .btn-submit:hover:not(:disabled),
body.page-cinematic .btn-primary:hover {
    transform: translateY(-2px);
}


/* =========================================
   17. TYPOGRAPHY UTILITY CLASSES
   ========================================= */
.text-display  { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -2px; line-height: 1.05; }
.text-h1       { font-size: clamp(1.8rem, 4vw, 3rem);   font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.text-h2       { font-size: clamp(1.3rem, 3vw, 1.75rem); font-weight: 700; line-height: 1.2; }
.text-h3       { font-size: clamp(1rem, 2.5vw, 1.25rem); font-weight: 700; line-height: 1.3; }
.text-body     { font-size: 1rem;    font-weight: 400; line-height: 1.6; }
.text-caption  { font-size: 0.85rem; font-weight: 500; line-height: 1.4; }
.text-micro    { font-size: 0.75rem; font-weight: 600; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.5px; }


/* =========================================
   18. UTILITY CLASSES
   ========================================= */
.hidden { display: none !important; }


/* =========================================
   19. RESPONSIVE — MOBILE
   ========================================= */
@media (max-width: 850px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}

/* Ultra-Wide */
@media (min-width: 2000px) {
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 35px;
    }
}
@media (min-width: 2560px) {
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    section { padding-left: 8%; padding-right: 8%; max-width: 2200px; }
}
