/* =========================================================================
   VelvetStream HD - Premium Midnight Crimson Cinema Portal
   ========================================================================= */

:root {
    --bg-main: #0c0d12;
    --bg-surface: #14151f;
    --bg-card: #191a26;
    --bg-card-hover: #222433;
    --bg-header: rgba(12, 13, 18, 0.92);
    --border-color: rgba(255, 255, 255, 0.08);
    --primary-color: #ff0055;
    --primary-gradient: linear-gradient(135deg, #ff0055 0%, #ff5000 100%);
    --accent-gold: #ffb400;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-lg: 16px;
    --radius-md: 10px;
    --shadow-glow: 0 8px 30px rgba(255, 0, 85, 0.3);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}

.brand-logo .logo-icon {
    background: var(--primary-gradient);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-glow);
}

.brand-logo .logo-accent {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-search {
    flex: 1;
    max-width: 580px;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper input {
    width: 100%;
    background: #141521;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 12px 48px 12px 20px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 0, 85, 0.15);
    background: #191c2b;
}

.search-input-wrapper .search-btn {
    position: absolute;
    right: 6px;
    background: var(--primary-gradient);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.search-input-wrapper .search-btn:hover {
    transform: scale(1.05);
}

.header-badges {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge-4k {
    background: linear-gradient(135deg, #ffb400 0%, #ff8000 100%);
    color: #000;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.badge-18 {
    background: var(--primary-gradient);
    color: #fff;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 6px;
}

.btn-back-home {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #141521;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back-home:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* --- Clean Full-Width Hero Spotlight Banner --- */
.hero-section {
    padding: 28px 0 16px;
}

.hero-banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
    padding: 48px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: var(--shadow-card);
}

.hero-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 13, 18, 0.2) 0%, rgba(12, 13, 18, 0.95) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 0, 85, 0.2);
    color: var(--primary-color);
    border: 1px solid rgba(255, 0, 85, 0.4);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    color: #fff;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* --- Category Filter Horizontal Slider --- */
.category-filter-section {
    padding: 16px 0;
}

.category-scroll-container {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.category-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.category-scroll-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.cat-pill {
    background: #141521;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cat-pill:hover {
    background: #1e2030;
    border-color: rgba(255, 0, 85, 0.4);
    transform: translateY(-2px);
}

.cat-pill.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #fff;
    font-weight: 700;
    box-shadow: var(--shadow-glow);
}

/* --- Section Header --- */
.grid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0 20px;
}

.grid-title-group h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
}

.grid-count {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.sort-select {
    background: #141521;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

/* --- 4-Column Widescreen Card Grid --- */
.large-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* --- Card Design --- */
.velvet-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    cursor: pointer;
    box-shadow: var(--shadow-card);
}

.velvet-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 0, 85, 0.5);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), var(--shadow-glow);
}

.velvet-card .card-thumb-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.velvet-card .card-thumb-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(12, 13, 18, 0.95) 100%);
    transition: opacity 0.3s ease;
}

.velvet-card:hover .card-thumb-box::after {
    opacity: 0.85;
}

.velvet-card .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
    transition: all 0.3s ease;
}

.velvet-card:hover .play-overlay {
    opacity: 1;
}

.velvet-card .play-button-icon {
    width: 52px;
    height: 52px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    box-shadow: var(--shadow-glow);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.velvet-card:hover .play-button-icon {
    transform: scale(1);
}

.velvet-card .badge-hd {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    background: rgba(12, 13, 18, 0.75);
    backdrop-filter: blur(8px);
    color: var(--accent-gold);
    border: 1px solid rgba(255, 180, 0, 0.4);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 6px;
}

.velvet-card .card-info-box {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.velvet-card .card-title-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.velvet-card .card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.velvet-card .card-cat-tag {
    background: rgba(255, 0, 85, 0.12);
    color: var(--primary-color);
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 0, 85, 0.2);
}

.velvet-card .card-stats-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.velvet-card .stat-like {
    color: #00e676;
    font-weight: 600;
}

/* --- Pagination --- */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 40px 0 60px;
}

.page-btn {
    background: #141521;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    background: #1e2030;
    border-color: var(--primary-color);
    color: #fff;
}

.page-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #fff;
    font-weight: 800;
    box-shadow: var(--shadow-glow);
}

.page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.page-ellipsis {
    color: var(--text-muted);
    font-weight: 700;
    padding: 0 4px;
}

/* --- Player Page Layout --- */
.player-layout {
    padding: 32px 0 60px;
}

.player-main-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    margin-bottom: 32px;
}

.video-embed-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-embed-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.player-details-body {
    padding: 28px;
}

.player-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 16px;
}

.player-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.meta-pill {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-pill.highlight-like {
    color: #00e676;
    font-weight: 700;
}

.meta-pill.cat-badge {
    background: var(--primary-gradient);
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
}

.site-footer {
    background: #07080d;
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 992px) {
    .large-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    .hero-banner {
        padding: 32px 24px;
    }
    .hero-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 600px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .large-card-grid {
        grid-template-columns: 1fr;
    }
    .player-title {
        font-size: 1.3rem;
    }
}
