/* 
    Aniwatch TV - Premium CSS Stylesheet
    Author: Antigravity (AI)
    Description: Modern, responsive dark theme for anime streaming.
*/

:root {
    /* Color Palette - Anime Sama Inspired */
    --bg-dark: #0f0f13;
    --bg-card: #1a1a20;
    --primary: #8b5cf6; /* Vivid Purple */
    --primary-glow: rgba(139, 92, 246, 0.4);
    --secondary: #a78bfa;
    --accent: #f472b6; /* Pink accent */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --white: #ffffff;
    
    /* Gradients */
    --grad-primary: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    --grad-surface: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    
    /* Spacing & Transitions */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.25s ease;
    
    /* Typography */
    --font-main: 'Poppins', sans-serif;
    --font-heading: 'Inter', sans-serif;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* Glassmorphism Utility */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    gap: 8px;
}

.btn-primary {
    background: var(--grad-primary);
    color: var(--white);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Layout Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 80px 0;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(10, 10, 12, 0.9);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Search Bar */
.search-container {
    flex: 1;
    max-width: 400px;
    margin: 0 40px;
    position: relative;
}

.search-bar {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px 10px 45px;
    border-radius: 30px;
    color: var(--white);
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-bar:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Hero Section */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 120px;
    background: radial-gradient(circle at top right, rgba(157, 78, 221, 0.15), transparent),
                radial-gradient(circle at bottom left, rgba(0, 242, 255, 0.05), transparent);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 35px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Features Section */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-muted);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 40px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Popular Anime Section */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.anime-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 2/3;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Badges */
.badge-container {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    z-index: 10;
}

.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-vostfr {
    background: var(--primary);
    color: white;
}

.badge-vf {
    background: #ef4444;
    color: white;
}

.badge-hd {
    background: #10b981;
    color: white;
}

.anime-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.anime-card:hover img {
    transform: scale(1.1);
}

.anime-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    transform: translateY(10px);
    opacity: 0.8;
    transition: var(--transition);
}

.anime-card:hover .anime-info {
    transform: translateY(0);
    opacity: 1;
}

.anime-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.anime-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.rating {
    color: #ffc107;
}

/* About Section */
.about-content {
    max-width: 1100px;
    margin: 0 auto;
}

.about-article {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.05);
}

.about-article p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.about-article h3 {
    margin: 30px 0 15px;
}

.about-article p a {
    color: var(--primary);
    text-decoration: underline;
}

.about-article p a:hover {
    color: var(--secondary);
}

/* FAQ Section */
.faq-container {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 15px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    background: var(--bg-card);
}

.faq-question {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
    color: var(--text-muted);
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 200px;
}

.faq-item.active .faq-question span {
    transform: rotate(180deg);
}

/* Footer */
footer {
    padding: 40px 0;
    background: #050507;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.disclaimer {
    max-width: 800px;
    margin: 20px auto;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Watch Page Styles */
.watch-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    padding-top: 100px;
}

.iframe-container {
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.ad-placeholder {
    background: rgba(255,255,255,0.05);
    border: 2px dashed rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.ad-top {
    width: 728px;
    height: 90px;
    margin: 0 auto 30px;
}

.ad-sidebar {
    width: 300px;
    height: 250px;
    margin-bottom: 20px;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .watch-layout {
        grid-template-columns: 1fr;
    }
    .ad-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .ad-top {
        width: 320px;
        height: 50px;
    }
    
    .sticky-cta {
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
        z-index: 999;
        display: block !important;
    }
}

.sticky-cta {
    display: none;
}
