
/* --- RESET & VARIABLES --- */
:root {
    /* Palette: 60/30/10 Rule */
    --bg-body: #050505;       /* 60% - Deepest Black */
    --bg-surface: #1a1a1a;    /* 30% - Dark Gray Surface */
    --bg-surface-hover: #2a2a2a;
    
    --accent: #e50914;        /* 10% - Tube Red */
    --accent-hover: #ff0f1f;
    
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --border-color: #333333;
    
    /* Spacing */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
    
    --container-width: 1440px;
    --header-height: 60px;
    --mobile-header-height: 110px;
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
a:hover { color: var(--accent); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- LAYOUT UTILS --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--bg-surface);
    padding-bottom: var(--spacing-sm);
}

h1 { font-size: 1.5rem; font-weight: 700; text-transform: uppercase; letter-spacing: -0.5px; }
h2 { font-size: 1.25rem; font-weight: 600; color: var(--text-primary); }
h3 { font-size: 1rem; font-weight: 600; margin-bottom: var(--spacing-sm); }

/* --- TOP PARTNER BAR --- */
.top-bar {
    background-color: #000;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem;
    padding: 6px 0;
}
.top-bar .container { display: flex; justify-content: flex-end; gap: 20px; }
.top-bar a { color: var(--text-secondary); font-weight: 600; text-transform: uppercase; }
.top-bar a.highlight { color: var(--accent); }

/* --- MAIN HEADER --- */
.main-header {
    background-color: var(--bg-surface);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -1px;
    flex-shrink: 0;
}
.logo span { color: var(--accent); }

/* Search Bar */
.search-wrapper {
    flex-grow: 1;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    background-color: #000;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 40px 10px 15px;
    border-radius: 4px;
    font-size: 0.95rem;
}
.search-input:focus { border-color: var(--accent); }

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
}

/* Nav Menu */
.nav-menu { display: flex; gap: 5px; align-items: center; }
.nav-link {
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 4px;
    text-transform: uppercase;
}
.nav-link.active { background-color: var(--accent); color: #fff; }
.nav-link:hover:not(.active) { background-color: var(--bg-surface-hover); }

.menu-toggle { display: none; font-size: 1.5rem; background: none; border: none; color: var(--text-primary); cursor: pointer; }

/* --- LAYOUT GRIDS --- */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.video-card {
    background-color: var(--bg-surface);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}
.video-card:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0,0,0,0.4); z-index: 2; }

.thumb {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    display: block;
    background-color: #000;
}
.thumb img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
}
.duration {
    position: absolute;
    bottom: 6px; right: 6px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 3px;
}
.hd-badge {
    position: absolute;
    top: 6px; left: 6px;
    background: var(--accent);
    color: #fff;
    padding: 1px 4px;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 2px;
    text-transform: uppercase;
}

.card-details { padding: 10px; }
.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}
.card-meta { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-secondary); margin-top: 5px; }
.card-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 0.7rem; color: var(--text-secondary); background: #000; padding: 2px 6px; border-radius: 3px; transition: all 0.2s; }
.tag:hover { color: var(--text-primary); background: var(--accent); }

/* --- SIDEBAR --- */
.sidebar-block { margin-bottom: var(--spacing-lg); }
.category-list { display: flex; flex-direction: column; gap: 2px; }
.cat-link {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-surface);
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-left: 2px solid transparent;
}
.cat-link:hover { background: var(--bg-surface-hover); color: var(--text-primary); border-left-color: var(--accent); }
.cat-count { font-size: 0.8rem; background: #000; padding: 2px 6px; border-radius: 10px; }

/* --- ADS --- */
.sponsor-block {
    background-color: #0f0f0f;
    border: 1px dashed #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
}
.sponsor-label { position: absolute; top: 0; right: 0; background: #333; color: #aaa; font-size: 0.6rem; padding: 2px 4px; z-index: 1; }
.sponsor-rect { width: 100%; height: 250px; margin-bottom: 20px; }
.sponsor-banner { width: 100%; height: 90px; margin: 20px 0; }

/* --- PAGINATION --- */
.pagination { display: flex; justify-content: center; gap: 5px; margin: 40px 0; }
.page-btn {
    padding: 10px 16px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-weight: 700;
    border-radius: 4px;
}
.page-btn:hover, .page-btn.active { background: var(--accent); color: white; }

/* ------------------------------ */
/* --- MODERN PLAYER CSS V2 --- */
/* ------------------------------ */
.player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    margin-bottom: 15px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.8);
    overflow: hidden;
    group: 'player';
}
.player-wrapper video {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    cursor: pointer;
}

/* Control Bar Container */
.player-controls {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
    padding: 30px 20px 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}
.player-wrapper:hover .player-controls,
.player-wrapper.paused .player-controls {
    opacity: 1;
    transform: translateY(0);
}

/* General Control Buttons */
.ctrl-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.2s;
}
.ctrl-btn:hover { opacity: 1; }

/* --- CSS ICONS (No Fonts) --- */

/* Play Icon (Triangle) */
.icon-play {
    width: 0; 
    height: 0; 
    border-style: solid;
    border-width: 9px 0 9px 16px;
    border-color: transparent transparent transparent #fff;
    transition: border-left-color 0.2s;
}
.ctrl-btn:hover .icon-play { border-left-color: var(--accent); }

/* Pause Icon (Two Bars) */
.icon-pause {
    width: 14px; 
    height: 16px; 
    border-left: 5px solid #fff;
    border-right: 5px solid #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.ctrl-btn:hover .icon-pause { border-color: var(--accent); }

/* Volume Icon (Simple shape) */
.icon-vol {
    width: 8px;
    height: 10px;
    background: #fff;
    position: relative;
    transition: background 0.2s;
}
.icon-vol:before {
    content: '';
    position: absolute;
    top: -4px; right: -8px;
    width: 0; height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 9px solid #fff;
    transition: border-left-color 0.2s;
}
.ctrl-btn:hover .icon-vol { background: var(--accent); }
.ctrl-btn:hover .icon-vol:before { border-left-color: var(--accent); }

/* Fullscreen Icon (Corners) */
.icon-fs {
    width: 18px;
    height: 14px;
    border: 2px solid #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.ctrl-btn:hover .icon-fs { border-color: var(--accent); }

/* State Handling */
.player-wrapper.playing .play-btn .icon-play { display: none; }
.player-wrapper.playing .play-btn .icon-pause { display: block; }
.player-wrapper:not(.playing) .play-btn .icon-play { display: block; }
.player-wrapper:not(.playing) .play-btn .icon-pause { display: none; }

/* Scrubber */
.scrub-bar {
    flex-grow: 1;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: height 0.1s;
}
.scrub-bar:hover { height: 8px; }

.scrub-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: 3px;
    position: relative;
}
.scrub-fill::after {
    content:'';
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.2s, transform 0.1s;
}
.scrub-bar:hover .scrub-fill::after { opacity: 1; }
.scrub-bar:hover .scrub-fill::after:hover { transform: translateY(-50%) scale(1.2); }

/* ------------------------------ */

/* --- SINGLE PAGE INFO --- */
.video-info { background: var(--bg-surface); padding: 20px; border-radius: 6px; margin-bottom: 20px; }
.info-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; margin-bottom: 15px; }
.action-btn { background: var(--accent); color: #fff; border: none; padding: 10px 25px; font-weight: 700; border-radius: 4px; cursor: pointer; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.5px; box-shadow: 0 4px 10px rgba(229, 9, 20, 0.3); }
.action-btn:hover { background: var(--accent-hover); box-shadow: 0 4px 15px rgba(229, 9, 20, 0.5); }
.meta-stats { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 10px; }
.meta-stats span { margin-right: 15px; color: var(--text-primary); font-weight: 600; }

/* --- CATEGORY GRID --- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--spacing-sm); }
.cat-card {
    position: relative;
    height: 160px;
    border-radius: 6px;
    overflow: hidden;
    display: block;
}
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.cat-card:hover img { transform: scale(1.1); }
.cat-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    display: flex; flex-direction: column; justify-content: flex-end; padding: 15px;
}
.cat-name { font-weight: 700; font-size: 1.1rem; color: #fff; text-transform: uppercase; }
.cat-vid-count { font-size: 0.8rem; color: var(--accent); font-weight: 600; }

/* --- PARTNER FOOTER --- */
.partners-box { background: var(--bg-surface); padding: 30px 0; margin-top: 40px; text-align: center; }
.partner-links-grid { display: flex; justify-content: center; flex-wrap: wrap; gap: 30px; margin-top: 20px; }
.partner-item { display: flex; flex-direction: column; align-items: center; width: 100px; }
.partner-icon { width: 50px; height: 50px; background: #333; border-radius: 50%; margin-bottom: 10px; }
.partner-name { font-size: 0.8rem; color: var(--text-secondary); font-weight: 600; }

/* --- FOOTER --- */
.main-footer { border-top: 2px solid var(--accent); padding: 40px 0; background: #000; margin-top: 40px; font-size: 0.9rem; color: var(--text-secondary); text-align: center; }
.footer-nav { margin-bottom: 20px; }
.footer-nav a { margin: 0 10px; }
.rta { margin-top: 20px; opacity: 0.6; }
.rta:hover { opacity: 1; }

/* --- RESPONSIVE / MOBILE OPTIMIZATION --- */
@media (max-width: 1024px) {
    .page-layout { grid-template-columns: 1fr; }
    .video-grid { grid-template-columns: repeat(3, 1fr); }
    .sidebar-block { display: none; }
}

@media (max-width: 768px) {
    :root { --header-height: auto; }
    
    .main-header { padding: 10px 0; }
    .header-inner { flex-wrap: wrap; gap: 10px; }
    .logo { order: 1; }
    .menu-toggle { display: block; order: 2; font-size: 1.8rem; }
    
    .search-wrapper { 
        order: 3; 
        width: 100%; 
        max-width: 100%; 
        margin-top: 5px;
    }
    .search-input { padding: 12px 40px 12px 15px; font-size: 16px; }

    .nav-menu {
        display: none;
        width: 100%;
        order: 4;
        flex-direction: column;
        background: var(--bg-surface);
        padding: 10px;
        border-top: 1px solid var(--border-color);
    }
    .nav-menu.open { display: flex; }
    .nav-link { width: 100%; text-align: center; padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); }

    .video-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .cat-grid { grid-template-columns: 1fr 1fr; }
    
    .thumb { padding-top: 56.25%; }
    h1 { font-size: 1.2rem; margin-left: 5px; }
    .container { padding: 0 10px; }
}

@media (max-width: 480px) {
    .video-grid { grid-template-columns: 1fr; }
    .thumb { border-radius: 0; }
    .video-card { border-radius: 0; margin-bottom: 10px; }
}
