:root {
    --bg-color: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent: #bd00ff;
    --accent-glow: rgba(189, 0, 255, 0.4);
    --secondary-accent: #00f3ff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(-45deg, #000000, #2c003e, #1a0b2e, #0f0f1a);
    background-size: 100% 100%;
    /* Reduced from 400% to avoid large layer painting */
    /* animation: gradientBG 8s ease infinite; - DISABLED for performance */
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* 
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
} 
*/

/* --- Glow Effects --- */
.glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--accent);
    filter: blur(80px);
    /* Reduced from 150px for performance */
    border-radius: 50%;
    z-index: -1;
    opacity: 0.15;
    /* Slightly reduced opacity */
    /* animation: pulseGlow 10s infinite alternate; - Removed for performance */
    will-change: transform;
    /* Hint for browser */
}

.glow-1 {
    top: -100px;
    left: -100px;
    background: var(--secondary-accent);
}

.glow-2 {
    bottom: 0;
    right: 0;
    background: var(--accent);
}

/*
@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.2; }
    100% { transform: scale(1.5); opacity: 0.1; }
}
*/

/* --- Decorations --- */
/* Kawaii Background Layer - Removed for performance */
.kawaii-bg-layer {
    display: none;
}

/* --- Navigation --- */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 10, 0.95);
    /* Solid semi-transparent background */
    /* backdrop-filter: blur(15px); - REMOVED FOR PERFORMANCE */
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.scrolled .glass-nav {
    padding: 1rem 5%;
    background: rgba(10, 10, 10, 0.98);
}

.logo-text {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -1px;
}

.logo-accent {
    color: var(--accent);
    font-weight: 800;
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 800;
    /* Bolder */
    font-size: 1.2rem;
    /* Bigger */
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.nav-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.search-bar {
    position: relative;
    background: var(--glass-bg);
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    width: 400px;
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    width: 500px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px var(--accent-glow);
}

.search-bar i {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    margin-left: 0.8rem;
    font-family: var(--font-main);
    width: 100%;
    font-size: 1.1rem;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    z-index: 10;
}

.badge {
    background: rgba(189, 0, 255, 0.15);
    color: var(--accent);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    text-transform: uppercase;
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin: 1.5rem 0;
    font-weight: 800;
}

.text-gradient {
    background: linear-gradient(90deg, var(--secondary-accent), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    border: none;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: white;
    margin-left: 1rem;
}

.btn-secondary:hover {
    background: var(--glass-bg);
}

.hero-card-visual {
    position: relative;
    width: 400px;
    height: 550px;
    border-radius: 20px;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
    box-shadow: -20px 20px 60px rgba(0, 0, 0, 0.5);
    background: #222;
    /* Placeholder bg */
}

.hero-card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    border: 2px solid var(--glass-border);
}

.hero:hover .hero-card-visual {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

/* --- Trending Section --- */
.container {
    padding: 5rem 5%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
}

h2 {
    font-size: 2rem;
}

.fire-icon {
    color: #ff4d4d;
}

.view-all {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.view-all:hover {
    color: var(--accent);
}

.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
}

.anime-card {
    cursor: pointer;
    transition: transform 0.3s;
}

.anime-card:hover {
    transform: translateY(-10px);
}

.card-image {
    position: relative;
    height: 320px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.anime-card:hover .card-image img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    /* Darker to compensate for lack of blur */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    /* backdrop-filter: blur(2px); - REMOVED FOR PERFORMANCE */
}

.anime-card:hover .card-overlay {
    opacity: 1;
}

.play-mini {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transform: scale(0.8);
    transition: all 0.3s;
}

.anime-card:hover .play-mini {
    transform: scale(1);
}

.rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #ffd700;
}

.card-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.card-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- UwU Button --- */

.uwu-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 2rem 5rem;
    font-size: 3rem;
    font-weight: 800;
    color: white;
    background: linear-gradient(45deg, #ff00cc, #333399);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 0 20px rgba(255, 0, 204, 0.5);
    animation: heartbeat 1.5s infinite;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: var(--font-main);
    letter-spacing: 2px;
}

.uwu-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 40px rgba(255, 0, 204, 0.8);
    background: linear-gradient(45deg, #ff33dd, #4444aa);
}

.uwu-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.uwu-emoji {
    display: inline-block;
    animation: rotateEmoji 3s infinite linear;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

@keyframes heartbeat-static {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes rotateEmoji {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(10deg);
    }

    75% {
        transform: rotate(-10deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* --- Details Page --- */
.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent);
}

.meta-info {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: white;
}

.meta-info i {
    color: var(--accent);
    margin-right: 0.5rem;
}

/* Season Selector */
.season-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.season-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: var(--font-main);
}

.season-tab:hover {
    color: white;
    background: var(--glass-bg);
}

.season-tab.active {
    color: white;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Episode Grid */
.episodes-container h3 {
    margin-bottom: 1.5rem;
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.episode-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-family: var(--font-main);
}

.episode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    border-color: var(--accent);
}

.episode-number {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}


.episode-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Big Animated Title */
.uwu-title-container {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding: 2rem 0;
}

.uwu-big-title {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(45deg, #ff00cc, #3333ff, #ff00cc);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShimmer 3s linear infinite, floatTitle 6s ease-in-out infinite;
    position: relative;
    display: inline-block;
    z-index: 2;
}

@keyframes textShimmer {
    to {
        background-position: 200% center;
    }
}

@keyframes floatTitle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.cat-decoration {
    position: absolute;
    width: 60px;
    height: auto;
    z-index: 3;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    pointer-events: none;
}

.cat-sleep {
    top: -25px;
    right: -20px;
    transform: rotate(10deg);
}

.cat-peek {
    bottom: -10px;
    left: -30px;
    transform: rotate(-15deg);
}

@media (max-width: 768px) {
    .uwu-big-title {
        font-size: 2.5rem;
    }

    .cat-decoration {
        width: 40px;
    }

    .cat-sleep {
        top: -15px;
        right: -10px;
    }

    .cat-peek {
        bottom: -5px;
        left: -15px;
    }
}

/* Hero Redesign */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10% 8% 5%;
    /* Adjusted padding */
    position: relative;
    min-height: 60vh;
    /* Ensure some height */
}

.hero-content-simple {
    flex: 1;
    max-width: 60%;
}

.hero-slogan {
    font-size: 5rem;
    /* Big */
    font-weight: 800;
    line-height: 1.1;
    color: white;
}

.text-pink {
    color: #ff00cc;
    /* Bright Pink */
    text-shadow: 0 0 20px rgba(255, 0, 204, 0.4);
}

.hero-action-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    /* Align right */
    align-items: center;
    position: relative;
}

/* Adjust UwU Button for new layout if needed */
.hero-action-right .uwu-btn {
    position: relative;
    left: auto;
    top: auto;
    transform: scale(1.2);
    /* Make it slightly bigger */
    margin: 0;
}

.hero-action-right .uwu-btn:hover {
    transform: scale(1.3);
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }

    .hero-content-simple {
        max-width: 100%;
        margin-bottom: 3rem;
    }

    .hero-slogan {
        font-size: 3rem;
    }

    .hero-action-right {
        justify-content: center;
    }
}

/* Video Player Styles */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Controls Header (Seasons + Language) */
.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.season-selector {
    margin-bottom: 0;
    /* Reset previous margin */
    border-bottom: none;
    /* Reset previous border */
    padding-bottom: 0;
}

.language-selector {
    display: flex;
    gap: 0.5rem;
    background: var(--glass-bg);
    padding: 0.3rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.lang-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: all 0.2s;
    font-family: var(--font-main);
}

.lang-tab:hover {
    color: white;
}

.lang-tab.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* --- Comments Section --- */
.comment-form-container {
    background: var(--glass-bg);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 3px solid var(--accent);
    display: flex;
    gap: 1rem;
    transition: transform 0.2s;
}

.comment-card:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.06);
}

.comment-avatar {
    width: 45px;
    height: 45px;
    background: var(--glass-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    align-items: baseline;
}

.comment-author {
    font-weight: 800;
    color: white;
    font-size: 1.1rem;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.comment-text {
    line-height: 1.5;
    color: #e0e0e0;
}

/* Form Styles */
.form-row {
    margin-bottom: 1rem;
    display: flex;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.delete-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    padding: 0.2rem;
    border-radius: 4px;
}

.delete-btn:hover {
    color: #ff3333;
    /* Red color on hover */
    background: rgba(255, 51, 51, 0.1);
}

/* Spoiler Styles */
.spoiler-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

.spoiler-content {
    transition: all 0.3s ease;
}

.spoiler-content.is-blurred {
    filter: blur(5px);
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    color: transparent;
    user-select: none;
    position: relative;
    border-radius: 4px;
}

.spoiler-content.is-blurred::after {
    content: "⚠️ Spoiler (Cliquer pour voir)";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff4d4d;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
}

.spoiler-tag {
    background: #ff4d4d;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 0.5rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* Dynamic Background */
#dynamic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.5s ease;
}

#dynamic-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(16, 18, 27, 0.95) 0%, rgba(16, 18, 27, 0.8) 100%);
    backdrop-filter: blur(5px);
}

/* Header Decorations */
.header-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    /* Push to the right */
    padding-right: 1rem;
}

.header-icon {
    height: 35px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.header-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

/* --- History Card --- */
.history-card {
    background: rgba(255, 255, 255, 0.05);
    /* Glass effect */
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    width: 350px;
    max-width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    animation: floatHistory 6s ease-in-out infinite;
}

.history-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.history-label {
    display: block;
    font-size: 0.9rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

#history-title {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
    color: white;
}

#history-episode {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

@keyframes floatHistory {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}