/* ==========================================================
   ANIMEBYE.ONLINE — STEAM + JUT.SU HYBRID CATALOG STYLES
   ========================================================== */

/* Main Layout */
.main-layout { 
    display: flex; 
    padding-top: 24px; 
    gap: 24px;
    align-items: flex-start;
}

/* Steam-styled Sidebar */
.sidebar { 
    width: 270px; 
    flex-shrink: 0; 
    background: var(--bg-panel); 
    position: sticky; 
    top: 86px; 
    max-height: calc(100vh - 100px); 
    overflow-y: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-track { background: var(--bg-input); }
.sidebar::-webkit-scrollbar-thumb { background: #2a475e; border-radius: 4px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--steam-blue); }

.sidebar-header { 
    border-bottom: 1px solid var(--border-color); 
    padding: 16px 20px; 
    font-family: 'Oswald', sans-serif; 
    background: rgba(0, 0, 0, 0.15);
}
.sidebar-header h2 { 
    font-size: 1.15rem; 
    text-transform: uppercase; 
    letter-spacing: 0.8px;
    color: #fff;
}
.sidebar-header .highlight {
    color: var(--steam-blue);
}

.sidebar-section { 
    padding: 18px 20px; 
    border-bottom: 1px solid rgba(42, 71, 94, 0.5); 
}
.sidebar-section:last-child {
    border-bottom: none;
}
.sidebar-section h3 { 
    font-size: 0.82rem; 
    color: var(--steam-blue); 
    margin-bottom: 14px; 
    font-family: 'Inter', sans-serif; 
    text-transform: uppercase; 
    font-weight: 700;
    letter-spacing: 0.6px;
}

.sidebar-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 8px; 
    font-size: 0.85rem; 
    color: var(--text-muted); 
}
.sidebar-grid label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border-radius: var(--radius-xs);
    transition: var(--transition);
    user-select: none;
}
.sidebar-grid label:hover { 
    color: #fff; 
    background: rgba(102, 192, 244, 0.08);
}
.sidebar-grid input[type="checkbox"],
.sidebar-grid input[type="radio"] {
    accent-color: var(--steam-blue);
    cursor: pointer;
    width: 14px;
    height: 14px;
}

/* Content Area */
.content { 
    flex-grow: 1; 
    min-width: 0; 
    max-width: calc(100% - 294px); 
}

/* Breadcrumbs (AnimeGo style) */
.breadcrumbs { 
    font-size: 0.84rem; 
    color: var(--text-muted); 
    margin-bottom: 18px; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}
.breadcrumbs a:hover { color: var(--steam-blue); }

/* Page & Section Headers */
.page-title { 
    font-family: 'Oswald', sans-serif; 
    font-size: 1.85rem; 
    margin: 10px 0 20px; 
    letter-spacing: 0.5px;
    color: #fff;
}
.section-title { 
    margin: 28px 0 16px; 
    border-bottom: 1px solid var(--border-color); 
    padding-bottom: 10px; 
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-title h2 { 
    font-family: 'Oswald', sans-serif; 
    font-size: 1.3rem; 
    color: #fff;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.section-title.with-tabs { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }

.title-block { display: flex; align-items: center; gap: 10px; }
.red-box { 
    width: 4px; 
    height: 20px; 
    background: var(--steam-blue); 
    border-radius: 2px;
    box-shadow: 0 0 8px var(--steam-blue);
}

/* Steam-styled Tabs */
.tabs { 
    display: flex; 
    border-bottom: 2px solid var(--border-color); 
    margin: 16px 0 22px; 
    gap: 4px;
}
.tab { 
    padding: 10px 20px; 
    background: transparent; 
    color: var(--text-muted); 
    font-size: 0.88rem; 
    font-weight: 600;
    font-family: 'Inter', sans-serif; 
    cursor: pointer; 
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}
.tab:hover {
    color: #fff;
}
.tab.active { 
    color: var(--steam-blue); 
    border-bottom-color: var(--steam-blue);
}

/* Filter Panel (Steam Store Style) */
.filter-panel { 
    background: var(--bg-panel); 
    padding: 18px 20px; 
    border-radius: var(--radius-md); 
    border: 1px solid var(--border-color); 
    margin-bottom: 24px; 
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}
.filter-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 14px; 
    margin-bottom: 14px; 
}
.filter-grid select {
    width: 100%; 
    padding: 10px 14px; 
    background: var(--bg-input); 
    border: 1px solid var(--border-color);
    color: var(--text-main); 
    font-family: inherit; 
    border-radius: var(--radius-sm); 
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}
.filter-grid select:focus {
    border-color: var(--steam-blue);
    background: var(--bg-input-focus);
    box-shadow: 0 0 8px rgba(102, 192, 244, 0.25);
    color: #fff;
}
.filter-actions { display: flex; gap: 12px; }

/* Carousel (Steam Featured Row) */
.carousel { 
    display: flex; 
    gap: 16px; 
    overflow-x: auto; 
    padding-bottom: 14px; 
    scrollbar-width: none; 
    position: relative; 
    margin-bottom: 30px; 
}
.carousel::-webkit-scrollbar { display: none; }
.carousel-item { 
    min-width: 165px; 
    width: 165px; 
    aspect-ratio: 7 / 10; 
    position: relative; 
    border-radius: var(--radius-sm); 
    overflow: hidden; 
    background: #111; 
    border: 1px solid var(--border-color);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    flex-shrink: 0;
}
.carousel-item:hover {
    transform: translateY(-4px);
    border-color: var(--steam-blue);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), 0 0 12px rgba(102, 192, 244, 0.35);
}
.carousel-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center top;
}

/* Steam Review Score Badge */
.rating-badge { 
    position: absolute; 
    top: 8px; 
    left: 8px; 
    background: rgba(14, 26, 38, 0.88); 
    color: var(--steam-blue); 
    border: 1px solid rgba(102, 192, 244, 0.4);
    font-size: 0.76rem; 
    padding: 3px 7px; 
    font-weight: 700; 
    font-family: 'Inter', sans-serif; 
    border-radius: var(--radius-xs); 
    display: inline-flex; 
    align-items: center; 
    gap: 4px; 
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.rating-badge i { font-size: 0.65rem; color: #f5c518; }

.carousel-controls { 
    display: flex; 
    gap: 8px; 
    justify-content: flex-end; 
    margin-top: -8px; 
    margin-bottom: 24px; 
}
.carousel-controls button { 
    width: 36px; 
    height: 36px; 
    background: var(--bg-panel); 
    color: var(--text-muted); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-sm); 
    cursor: pointer; 
    transition: var(--transition); 
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.carousel-controls button:hover { 
    background: #2a435c; 
    color: #fff; 
    border-color: var(--steam-blue); 
}

/* ==========================================================
   VIDEO GRID & STEAM CARDS (7:10 ASPECT RATIO PRESERVED)
   ========================================================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 18px;
    overflow-anchor: none;
}

.video-card {
    background: var(--steam-gradient-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    display: flex; 
    flex-direction: column;
    border: 1px solid var(--border-color);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    position: relative;
}

body:not(.is-touch) .video-card:hover { 
    transform: translateY(-5px); 
    border-color: var(--steam-blue); 
    box-shadow: 0 10px 24px rgba(0,0,0,0.6), 0 0 14px rgba(102, 192, 244, 0.35);
}

.card-poster { 
    width: 100%; 
    aspect-ratio: 7 / 10; 
    position: relative; 
    background: #0b1117; 
    overflow: hidden; 
}
.card-poster img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center top; 
    display: block;
    transition: transform 0.35s ease;
}

body:not(.is-touch) .video-card:hover .card-poster img {
    transform: scale(1.03);
}

.card-overlay {
    position: absolute; 
    inset: 0;
    background: radial-gradient(circle at center, rgba(14, 20, 27, 0.4) 0%, rgba(14, 20, 27, 0.8) 100%);
    opacity: 0; 
    transition: var(--transition);
    display: flex; 
    align-items: center; 
    justify-content: center;
}

body:not(.is-touch) .video-card:hover .card-overlay { 
    opacity: 1; 
}
body:not(.is-touch) .video-card:hover .play-icon { 
    color: var(--steam-blue); 
    transform: scale(1.1);
}

.play-icon { 
    font-size: 2.8rem; 
    color: rgba(255,255,255,0.85); 
    transition: all 0.25s ease;
    filter: drop-shadow(0 0 10px rgba(102, 192, 244, 0.6));
}

.card-info { 
    padding: 12px 14px; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    background: rgba(20, 29, 39, 0.95);
    border-top: 1px solid rgba(42, 71, 94, 0.4);
}

.card-title { 
    font-size: 0.92rem; 
    font-weight: 600; 
    line-height: 1.38;
    margin-bottom: 10px; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
    color: var(--text-main); 
    transition: color 0.2s ease;
}

body:not(.is-touch) .video-card:hover .card-title { 
    color: #fff; 
}

.card-meta { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    font-size: 0.8rem; 
    color: var(--text-muted); 
}
.card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.card-meta i {
    color: #4a7599;
}
.card-meta span:hover i {
    color: var(--steam-blue);
}

/* Pagination / Load More Button */
#load-more-container {
    margin-top: 36px;
    margin-bottom: 20px;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .main-layout { 
        flex-direction: column; 
        padding-top: 10px; 
    }
    .sidebar { 
        width: 100%; 
        order: 2; 
        max-height: none;
        margin-top: 24px; 
        position: static; 
    }
    .content { 
        width: 100%; 
        max-width: 100%; 
        order: 1; 
        padding: 0; 
    }
    
    .filter-grid { grid-template-columns: 1fr 1fr; }
    
    .video-grid { 
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 
        gap: 12px; 
    }
    
    .carousel-item { min-width: 130px; width: 130px; }
    .card-title { font-size: 0.86rem; }
    .card-info { padding: 10px; }
    .page-title { font-size: 1.55rem; margin: 15px 0; }
}

@media (max-width: 480px) {
    .filter-grid { grid-template-columns: 1fr; gap: 10px; }
    .video-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
    }
    .sidebar-grid { grid-template-columns: 1fr; }
}