/* ---------------------------------------------------- */
/* ⭐ IMPORTS AND FONT DEFINITION ⭐           */
/* ---------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* Mangastyle Custom Font Definition */
@font-face {
    font-family: 'Mangastyle'; 
    src: url('/font/mangastyle.woff2') format('woff2'), 
         url('/font/mangastyle.woff') format('woff'),   
         url('/font/mangastyle.ttf') format('truetype'); 
    font-weight: normal; 
    font-style: normal;
    font-display: swap;
}

/* ---------------------------------------------------- */
/* 🎨 ROOT VARIABLES 🎨                 */
/* ---------------------------------------------------- */

:root {
    --primary-bg: #111;
    --secondary-bg: #1a1a1a;
    --text-color: #f0f0f0;
    --accent-color: #e50914; /* Netflix red-like color */
    --light-grey: #aaa;
    --dark-grey: #333;
}

/* ---------------------------------------------------- */
/* 🔄 GLOBAL RESET 🔄                  */
/* ---------------------------------------------------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---------------------------------------------------- */
/* 📄 BASE STYLES 📄                   */
/* ---------------------------------------------------- */

body {
    /* Set body text to Poppins for readability */
    font-family: 'Poppins', sans-serif; 
    background-color: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    color: var(--text-color);
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ---------------------------------------------------- */
/* 🧭 NAVBAR 🧭                    */
/* ---------------------------------------------------- */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background-color: var(--secondary-bg);
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.navbar-left {
    display: flex;
    align-items: center;
}

.navbar .logo {
    /* Oversized logo adjustments */
    width: 70px; 
    height: 70px;
    /* Added background color for the circular logo container */
    border-radius: 50%;
    margin-right: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.8em; 
    margin-top: -15px; 
    margin-bottom: -15px;
}

.navbar nav ul {
    display: flex;
}

.navbar nav ul li {
    margin-right: 25px;
}

.navbar nav ul li a {
    font-size: 1.1em;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.navbar nav ul li a:hover {
    color: var(--light-grey);
}

.navbar-right {
    display: flex;
    align-items: center;
}

.navbar-right a {
    margin-left: 25px;
    font-size: 1.3em;
    transition: color 0.3s ease;
}

.navbar-right a:hover {
    color: var(--light-grey);
}

.navbar-right .profile-icon {
    width: 30px;
    height: 30px;
    background-color: var(--dark-grey);
    border-radius: 50%;
    border: 1px solid var(--light-grey);
}

/* ---------------------------------------------------- */
/* 🎬 HERO SECTION 🎬                   */
/* ---------------------------------------------------- */

.hero-section {
    position: relative;
    width: 100%;
    height: 90vh; 
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-top: 80px; 
}

/* ABOUT PAGE MODIFIER: Hides hero content for an empty background page */
.about-page-modifier .hero-section {
    /* Ensures the empty page still fills the height */
    min-height: 100vh;
}

.about-page-modifier .hero-background-image,
.about-page-modifier .hero-background-overlay,
.about-page-modifier .hero-content {
    /* Hides all image, overlay, text, and button elements */
    display: none !important; 
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 40%, rgba(0,0,0,0.2) 70%, transparent 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding-left: 50px;
    max-width: 600px;
    color: white;
}

.hero-content .season-tag {
    background-color: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.9em;
    font-weight: 600;
}

.hero-content h1 {
    /* Applying the 'Mangastyle' font specifically to the H1 */
    font-family: 'Mangastyle', sans-serif;
    font-size: 4em;
    margin-bottom: 15px;
    line-height: 1;
}

.hero-content .tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.hero-content .tags span {
    background-color: var(--dark-grey);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
    color: var(--light-grey);
}

.hero-content .description {
    font-size: 1.1em;
    color: var(--light-grey);
    margin-bottom: 30px;
    max-height: 120px; 
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 5; 
    -webkit-box-orient: vertical;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-buttons button {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.hero-buttons .watch-now {
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
}

.hero-buttons .watch-now:hover {
    background-color: #ff2a36; 
}

.hero-buttons .add-to-list {
    background-color: var(--dark-grey);
    color: var(--text-color);
    border: 1px solid var(--light-grey);
}

.hero-buttons .add-to-list:hover {
    background-color: var(--light-grey);
    color: var(--primary-bg);
}

/* ---------------------------------------------------- */
/* 📺 TOP ANIME SECTION 📺               */
/* ---------------------------------------------------- */

.top-anime-section {
    padding: 40px 50px;
    margin-top: 20px;
}

.top-anime-section h2 {
    font-size: 2em;
    margin-bottom: 25px;
    display: inline-block;
}

.top-anime-section .view-more {
    float: right;
    margin-top: 15px;
    color: var(--accent-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.top-anime-section .view-more:hover {
    color: #ff2a36;
}

.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.anime-item {
    text-align: center;
    background-color: var(--secondary-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.anime-item:hover {
    transform: translateY(-5px);
}

.anime-item img {
    width: 100%;
    height: 250px; 
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--dark-grey);
}

.anime-item .anime-title {
    padding: 15px 10px;
    font-size: 1.05em;
    color: var(--text-color);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}