/* Main Frontend Styles - Crunchyroll Inspired Dark Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-orange: #f47521;
    --primary-hover: #ff8533;
    --dark-bg: #0b0b0b;
    --dark-secondary: #141519;
    --dark-card: #1a1a1f;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #6b6b6b;
    --border-color: #2a2a2a;
    --overlay-bg: rgba(0, 0, 0, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Header Navigation */
.main-header {
    background: var(--dark-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-orange);
    text-decoration: none;
}

.logo span {
    color: var(--text-primary);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-orange);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-orange);
}

.search-bar {
    display: flex;
    gap: 12px;
}

.search-bar input {
    padding: 10px 16px;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    width: 300px;
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-orange);
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

/* Hero/Featured Slider */
.hero-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
    margin-bottom: 40px;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slide.active {
    opacity: 1;
}

.slide-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4);
}

.slide-content {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}

.slide-content h2 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.slide-content p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 24px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.slide-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.meta-tag {
    padding: 6px 12px;
    background: rgba(244, 117, 33, 0.2);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-orange);
}

.slide-buttons {
    display: flex;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background: var(--primary-orange);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 117, 33, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.slider-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--primary-orange);
    width: 32px;
    border-radius: 6px;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Sections */
.section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.view-all {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.view-all:hover {
    color: var(--primary-hover);
}

/* Anime Grid */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.anime-card {
    background: var(--dark-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.anime-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(244, 117, 33, 0.3);
}

.anime-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.anime-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.anime-card:hover .anime-poster img {
    transform: scale(1.1);
}

.anime-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    background: var(--primary-orange);
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
}

.anime-info {
    padding: 16px;
}

.anime-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anime-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Episode Grid */
.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.episode-card {
    background: var(--dark-card);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.episode-card:hover {
    transform: translateX(4px);
    background: var(--dark-secondary);
}

.episode-thumbnail {
    width: 150px;
    height: 85px;
    object-fit: cover;
    flex-shrink: 0;
}

.episode-details {
    padding: 12px;
    flex: 1;
}

.episode-number {
    font-size: 14px;
    color: var(--primary-orange);
    font-weight: 700;
    margin-bottom: 4px;
}

.episode-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.episode-date {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Footer */
.main-footer {
    background: var(--dark-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 20px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--primary-orange);
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--primary-orange);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--dark-secondary);
        padding: 20px 24px;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }

    .main-nav.active {
        transform: translateY(0);
    }

    .main-nav ul {
        flex-direction: column;
        gap: 16px;
    }

    .search-bar input {
        width: 100%;
    }

    .hero-slider {
        height: 350px;
    }

    .slide-content h2 {
        font-size: 32px;
    }

    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }

    .episode-grid {
        grid-template-columns: 1fr;
    }
}