/* === HOME PAGE === */
.page {
    animation: fadeIn 0.3s ease;
    padding: 0 15px 80px 15px; /* Added bottom padding for mobile nav */
}

/* Hero Slider */
.hero-slider {
    width: 100%;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 30px;
    background: var(--surface);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.slider-item {
    width: 100%; height: 100%;
    background-size: cover; background-position: center;
    position: relative;
    display: flex; align-items: flex-end;
}
/* Dark Gradient on Slider */
.slider-item::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, #000 0%, transparent 80%);
}

.slider-content {
    position: relative; z-index: 2;
    padding: 20px; width: 100%;
}
.slider-content h1 {
    font-size: 20px; margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
.slider-content button {
    padding: 8px 20px; border-radius: 20px; font-size: 14px; font-weight: bold;
    background: var(--gold); color: black; display: flex; align-items: center; gap: 5px; width: fit-content;
}

/* Section Titles */
.section-title {
    display: flex; align-items: center;
    margin: 25px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.section-title h2 { font-size: 18px; margin-left: 10px; color: var(--text); }
.section-title i { font-size: 20px; }

/* Anime Grid */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.anime-card {
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s;
    cursor: pointer;
}
.anime-card:active { transform: scale(0.95); }

.anime-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 8px;
    background: var(--surface);
}

.anime-card h3 {
    font-size: 12px;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-dim);
}

/* === SEARCH PAGE STYLES === */
.search-header {
    padding: 10px 0 20px 0;
    position: sticky; top: 0;
    background: var(--bg);
    z-index: 10;
}
.search-header input {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--surface);
    background: var(--surface);
    color: white;
    font-size: 16px;
    transition: 0.3s;
}
.search-header input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.1);
}

/* === DETAILS PAGE (GLASS) === */
.details-bg {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    filter: blur(25px) brightness(0.3);
    transform: scale(1.1); /* Prevents white edges from blur */
}

.details-content { padding-top: 10px; }

.poster-container { text-align: center; margin-bottom: 20px; }
.poster-container img {
    width: 150px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.1);
}

.meta-tags {
    display: flex; justify-content: center; gap: 8px; margin-top: 15px;
}
.tag {
    font-size: 11px; padding: 4px 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #ddd;
}
.tag.gold { color: var(--gold); background: rgba(255, 215, 0, 0.1); }

.info-container { text-align: center; }
.info-container h1 { font-size: 24px; margin-bottom: 10px; line-height: 1.3; }
.info-container p {
    font-size: 13px; color: #ccc; line-height: 1.6;
    max-height: 80px; overflow-y: auto;
    padding: 0 10px;
}

/* Buttons */
.action-buttons { display: flex; gap: 10px; margin: 25px 0; }
.btn-gold {
    flex: 1; background: var(--gold); color: #000;
    padding: 14px; border-radius: 10px; font-weight: bold; font-size: 16px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-glass {
    flex: 1; background: rgba(255,255,255,0.15); color: #fff;
    padding: 14px; border-radius: 10px; font-weight: bold; font-size: 16px;
    backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* Season Selector */
.season-selector select {
    width: 100%; padding: 14px;
    background: rgba(0,0,0,0.6); color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 16px;
}

/* Episode List */
.episode-list { display: flex; flex-direction: column; gap: 8px; }
.ep-card {
    display: flex; align-items: center;
    background: rgba(255,255,255,0.08);
    padding: 12px; border-radius: 10px;
    border: 1px solid transparent;
    transition: 0.2s;
}
.ep-card:active { background: rgba(255,255,255,0.15); }

.ep-num {
    font-size: 16px; font-weight: bold; color: var(--gold);
    margin-left: 15px; min-width: 25px;
}
.ep-info h4 { font-size: 14px; font-weight: normal; }

/* === RESPONSIVE PC === */
@media (min-width: 769px) {
    .hero-slider { height: 450px; }
    .anime-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
    
    .details-content {
        display: flex; gap: 50px; max-width: 1100px; margin: 40px auto;
        align-items: flex-start;
    }
    .poster-container { text-align: right; }
    .poster-container img { width: 320px; }
    
    .info-container { flex: 1; text-align: right; }
    .info-container p { max-height: none; padding: 0; font-size: 16px; }
    .action-buttons { justify-content: flex-start; max-width: 400px; }
}

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