@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,600;0,700;0,800;0,900;1,800&display=swap');

/* =========================================
   ROOT VARIABLES
========================================= */
:root {
    --bg:        #f8f8f8;
    --grid:      #e0e0e0;
    --primary:   #3b82f6;
    --secondary: #ec4899;
    --accent:    #f59e0b;
    --black:     #111111;
    --white:     #ffffff;
    --shadow:    6px 6px 0 #111;
    --shadow-sm: 3px 3px 0 #111;
    --border:    3px solid #111;
    --radius:    16px;
    --trans:     all 0.2s ease;
    --container: 1400px;
}

/* =========================================
   RESET & BASE
========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg);
    color: var(--black);
    overflow-x: hidden;
    line-height: 1.6;
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 32px 32px;
    background-attachment: fixed;
}

.hidden { display: none !important; }

a { text-decoration: none; color: inherit; }

img { display: block; max-width: 100%; }

/* =========================================
   LAYOUT
========================================= */
.main-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================
   NAVBAR
========================================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: var(--border);
}

.navbar .main-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
    padding-bottom: 16px;
}

.navbar-brand {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -2px;
    transition: var(--trans);
    white-space: nowrap;
}
.navbar-brand:hover { transform: rotate(-3deg); color: var(--primary); }

.nav-desktop-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 12px;
    transition: var(--trans);
    color: var(--black);
}
.nav-link:hover {
    background: var(--primary);
    color: var(--white);
    transform: rotate(-2deg);
}

.nav-search-form {
    display: flex;
    gap: 8px;
}

/* =========================================
   BRUT COMPONENTS
========================================= */
.brut-card {
    background: var(--white);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--trans);
}
.brut-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: var(--shadow);
}

.brut-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    font-weight: 800;
    font-family: inherit;
    background: var(--primary);
    color: var(--white);
    border: var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--trans);
    white-space: nowrap;
}
.brut-button:hover  { transform: translate(-2px,-2px); box-shadow: var(--shadow); }
.brut-button:active { transform: translate(2px,2px); box-shadow: none; }
.brut-button.sm     { padding: 6px 16px; font-size: 0.8rem; }

.brut-input {
    background: var(--white);
    border: var(--border);
    border-radius: 12px;
    padding: 10px 20px;
    font-family: inherit;
    font-weight: 600;
    outline: none;
    transition: var(--trans);
    width: 100%;
}
.brut-input:focus { box-shadow: var(--shadow-sm); }

/* =========================================
   SECTION TITLE
========================================= */
.section-title {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: var(--primary);
    color: var(--white);
    padding: 8px 24px;
    border: var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transform: rotate(-1deg);
    margin-bottom: 24px;
}

/* =========================================
   HERO SLIDER
========================================= */
.hero-slider {
    position: relative;
    overflow: hidden;
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    height: 480px;
    background: #000;
}

.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.77,0,0.175,1);
}

.slider-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    flex-shrink: 0;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.65;
}

.slider-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px 60px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

.slider-title {
    color: var(--white);
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1px;
    text-transform: uppercase;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.slider-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: var(--border);
    border-radius: 50%;
    background: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: var(--trans);
    z-index: 10;
}
.slider-prev { left: 16px; }
.slider-next { right: 16px; }
.slider-prev:hover, .slider-next:hover { background: var(--primary); color: var(--white); }

/* =========================================
   ANIME GRID & CARDS
========================================= */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 24px;
}

.anime-card {
    position: relative;
    border: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--trans);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.anime-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: var(--shadow);
}

.anime-card-img {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    border-bottom: var(--border);
    flex-shrink: 0;
}
.anime-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.anime-card:hover .anime-card-img img { transform: scale(1.06); }

.badge {
    position: absolute;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border: 2px solid #111;
    border-radius: 8px;
    line-height: 1;
    z-index: 5;
}
.badge-type   { top: 8px; left: 8px; background: var(--primary); color: var(--white); }
.badge-status { bottom: 8px; right: 8px; background: var(--accent); color: var(--black); }
.badge-ep     { bottom: 8px; left: 8px; background: var(--secondary); color: var(--white); }

.anime-card-info {
    padding: 12px 14px;
    flex-grow: 1;
    display: flex;
    align-items: center;
}
.anime-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--black);
}

/* =========================================
   DETAIL PAGE
========================================= */
.detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 48px;
    margin-bottom: 60px;
    align-items: start;
}

.detail-poster {
    position: sticky;
    top: 100px;
}
.detail-poster img {
    width: 100%;
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.detail-info h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -2px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.genre-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.genre-tag {
    padding: 6px 18px;
    border: var(--border);
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.8rem;
    background: var(--accent);
    transition: var(--trans);
}
.genre-tag:hover { background: var(--primary); color: var(--white); }

.synopsis-box {
    padding: 28px 32px;
    border: var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    margin-bottom: 28px;
    font-size: 1rem;
    font-weight: 600;
    color: #444;
    line-height: 1.8;
}
.synopsis-box h3 { font-weight: 900; font-size: 1.1rem; margin-bottom: 12px; text-decoration: underline; text-decoration-color: var(--primary); text-underline-offset: 4px; }

.info-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}
.info-stat {
    border: var(--border);
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 12px 16px;
    text-align: center;
}
.info-stat-label { font-size: 0.65rem; font-weight: 800; color: #888; text-transform: uppercase; display: block; margin-bottom: 4px; }
.info-stat-value { font-size: 0.95rem; font-weight: 800; }
.link-item { color: inherit; transition: var(--trans); }
.link-item:hover { color: var(--primary); text-decoration: underline; }

.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-bottom: 60px;
}
.episode-link {
    display: block;
    text-align: center;
    padding: 14px 8px;
    font-weight: 800;
    font-size: 0.9rem;
    border: var(--border);
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--trans);
}
.episode-link:hover, .episode-link.active { background: var(--primary); color: var(--white); transform: translate(-2px,-2px); box-shadow: var(--shadow); }

/* =========================================
   WATCH PAGE
========================================= */
.watch-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

.video-wrapper {
    border: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #000;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}
.video-wrapper iframe { width: 100%; height: 100%; }

.watch-title {
    font-size: clamp(1.4rem, 3vw, 2.5rem);
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.watch-detail-box {
    padding-top: 20px;
    border-top: 2px dashed #ddd;
    margin-top: 24px;
}

.ep-sidebar h3 {
    font-weight: 900;
    font-size: 0.85rem;
    text-transform: uppercase;
    background: var(--accent);
    color: var(--black);
    padding: 10px 16px;
    border: var(--border);
    border-radius: 10px;
    margin-bottom: 12px;
}

.ep-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 4px;
}
.ep-list-item {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.85rem;
    border: var(--border);
    border-radius: 12px;
    background: var(--white);
    transition: var(--trans);
}
.ep-list-item:hover { background: #f0f0f0; transform: translateX(4px); }
.ep-list-item.active { background: var(--primary); color: var(--white); border-color: #111; }

.watched-icon { 
    position: absolute;
    top: 6px;
    right: 6px;
    background: #22c55e; 
    color: var(--white);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    border: 2px solid #111;
    box-shadow: 2px 2px 0 #111;
    z-index: 5;
}
.ep-list-item.active .watched-icon { background: #22c55e; }

.episode-link { position: relative; }
.episode-link.watched { border-color: #22c55e; }

/* Custom Scrollbar */
.ep-list::-webkit-scrollbar { width: 6px; }
.ep-list::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 4px; }
.ep-list::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* =========================================
   COLLECTION / SEARCH PAGE
========================================= */
.collection-header {
    margin-bottom: 40px;
}

/* =========================================
   GENRES PAGE
========================================= */
.genres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}
.genre-box {
    display: block;
    text-align: center;
    padding: 24px 16px;
    font-weight: 800;
    border: var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--trans);
}
.genre-box:hover { background: var(--primary); color: var(--white); transform: translate(-4px,-4px); box-shadow: var(--shadow); }

/* =========================================
   FOOTER
========================================= */
.site-footer {
    margin-top: 80px;
    border-top: var(--border);
    background: var(--white);
    padding: 48px 24px;
    text-align: center;
}
.site-footer .logo { font-size: 2rem; font-weight: 900; letter-spacing: -2px; }
.site-footer p { font-weight: 600; color: #777; margin-top: 8px; }



/* =========================================
   LOADER
========================================= */
.loader-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 0;
}
.loader {
    width: 56px;
    height: 56px;
    border: 5px solid #ddd;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================
   UTILITIES
========================================= */
.bg-primary   { background-color: var(--primary)   !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.bg-accent    { background-color: var(--accent)    !important; }
.text-white   { color: var(--white)                !important; }
.font-black   { font-weight: 900; }

/* =========================================
   BOTTOM NAV — ANDROID STYLE
   Must be defined BEFORE media queries so
   @media can override display:none → flex
========================================= */
.bottom-nav {
    display: none; /* shown via @media max-width:768px */
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 460px;
    background: rgba(255,255,255,0.96);
    border: 3px solid var(--black);
    border-radius: 22px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18), var(--shadow);
    z-index: 999;
    justify-content: space-around;
    align-items: center;
    padding: 8px 4px;
    gap: 0;
    backdrop-filter: blur(12px);
}

.bottom-nav-item {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 0.62rem;
    font-weight: 800;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 8px 16px;
    border-radius: 14px;
    transition: var(--trans);
    min-width: 60px;
    text-align: center;
}
.bottom-nav-item i {
    font-size: 1.25rem;
    transition: var(--trans);
}
.bottom-nav-item:hover,
.bottom-nav-item.active {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
}
.bottom-nav-item.active i { transform: scale(1.15); }

/* Mobile search popup */
.mobile-search-overlay {
    display: none;
    position: fixed;
    bottom: 82px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 460px;
    background: var(--white);
    border: var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 14px 16px;
    z-index: 998;
    gap: 10px;
    align-items: center;
}
.mobile-search-overlay.open {
    display: flex;
    animation: slideUp 0.2s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(16px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.mobile-search-overlay input {
    flex: 1;
    border: var(--border);
    border-radius: 12px;
    padding: 10px 16px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    outline: none;
}
.mobile-search-overlay button { padding: 10px 20px; }

/* =========================================
   RESPONSIVE — TABLET (max 1100px)
========================================= */
@media (max-width: 1100px) {
    .detail-layout  { grid-template-columns: 240px 1fr; gap: 28px; }
    .watch-layout   { grid-template-columns: 1fr; }
    .ep-sidebar h3  { margin-top: 24px; }
    .ep-list        { max-height: 260px; flex-direction: row; flex-wrap: wrap; }
    .ep-list-item   { flex: 0 0 auto; }
}

/* =========================================
   RESPONSIVE — ANDROID / MOBILE (max 768px)
========================================= */
@media (max-width: 768px) {

    /* === BASE === */
    body { font-size: 15px; }

    .main-container {
        padding: 0 14px;
        padding-bottom: 90px; /* Space above bottom nav */
    }

    /* === NAVBAR === */
    .navbar { padding: 0; }
    .navbar .main-container {
        padding-top: 12px;
        padding-bottom: 12px;
        gap: 10px;
    }
    .navbar-brand { font-size: 1.6rem; letter-spacing: -1.5px; }
    .nav-desktop-links { display: none; }

    /* Hide desktop search, use bottom nav search instead */
    .nav-search-form { display: none; }

    /* === HERO SLIDER === */
    .hero-slider {
        height: 220px;
        border-radius: 16px;
    }
    .slider-content {
        padding: 16px 18px;
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 70%, transparent 100%);
    }
    .slider-title {
        font-size: 1.1rem;
        letter-spacing: -0.5px;
        margin-bottom: 12px;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .slider-buttons { gap: 8px; }
    .slider-buttons .brut-button {
        padding: 8px 16px;
        font-size: 0.75rem;
        border-radius: 10px;
    }
    .slider-prev, .slider-next { display: none; }

    /* Swipe dots hint */
    .hero-slider::after {
        content: '';
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 32px;
        height: 4px;
        background: rgba(255,255,255,0.5);
        border-radius: 2px;
        z-index: 20;
    }

    /* === SECTION TITLE === */
    .section-title {
        font-size: 1rem;
        padding: 6px 16px;
        margin-bottom: 16px;
    }

    /* === ANIME GRID === */
    .anime-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .anime-card-info { padding: 8px 10px; }
    .anime-card-title { font-size: 0.72rem; line-height: 1.3; }
    .badge { font-size: 0.6rem; padding: 3px 7px; border-radius: 6px; }

    /* === DETAIL PAGE === */
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .detail-poster {
        position: static;
        max-width: 200px;
        margin: 0 auto;
    }
    .detail-info h1 { font-size: 1.6rem; letter-spacing: -1px; }
    .synopsis-box { padding: 18px 20px; font-size: 0.9rem; }
    .info-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .info-stat { padding: 10px 12px; }
    .info-stat-value { font-size: 0.85rem; }

    .episode-grid {
        grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
        gap: 8px;
    }
    .episode-link { padding: 10px 4px; font-size: 0.8rem; border-radius: 10px; }

    /* === WATCH PAGE === */
    .video-wrapper {
        border-radius: 12px;
        margin-bottom: 16px;
    }
    .watch-title { font-size: 1.2rem; margin-bottom: 14px; }
    .ep-list {
        flex-direction: row;
        flex-wrap: wrap;
        max-height: 220px;
    }
    .ep-list-item { flex: 0 0 auto; padding: 8px 14px; font-size: 0.8rem; }

    /* === GENRES GRID === */
    .genres-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .genre-box { padding: 18px 8px; font-size: 0.85rem; }

    /* === PAGINATION === */
    .page-btn { padding: 10px 20px; font-size: 0.85rem; }
    .page-indicator { padding: 8px 18px; font-size: 0.95rem; }

    /* === FOOTER === */
    .site-footer { margin-top: 40px; padding: 28px 16px; }
    .site-footer .logo { font-size: 1.5rem; }

    /* === BOTTOM NAV VISIBLE === */
    .bottom-nav { display: flex; }
}

/* =========================================
   RESPONSIVE — SMALL PHONES (max 480px)
========================================= */
@media (max-width: 480px) {
    .anime-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .genres-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-poster { max-width: 160px; }
    .hero-slider { height: 200px; }
    .slider-title { font-size: 1rem; }
    .episode-grid { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
    .episode-link { font-size: 0.75rem; padding: 8px 2px; }
}


/* =========================================
   PAGINATION
========================================= */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-weight: 800;
    font-size: 0.95rem;
    border: var(--border);
    border-radius: 14px;
    background: var(--white);
    color: var(--black);
    box-shadow: var(--shadow-sm);
    transition: var(--trans);
    cursor: pointer;
}
.page-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow);
}
.page-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
}

.page-indicator {
    font-weight: 900;
    font-size: 1.1rem;
    padding: 10px 24px;
    border: var(--border);
    border-radius: 14px;
    background: var(--accent);
    color: var(--black);
    box-shadow: var(--shadow-sm);
    letter-spacing: -0.5px;
}

.history-list-container {
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: 0 auto;
}

/* Grouped History Styles (Horizontal) */
.history-card-horizontal {
    display: flex;
    background: var(--white);
    border: var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 24px;
    transition: var(--trans);
}
.history-card-horizontal:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }

.history-card-thumb {
    width: 130px;
    min-width: 130px;
    position: relative;
    border-right: var(--border);
    background: #eee;
}
.history-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.history-card-content {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.history-card-title {
    font-size: 1.15rem;
    font-weight: 900;
    margin-bottom: 4px;
    color: var(--black);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.history-ep-count {
    font-size: 0.7rem;
    font-weight: 800;
    color: #777;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
}

@media (max-width: 480px) {
    .history-card-thumb { width: 100px; min-width: 100px; }
    .history-card-content { padding: 12px 14px; }
    .history-card-title { font-size: 1rem; }
}
.history-dropdown {
    margin-top: 12px;
    width: 100%;
}
.history-drop-btn {
    width: 100%;
    padding: 8px 12px;
    background: #f1f1f1;
    border: 3px solid #111;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 900;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--trans);
    text-transform: uppercase;
    font-family: inherit;
}
.history-drop-btn:hover { background: #e2e2e2; transform: translateY(-2px); }

.history-drop-list {
    display: none;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 4px;
}
.history-dropdown.open .history-drop-list { display: flex; }
.history-dropdown.open .history-drop-btn { background: var(--accent); }
.history-dropdown.open .history-drop-btn i { transform: rotate(180deg); }

.history-ep-link {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 8px 10px;
    background: var(--white);
    border: 2px solid #111;
    border-radius: 8px;
    transition: var(--trans);
    display: block;
    text-decoration: none;
    color: #111;
}
.history-ep-link:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateX(4px);
}
/* Custom Scrollbar for history list */
.history-drop-list::-webkit-scrollbar { width: 4px; }
.history-drop-list::-webkit-scrollbar-thumb { background: #111; border-radius: 10px; }

