/* 
    AnimeSynchroDE v2 — Global Styles
    Variables, Reset, Background & Animations
*/

:root {
    --bg-dark: #0a0a14;
    --bg-card: #111126;
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-hover: rgba(255, 255, 255, 0.09);
    --border-glass: rgba(255, 255, 255, 0.08);
    
    /* Default Purple Theme */
    --accent-1: #c084fc;
    --accent-2: #f472b6;
    --accent-3: #38bdf8;
    --mesh-1: rgba(192, 132, 252, 0.12);
    --mesh-2: rgba(244, 114, 182, 0.1);
    
    --accent-red: #ef4444;
    --text-primary: #f0f0ff;
    --text-secondary: #a0a0c0;
    --text-muted: #6060a0;
    --shadow-glow: 0 0 40px rgba(192, 132, 252, 0.15);
    --radius-card: 16px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Mesh */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 20%, var(--mesh-1) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 80%, var(--mesh-2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.fade-in { animation: fadeIn 0.5s ease both; }

/* --- BRANDING ANIMATIONS --- */
@keyframes brandingGlow {
    0%, 100% { 
        filter: drop-shadow(0 0 8px rgba(192, 132, 252, 0.5));
        text-shadow: 0 0 10px rgba(192, 132, 252, 0.3);
    }
    50% { 
        filter: drop-shadow(0 0 20px rgba(192, 132, 252, 0.8)) hue-rotate(10deg);
        text-shadow: 0 0 20px rgba(192, 132, 252, 0.6), 0 0 40px rgba(244, 114, 182, 0.4);
    }
}

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

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: 0.3s;
}

.site-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255,255,255,0.03); /* Placeholder look */
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-text, .accent-text {
    display: inline-block;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3), var(--accent-1));
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: brandingGlow 5s ease-in-out infinite, textShimmer 12s linear infinite;
    font-weight: 800;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-text:hover, .accent-text:hover {
    animation: brandingGlow 2s ease-in-out infinite, textShimmer 4s linear infinite;
    transform: scale(1.05) translateY(-1px);
}

/* Scrollbar */
::-webkit-scrollbar-thumb:hover { background: rgba(192, 132, 252, 0.5); }

.loader-mini {
    display: block;
    border: 2px solid rgba(255,255,255,0.1);
    border-top: 2px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
}

/* AniWorld / Anti-Cache Force Hide */
[class*="aniworld"], [class*="anicloud"], .provider-anicloud, .provider-aniworld, 
.stream-badge-mini:empty, .source-tag {
    display: none !important;
}

/* --- SKELETON & LOADING --- */
@keyframes skeletonPulse {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.03) 25%, 
        rgba(255,255,255,0.08) 50%, 
        rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s infinite linear;
    border-radius: 12px;
}

.skeleton-card {
    aspect-ratio: 2/3;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* --- PAGE TRANSITIONS --- */
.page-enter {
    animation: pageEnter 0.4s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes pageEnter {
    from { opacity: 0; transform: scale(0.98) translateY(10px); filter: blur(5px); }
    to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

.grid-item-enter {
    animation: gridItemEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

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

/* --- 3D INTERACTION & GLOW --- */
.anime-grid {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.anime-card {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out, box-shadow 0.3s ease;
    will-change: transform;
}

.anime-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
    filter: blur(15px);
}

.anime-card:hover::before {
    opacity: 0.15;
}

.mouse-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    background: radial-gradient(
        300px circle at var(--mouse-x) var(--mouse-y),
        rgba(192, 132, 252, 0.1),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 20px;
}

.anime-card:hover .mouse-glow {
    opacity: 1;
}

/* Detail View Responsiveness ... */
.hero-wrapper { min-height: 600px; padding-top: 80px; }
.hero-info h1 { font-size: 4.5rem; line-height: 1.1; }

@media (max-width: 1024px) {
    .hero-wrapper .app-container { flex-direction: column !important; gap: 30px !important; text-align: center !important; }
    .hero-info h1 { font-size: 3rem !important; }
    .hero-actions { justify-content: center !important; }
    .poster-container { flex: 0 0 250px !important; width: 200px !important; margin: 0 auto; }
    
    .detail-page-grid { grid-template-columns: 1fr !important; gap: 30px !important; }
}

@media (max-width: 768px) {
    .hero-info h1 { font-size: 2.2rem !important; }
    .hero-wrapper { min-height: auto !important; padding-bottom: 40px !important; }
    .detail-tabs { gap: 20px !important; }
    .tab-item { font-size: 1rem !important; }
}

@media (max-width: 480px) {
    .hero-info h1 { font-size: 1.8rem !important; }
    .poster-container { flex: 0 0 180px !important; width: 150px !important; }
}

/* --- COOKIE BANNER --- */
.v2-cookie-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 650px;
    padding: 25px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 25px;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(25px);
    border-radius: 20px;
}

.cookie-content { flex: 1; }
.cookie-title { margin: 0 0 5px 0; color: var(--accent-1); font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.cookie-text { margin: 0; font-size: 0.85rem; opacity: 0.7; line-height: 1.5; }
.cookie-actions { display: flex; gap: 12px; flex-shrink: 0; }

@media (max-width: 768px) {
    .v2-cookie-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 20px;
        bottom: 10px;
        width: calc(100% - 20px);
    }
    .cookie-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    .cookie-actions .btn {
        flex: 1;
        min-width: 120px;
        padding: 12px !important;
        font-size: 0.8rem;
    }
    .cookie-title { justify-content: center; }
}
