
:root {
    --bg-color: #050507;
    --text-color: #ffffff;
    --secondary-text: #a1a1aa;
    --accent-color: #ff2e2e;
    --accent-glow: rgba(255, 46, 46, 0.6);
    --secondary-color: #ff6b6b;
    --card-bg: #0f0f12;
    --hover-color: #1a1a20;
    --nav-bg: rgba(5, 5, 7, 0.8);
    --soft-border: rgba(255, 255, 255, 0.08);
    --neon-shadow: 0 0 15px var(--accent-glow);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

input, textarea, select {
    -webkit-tap-highlight-color: rgba(255, 46, 46, 0.08);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
    box-shadow: var(--neon-shadow);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    overflow-x: hidden;
}

img {
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
}

#search-box,
input,
textarea {
    user-select: text !important;
    -webkit-user-select: text !important;
}

.details-layout,
.details-layout *:not(button):not(.download-btn):not(img) {
    user-select: text !important;
    -webkit-user-select: text !important;
}

button,
.download-btn,
.watch-btn,
.join-btn,
.anime-card,
.anime-card *,
.category-btn {
    user-select: none !important;
    -webkit-user-select: none !important;
}

header {
    background-color: transparent;
    padding: 1.2rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0) 100%
    );
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--accent-color);
}

.header-logo {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    border: 2px solid var(--accent-color);
}

.menu-container {
    position: relative;
}

.menu-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--text-color);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.45rem 0.65rem;
    line-height: 1;
    border-radius: 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.25s ease, color 0.25s ease,
                border-color 0.25s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-btn:hover {
    background: rgba(255, 46, 46, 0.15);
    border-color: rgba(255, 46, 46, 0.4);
    color: var(--accent-color);
}

.menu-btn.open {
    background: rgba(255, 46, 46, 0.18);
    border-color: rgba(255, 46, 46, 0.5);
    color: var(--accent-color);
    box-shadow: 0 0 12px rgba(255, 46, 46, 0.25);
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0.6rem 0.5rem;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    z-index: 1001;
    flex-direction: column;
    gap: 2px;
    background: rgba(8, 8, 12, 0.55);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 2px 8px  rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.97);
    transform-origin: top right;
    transition:
        opacity    0.25s cubic-bezier(0.16, 1, 0.3, 1),
        transform  0.25s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0.25s;
    overflow: hidden;
}

.nav-links::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12%;
    width: 76%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 46, 46, 0.7),
        transparent
    );
}

.nav-links::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: radial-gradient(
        ellipse at 50% 100%,
        rgba(255, 46, 46, 0.06) 0%,
        transparent 70%
    );
    pointer-events: none;
}

.nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.nav-links li {
    position: relative;
}

nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    transition:
        background 0.2s ease,
        color      0.2s ease,
        padding-left 0.2s ease;
    position: relative;
}

nav a:hover {
    background: rgba(255, 46, 46, 0.12);
    color: #fff;
    padding-left: 1.3rem;
}

nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    border-radius: 2px;
    background: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-color);
    transform: scaleY(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

nav a:hover::before {
    transform: scaleY(1);
}

nav a::after {
    display: none;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 1rem 0;
    text-align: center;
}


.library-title {
    color: var(--accent-color);
}


.hero {
    position: relative;
    height: 85vh;
    min-height: 500px;
    width: calc(100vw - 60px);
    margin-left: 50%;
    transform: translateX(-50%);
    margin-bottom: 4rem;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    border-radius: 24px;
    border: 1px solid var(--soft-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right,
        rgba(5, 5, 7, 0.95) 0%,
        rgba(5, 5, 7, 0.4) 50%,
        transparent 100%),
        linear-gradient(to top,
        rgba(5, 5, 7, 1) 0%,
        transparent 30%);
    z-index: 1;
}

/* ── HERO CONTENT: smaller fonts, shifted lower ── */
.hero-content {
    position: relative;
    z-index: 10;
    padding: 0 5rem;
    max-width: 800px;
    text-align: left;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
    margin-top: 8rem; /* shift content lower */
}

.hero-slide.active .hero-content {
    opacity: 1;
    transform: translateX(0);
}

.hero-content h1 {
    font-size: 2.6rem; /* reduced from 4rem */
    margin: 0;
    color: #fff;
    line-height: 1.15;
    font-weight: 700;
    text-shadow: 0 5px 15px rgba(0,0,0,0.8);
}

.hero-content h1 span {
    color: var(--accent-color);
    display: block;
    margin-bottom: 0.4rem;
}

.hero-content p {
    font-size: 0.9rem; /* reduced from 1.1rem */
    margin: 1rem 0 1.5rem; /* reduced from 1.5rem 0 2rem */
    color: #e4e4e7;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    line-height: 1.6;
    max-width: 460px;
}

.slider-progress-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    display: flex;
    gap: 8px;
    z-index: 100;
}

.slider-progress-segment {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.slider-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-color);
}

.watch-btn {
    position: relative;
    overflow: hidden;
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    display: inline-block;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    color: #fff;
    background: linear-gradient(135deg,
        rgba(255, 60, 60, 0.85) 0%,
        rgba(200, 20, 20, 0.90) 100%);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 100, 80, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255, 180, 160, 0.25),
        0 4px 18px rgba(255, 46, 46, 0.40),
        0 1px 4px rgba(0,0,0,0.3);
    transition:
        box-shadow  0.28s ease,
        transform   0.28s ease,
        border-color 0.28s ease;
}

.watch-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.22), transparent);
    transform: skewX(-15deg);
    transition: left 0.55s ease;
    pointer-events: none;
}
.watch-btn:hover::before { left: 135%; }

.watch-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.12) 0%, transparent 60%);
    pointer-events: none;
}

.watch-btn:hover {
    transform: scale(1.05);
    box-shadow:
        inset 0 1px 0 rgba(255,180,160,0.3),
        0 6px 24px rgba(255, 46, 46, 0.55),
        0 2px 6px rgba(0,0,0,0.4);
    border-color: rgba(255, 130, 100, 0.6);
}

.greeting h1 {
    font-size: 2.5rem;
    color: var(--accent-color);
}

.search-section {
    position: relative;
    overflow: visible;
    margin: 2rem auto;
    max-width: 600px;
    display: flex;
    border-radius: 50px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 4px 20px rgba(0, 0, 0, 0.30);
    transition:
        max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s ease,
        box-shadow   0.3s ease,
        background   0.3s ease,
        border-radius 0.2s ease;
    z-index: 1000;
}

.search-section.is-focused {
    max-width: 720px;
    border-radius: 22px 22px 0 0;
    border-color: rgba(255, 46, 46, 0.55);
    background: rgba(15, 15, 20, 0.98);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        0 0 0 3px rgba(255, 46, 46, 0.12),
        0 0 30px rgba(255, 46, 46, 0.18),
        0 8px 40px rgba(0, 0, 0, 0.5);
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    pointer-events: none;
    border-radius: 50px;
}

.search-section::after {
    content: none;
}

.search-section:focus-within {
    border-color: rgba(255, 46, 46, 0.55);
}

#search-box {
    padding: 0.8rem 1.5rem;
    flex: 1;
    border: none;
    background: transparent;
    color: white;
    outline: none;
    font-size: 1rem;
}

#search-btn {
    position: relative;
    overflow: hidden;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(255, 100, 80, 0.45);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg,
        rgba(255, 60, 60, 0.85) 0%,
        rgba(200, 20, 20, 0.90) 100%);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow:
        inset 0 1px 0 rgba(255,180,160,0.25),
        0 3px 14px rgba(255, 46, 46, 0.38);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

#search-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.22), transparent);
    transform: skewX(-15deg);
    transition: left 0.5s ease;
    pointer-events: none;
}
#search-btn:hover::before { left: 135%; }

#search-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.12) 0%, transparent 60%);
    pointer-events: none;
}

#search-btn:hover {
    transform: scale(1.05);
    box-shadow:
        inset 0 1px 0 rgba(255,180,160,0.3),
        0 5px 20px rgba(255, 46, 46, 0.55);
}

.category-section {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.category-btn {
    position: relative;
    overflow: hidden;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.25);
    transition:
        color       0.28s ease,
        border-color 0.28s ease,
        box-shadow  0.28s ease,
        background  0.28s ease,
        transform   0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.18) 50%,
        transparent 100%
    );
    transform: skewX(-15deg);
    transition: left 0.55s ease;
    pointer-events: none;
}

.category-btn:hover::before {
    left: 135%;
}

.category-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        ellipse at 50% 0%,
        rgba(255, 255, 255, 0.07) 0%,
        transparent 65%
    );
    pointer-events: none;
}

.category-btn:hover {
    color: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.09);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 4px 16px rgba(0, 0, 0, 0.35);
}

.category-btn.active {
    color: #fff;
    background: rgba(255, 46, 46, 0.22);
    border-color: rgba(255, 46, 46, 0.55);
    box-shadow:
        inset 0 1px 0 rgba(255, 120, 100, 0.25),
        0 0 18px rgba(255, 46, 46, 0.30),
        0 4px 14px rgba(0, 0, 0, 0.35);
    text-shadow: 0 0 12px rgba(255, 100, 80, 0.6);
}

.category-btn.active::before {
    left: 135%;
}

.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.anime-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid var(--soft-border);
    text-align: left;
    position: relative;
    flex: 0 0 auto;
}

.anime-row .anime-card {
    width: 280px;
}

.view-all-card {
    width: 280px;
    height: 220px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--soft-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.view-all-card h3 {
    color: var(--secondary-text);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 2;
    transition: all 0.3s ease;
    filter: blur(2px);
    margin: 0;
}

.view-all-card::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    opacity: 0.1;
    transition: all 0.4s ease;
}

.view-all-card:hover {
    border-color: var(--accent-color);
    background: rgba(255, 46, 46, 0.05);
}

.view-all-card:hover h3 {
    filter: blur(0);
    color: var(--text-color);
}

.view-all-card:hover::after {
    transform: scale(1.5);
    opacity: 0.3;
    box-shadow: 0 0 15px var(--accent-glow);
}

.view-all-card:active {
    box-shadow: 0 0 30px var(--accent-glow), inset 0 0 20px var(--accent-glow);
    transform: scale(0.95);
}

.anime-card:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), var(--neon-shadow);
    border-color: var(--accent-color);
    z-index: 10;
}

.card-img-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.anime-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.anime-card:hover .card-overlay {
    opacity: 1;
}

.card-info {
    padding: 1rem;
    background: var(--card-bg);
}

.anime-card h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.anime-card:hover h3 {
    color: var(--accent-color);
}

.quick-info {
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--secondary-text);
    margin-top: 5px;
}

.quick-info span {
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.quality-badge {
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.section-title {
    text-align: left;
    margin: 4rem 0 1.5rem;
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--accent-color);
    box-shadow: var(--neon-shadow);
    border-radius: 2px;
}

.anime-row {
    position: relative;
    margin-bottom: 2rem;
}

.row-container {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0 2rem;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.row-container::-webkit-scrollbar {
    display: none;
}

.details-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    filter: blur(50px) brightness(0.3);
    z-index: -1;
    transform: scale(1.1);
}

.details-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    text-align: left;
    padding-top: 2rem;
    position: relative;
}

.details-thumbnail img {
    width: 300px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    border: 1px solid var(--soft-border);
    transition: all 0.5s ease;
}

.details-thumbnail img:hover {
    transform: scale(1.02);
    border-color: var(--accent-color);
    box-shadow: var(--neon-shadow);
}

.details-info {
    flex: 1;
}

.details-info h1 {
    color: #fff;
    margin-top: 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.info-item {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    display: flex;
    gap: 10px;
}

.info-item strong {
    color: var(--accent-color);
    min-width: 120px;
}

.description {
    margin-top: 1.5rem;
    line-height: 1.6;
}

.download-section {
    margin-top: 2rem;
    width: 100%;
}

.download-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.download-btn {
    position: relative;
    overflow: hidden;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: rgba(255,255,255,0.88);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 2px 10px rgba(0,0,0,0.3);
    transition:
        background  0.28s ease,
        border-color 0.28s ease,
        box-shadow  0.28s ease,
        transform   0.28s ease,
        color       0.28s ease;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.18), transparent);
    transform: skewX(-15deg);
    transition: left 0.55s ease;
    pointer-events: none;
    z-index: 1;
}
.download-btn:hover::before { left: 135%; }

.download-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.07) 0%, transparent 65%);
    pointer-events: none;
}

.download-btn > * { position: relative; z-index: 2; }

.download-btn:hover {
    background: rgba(255, 46, 46, 0.20);
    border-color: rgba(255, 46, 46, 0.50);
    box-shadow:
        inset 0 1px 0 rgba(255,120,100,0.2),
        0 0 16px rgba(255, 46, 46, 0.28),
        0 4px 14px rgba(0,0,0,0.4);
    color: #fff;
    transform: translateY(-3px);
}

.season-link-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 3.5rem;
}

.season-btn {
    position: relative;
    overflow: hidden;
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    user-select: none !important;
    -webkit-user-select: none !important;
    background: linear-gradient(135deg,
        rgba(255, 60, 60, 0.88) 0%,
        rgba(190, 15, 15, 0.92) 100%);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 110, 80, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255,180,160,0.25),
        0 4px 18px rgba(255, 46, 46, 0.42);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.season-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.22), transparent);
    transform: skewX(-15deg);
    transition: left 0.55s ease;
    pointer-events: none;
}
.season-btn:hover::before { left: 135%; }

.season-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.12) 0%, transparent 60%);
    pointer-events: none;
}

.season-btn:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 140, 100, 0.6);
    box-shadow:
        inset 0 1px 0 rgba(255,180,160,0.3),
        0 6px 24px rgba(255, 46, 46, 0.55);
    color: #ffffff;
}

.recommended-section {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
}

footer {
    background-color: var(--nav-bg);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    border-top: 1px solid #222;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 2rem;
    gap: 2rem;
}

.footer-logo {
    flex: 1.5;
}

.footer-logo p {
    color: var(--secondary-text);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links, .footer-social {
    flex: 1;
}

.footer-links h3, .footer-social h3 {
    color: var(--accent-color);
    margin-bottom: 1.2rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--secondary-text);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #222;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
}

.social-icons a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #222;
    color: var(--secondary-text);
    font-size: 0.9rem;
}

#back-to-top {
    position: relative;
    overflow: hidden;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    outline: none;
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    background: linear-gradient(135deg,
        rgba(255, 60, 60, 0.88) 0%,
        rgba(190, 15, 15, 0.92) 100%);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid rgba(255, 110, 80, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255,180,160,0.25),
        0 4px 18px rgba(255, 46, 46, 0.42);
    transition:
        opacity    0.4s ease,
        visibility 0.4s ease,
        transform  0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.28s ease;
}

#back-to-top::before {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.22), transparent);
    transform: skewX(-15deg);
    transition: left 0.5s ease;
    pointer-events: none;
}
#back-to-top:hover::before { left: 135%; }

#back-to-top::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.12) 0%, transparent 60%);
    pointer-events: none;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow:
        inset 0 1px 0 rgba(255,180,160,0.3),
        0 8px 26px rgba(255, 46, 46, 0.60);
}

.result-info {
    margin: 1rem 0;
    font-size: 1.1rem;
    color: #888;
}

.result-count {
    color: var(--accent-color);
    font-weight: bold;
}

.reset-btn {
    position: relative;
    overflow: hidden;
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    color: white;
    border: 1px solid rgba(255, 100, 80, 0.45);
    background: linear-gradient(135deg,
        rgba(255, 60, 60, 0.85) 0%,
        rgba(200, 20, 20, 0.90) 100%);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow:
        inset 0 1px 0 rgba(255,180,160,0.22),
        0 3px 12px rgba(255, 46, 46, 0.35);
    transition: box-shadow 0.28s ease, transform 0.28s ease;
}

.reset-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-15deg);
    transition: left 0.5s ease;
    pointer-events: none;
}
.reset-btn:hover::before { left: 135%; }

.reset-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.10) 0%, transparent 60%);
    pointer-events: none;
}

.reset-btn:hover {
    box-shadow:
        inset 0 1px 0 rgba(255,180,160,0.3),
        0 5px 20px rgba(255, 46, 46, 0.50);
}

.no-results-container {
    grid-column: 1 / -1;
    padding: 3rem 0;
    text-align: center;
}

.load-more-container {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.load-more-btn {
    position: relative;
    overflow: hidden;
    padding: 0.8rem 2.5rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.88);
    background: rgba(255, 46, 46, 0.08);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 46, 46, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255,120,100,0.12),
        0 2px 10px rgba(0,0,0,0.25);
    transition: background 0.28s ease, box-shadow 0.28s ease, transform 0.28s ease, color 0.28s ease;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.18), transparent);
    transform: skewX(-15deg);
    transition: left 0.55s ease;
    pointer-events: none;
}
.load-more-btn:hover::before { left: 135%; }

.load-more-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.07) 0%, transparent 65%);
    pointer-events: none;
}

.load-more-btn:hover {
    background: rgba(255, 46, 46, 0.22);
    color: white;
    box-shadow:
        inset 0 1px 0 rgba(255,120,100,0.22),
        0 0 18px rgba(255, 46, 46, 0.35),
        0 4px 14px rgba(0,0,0,0.35);
    transform: translateY(-2px);
}

/* ── MEDIA QUERIES ── */
@media (max-width: 768px) {
    .hero {
        height: 50vh;
        width: calc(100vw - 40px);
        border-radius: 20px;
    }

    .hero-content {
        padding: 0 2rem;
        margin-top: 5rem;
    }

    .hero-content h1 {
        font-size: 1.6rem; /* reduced from 2.2rem */
    }

    .hero-content p {
        font-size: 0.8rem;
        max-width: 400px;
    }


    header {
        padding: 1rem;
    }

    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    main {
        padding: 80px 1rem 0;
    }

    #search-box {
        width: 70%;
    }

    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }

    .details-layout {
        flex-direction: column;
        align-items: center;
    }

    .details-thumbnail img {
        width: 100%;
        max-width: 400px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-logo p {
        margin: 1rem auto;
    }

    .social-icons {
        justify-content: center;
    }

    header.scrolled .nav-container {
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }

    header.scrolled .logo {
        font-size: 1rem;
    }

    header.scrolled .header-logo {
        width: 25px;
        height: 25px;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 0;
        height: auto;
        min-height: auto;
        aspect-ratio: 16 / 9;
        width: calc(100vw - 24px);
        border-radius: 12px;
    }

    .hero-content {
        padding: 1rem;
        margin-top: 3rem;
    }

    .hero-content h1 {
        font-size: 1.1rem; /* reduced from 1.4rem */
    }

    .hero-content p {
        font-size: 0.75rem; /* reduced from 0.8rem */
        margin: 0.3rem 0 0.6rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .watch-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    .slider-progress-container {
        bottom: 10px;
        gap: 4px;
    }

    .anime-card h3 {
        font-size: 1rem;
    }

    .anime-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .search-section {
        flex-direction: row;
        align-items: center;
        border-radius: 50px;
        padding: 5px;
        margin: 1.5rem 1rem;
    }

    #search-box {
        width: 100%;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        text-align: left;
    }

    #search-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .category-section {
        gap: 0.4rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 0.8rem 0.5rem;
        scrollbar-width: none;
    }

    .category-section::-webkit-scrollbar {
        display: none;
    }

    .category-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
        flex-shrink: 0;
    }

    .download-buttons {
        gap: 8px;
        justify-content: center;
    }

    .download-btn {
        flex: 0 1 calc(33.33% - 8px);
        padding: 0.8rem 0.4rem;
        font-size: 0.8rem;
        justify-content: center;
        text-align: center;
        min-width: 0;
    }
}

/* About & Contact */
.about-section, .contact-section {
    padding: 60px 1rem;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.about-section h1, .contact-section h2 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
}

.about-section p, .contact-section p {
    color: var(--secondary-text);
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2.5rem 0;
}

.contact-method {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    border: 1px solid #222;
    transition: transform 0.3s;
}

.contact-method:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.contact-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.social-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.method-info h3 {
    margin: 0;
    font-size: 1.2rem;
}

.method-info p {
    margin: 0.3rem 0 0;
}

.method-info a {
    color: var(--accent-color);
    text-decoration: none;
}

.contact-form-container {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid #222;
    margin-top: 3rem;
}

.contact-form-container h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    background: #121212;
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(0, 255, 0, 0.1);
    color: #4caf50;
    border: 1px solid #4caf50;
}

.form-status.error {
    display: block;
    background: rgba(255, 0, 0, 0.1);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

/* Library */
.library-control-hub {
    margin: 2rem auto 4rem;
    max-width: 800px;
    background: rgba(15, 15, 18, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid var(--soft-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.library-search-wrapper {
    position: relative;
    overflow: visible;
    display: flex;
    border-radius: 50px;
    padding: 5px;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 4px 20px rgba(0, 0, 0, 0.30);
    transition:
        border-color 0.3s ease,
        box-shadow   0.3s ease,
        background   0.3s ease,
        border-radius 0.2s ease;
    z-index: 1000;
}

.library-search-wrapper.is-focused {
    border-radius: 22px 22px 0 0;
    border-color: rgba(255, 46, 46, 0.55);
    background: rgba(15, 15, 20, 0.98);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        0 0 0 3px rgba(255, 46, 46, 0.12),
        0 0 30px rgba(255, 46, 46, 0.18),
        0 8px 40px rgba(0, 0, 0, 0.5);
}

.library-search-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    pointer-events: none;
}

.library-search-wrapper::after {
    content: none;
}

.library-search-wrapper:focus-within {
    border-color: rgba(255, 46, 46, 0.55);
}

#library-search-input {
    padding: 0.8rem 1.5rem;
    flex: 1;
    border: none;
    background: transparent;
    color: white;
    outline: none;
    font-size: 1rem;
}

.library-search-btn {
    position: relative;
    overflow: hidden;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(255, 100, 80, 0.45);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
        rgba(255, 60, 60, 0.85) 0%,
        rgba(200, 20, 20, 0.90) 100%);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow:
        inset 0 1px 0 rgba(255,180,160,0.25),
        0 3px 14px rgba(255, 46, 46, 0.38);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.library-search-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.22), transparent);
    transform: skewX(-15deg);
    transition: left 0.5s ease;
    pointer-events: none;
}
.library-search-btn:hover::before { left: 135%; }

.library-search-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.12) 0%, transparent 60%);
    pointer-events: none;
}

.library-search-btn:hover {
    transform: scale(1.05);
    box-shadow:
        inset 0 1px 0 rgba(255,180,160,0.3),
        0 5px 20px rgba(255, 46, 46, 0.55);
}

.library-categories {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.library-category-btn {
    position: relative;
    overflow: hidden;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.60);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 2px 8px rgba(0, 0, 0, 0.25);
    transition:
        color        0.28s ease,
        border-color 0.28s ease,
        box-shadow   0.28s ease,
        background   0.28s ease,
        transform    0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.library-category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.18) 50%,
        transparent 100%
    );
    transform: skewX(-15deg);
    transition: left 0.55s ease;
    pointer-events: none;
}

.library-category-btn:hover::before,
.library-category-btn.active::before {
    left: 135%;
}

.library-category-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        ellipse at 50% 0%,
        rgba(255, 255, 255, 0.07) 0%,
        transparent 65%
    );
    pointer-events: none;
}

.library-category-btn:hover {
    color: rgba(255, 255, 255, 0.90);
    border-color: rgba(255, 255, 255, 0.20);
    background: rgba(255, 255, 255, 0.09);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.13),
        0 4px 16px rgba(0, 0, 0, 0.35);
}

.library-category-btn.active {
    color: #fff;
    background: rgba(255, 46, 46, 0.22);
    border-color: rgba(255, 46, 46, 0.55);
    box-shadow:
        inset 0 1px 0 rgba(255, 120, 100, 0.25),
        0 0 18px rgba(255, 46, 46, 0.30),
        0 4px 14px rgba(0, 0, 0, 0.35);
    text-shadow: 0 0 12px rgba(255, 100, 80, 0.6);
}

#anime-container-library {
    min-height: 400px;
}

#anime-container-library.discovery-mode {
    text-align: left;
}

#anime-container-library.grid-mode {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.loading-splash-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 0;
    width: 100%;
}

.loading-splash-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--soft-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.loading-splash-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    animation: loading-bar 2s infinite linear;
}

@keyframes loading-bar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 46, 46, 0.1);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--text-color);
    text-transform: uppercase;
    animation: pulse-text 1.5s infinite ease-in-out;
}

@keyframes pulse-text {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    .library-control-hub {
        padding: 1rem;
        margin: 1rem 0.5rem 3rem;
    }

    .library-categories {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 0.5rem;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .library-category-btn {
        flex-shrink: 0;
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: 24px;
    position: relative;
    max-width: 400px;
    width: 90%;
    text-align: center;
    border: 1px solid #333;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 62, 62, 0.1);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #888;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent-color);
}

.modal-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(36, 161, 222, 0.3));
}

.modal-body h2 {
    color: var(--text-color);
    margin: 0 0 1rem;
    font-size: 1.8rem;
}

.modal-body p {
    color: var(--secondary-text);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.join-btn {
    position: relative;
    overflow: hidden;
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg,
        rgba(255, 60, 60, 0.88) 0%,
        rgba(190, 15, 15, 0.92) 100%);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 110, 80, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255,180,160,0.25),
        0 4px 18px rgba(255, 46, 46, 0.38);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.join-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.22), transparent);
    transform: skewX(-15deg);
    transition: left 0.55s ease;
    pointer-events: none;
}
.join-btn:hover::before { left: 135%; }

.join-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.12) 0%, transparent 60%);
    pointer-events: none;
}

.join-btn:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 140, 100, 0.6);
    box-shadow:
        inset 0 1px 0 rgba(255,180,160,0.3),
        0 6px 24px rgba(255, 46, 46, 0.55);
}

/* Skeleton */
.skeleton-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--soft-border);
    height: 100%;
}

.skeleton-img {
    aspect-ratio: 16 / 9;
    background: linear-gradient(90deg, #18181c 25%, #222228 50%, #18181c 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

.skeleton-info {
    padding: 1rem;
}

.skeleton-title {
    height: 1.2rem;
    width: 80%;
    background: linear-gradient(90deg, #18181c 25%, #222228 50%, #18181c 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    margin-top: 2rem;
}

/* Schedule & News Styles */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0 4rem;
}

.news-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--soft-border);
    transition: all 0.4s ease;
    text-align: left;
}

.news-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: var(--neon-shadow);
}

.news-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem;
}

.news-content h3 {
    margin: 0 0 0.8rem;
    font-size: 1.2rem;
    color: #fff;
}

.news-content p {
    color: var(--secondary-text);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-date {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 600;
}

.schedule-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.day-tab {
    padding: 0.6rem 1.4rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--soft-border);
    color: var(--secondary-text);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.day-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.day-tab.active {
    background: rgba(255, 46, 46, 0.2);
    border-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 46, 46, 0.2);
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    min-height: 300px;
}

.schedule-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--soft-border);
    transition: all 0.4s ease;
    text-align: left;
    position: relative;
}

.schedule-card:hover {
    transform: scale(1.03);
    border-color: var(--accent-color);
    box-shadow: var(--neon-shadow);
}

.schedule-img-wrapper {
    position: relative;
    aspect-ratio: 16/9;
}

.schedule-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.air-time-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid var(--accent-color);
}

.schedule-info {
    padding: 1.2rem;
}

.schedule-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.episode-info {
    color: var(--secondary-text);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: block;
}

.release-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--secondary-text);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    font-weight: 600;
}


@media (max-width: 480px) {
    .schedule-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .day-tab {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* ── ANIMATION SYSTEM ── */
body {
    animation: bodyFadeIn 0.6s ease forwards;
}

@keyframes bodyFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }


.search-section {
    animation: slideUpFade 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.75s both;
}

.category-section {
    animation: slideUpFade 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.85s both;
}

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

.section-title {
    animation: none;
}

.section-title::before {
    transform-origin: top center;
    animation: barGrow 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes barGrow {
    from { transform: translateY(-50%) scaleY(0); }
    to   { transform: translateY(-50%) scaleY(1); }
}

.anime-card {
    animation: cardEntrance 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

@keyframes cardEntrance {
    from { opacity: 0; transform: scale(0.88) translateY(16px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.anime-card:hover {
    transform: scale(1.05) translateY(-6px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.6),
                0 0 18px var(--accent-glow),
                0 0 40px rgba(255, 46, 46, 0.15);
    border-color: var(--accent-color);
}

/* Click / Press */
.anime-card:active {
    transform: scale(0.96) translateY(0px) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4) !important;
    transition: transform 0.1s ease, box-shadow 0.1s ease !important;
}

.watch-btn:active,
.join-btn:active,
.season-btn:active {
    transform: scale(0.93) !important;
    box-shadow: 0 2px 8px rgba(255, 46, 46, 0.3) !important;
    transition: transform 0.1s ease, box-shadow 0.1s ease !important;
}

.download-btn:active {
    transform: scale(0.95) translateY(1px) !important;
    transition: transform 0.1s ease !important;
}

.load-more-btn:active {
    transform: scale(0.95) translateY(1px) !important;
    transition: transform 0.1s ease !important;
}

.reset-btn:active {
    transform: scale(0.93) !important;
    transition: transform 0.1s ease !important;
}

#back-to-top:active {
    transform: scale(0.88) !important;
    transition: transform 0.1s ease !important;
}

.category-btn:active,
.library-category-btn:active {
    transform: scale(0.90) !important;
    transition: transform 0.1s ease !important;
}

.view-all-card:active {
    transform: scale(0.94) !important;
    transition: transform 0.1s ease !important;
}

.menu-btn:active {
    transform: scale(0.85) !important;
    transition: transform 0.1s ease !important;
}

.social-icons a:active {
    transform: scale(0.85) !important;
    transition: transform 0.1s ease !important;
}

#back-to-top.show {
    animation: bttBounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes bttBounceIn {
    from { opacity: 0; transform: translateY(20px) scale(0.7); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-content {
    transform: scale(0.85) translateY(30px);
    transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1),
                opacity 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.view-all-card::after {
    animation: ringPulse 2.5s ease-in-out infinite;
}

@keyframes ringPulse {
    0%, 100% { transform: scale(1);    opacity: 0.1; }
    50%       { transform: scale(1.3); opacity: 0.25; }
}

.footer-links li {
    opacity: 0;
    transform: translateX(-10px);
}

.footer-links li.footer-visible {
    animation: footerLinkIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes footerLinkIn {
    to { opacity: 1; transform: translateX(0); }
}

.header-logo {
    animation: spinIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes spinIn {
    from { opacity: 0; transform: rotate(-180deg) scale(0.5); }
    to   { opacity: 1; transform: rotate(0deg) scale(1); }
}

.details-thumbnail img {
    animation: detailsImgReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

@keyframes detailsImgReveal {
    from { opacity: 0; transform: scale(0.9) translateX(-20px); }
    to   { opacity: 1; transform: scale(1) translateX(0); }
}

.details-info h1 {
    animation: slideUpFade 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
}

.info-item {
    opacity: 0;
    animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Splash Screen */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    box-shadow: 0 0 20px rgba(255, 46, 46, 0.4);
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 46, 46, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 40px rgba(255, 46, 46, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 46, 46, 0.4);
    }
}



/* ── Search Suggestions Dropdown ── */
.search-suggestions {
    position: absolute;
    top: calc(100% + 1px);
    left: -1px;
    right: -1px;
    z-index: 1001;
    background: rgba(13, 13, 18, 0.99);
    border: 1px solid rgba(255, 46, 46, 0.35);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-radius: 0 0 22px 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: none;
    animation: suggestFadeIn 0.15s ease;
}

.search-suggestions::-webkit-scrollbar { display: none; }

@keyframes suggestFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Section label (e.g. "Trending" / "Results") */
.suggestion-label {
    padding: 10px 16px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    cursor: pointer;
    transition: background 0.12s ease;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.suggestion-item:last-child { border-bottom: none; }

.suggestion-item:hover,
.suggestion-item.active {
    background: rgba(255, 46, 46, 0.10);
}

/* Search icon on left (like browser) */
.suggestion-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255,255,255,0.35);
}

.suggestion-icon svg {
    width: 14px;
    height: 14px;
}

.suggestion-thumb {
    width: 40px;
    height: 54px;
    object-fit: cover;
    border-radius: 7px;
    flex-shrink: 0;
    background: #1a1a1a;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #e8e8e8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.suggestion-name mark {
    background: transparent;
    color: #ff5555;
    font-weight: 700;
}

.suggestion-meta {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.suggestion-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: inline-block;
}

.suggestion-arrow {
    color: rgba(255,255,255,0.15);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.suggestion-no-results {
    padding: 20px 16px;
    color: rgba(255,255,255,0.35);
    font-size: 0.88rem;
    text-align: center;
}

.suggestion-no-results strong {
    color: rgba(255,255,255,0.6);
}

/* ── Did You Mean ── */
.did-you-mean {
    color: var(--accent-color, #ff4444);
    text-decoration: underline;
    cursor: pointer;
    font-style: italic;
}
.did-you-mean:hover {
    opacity: 0.8;
}
