/* =====================================================
   BoldFlix - Main Stylesheet
   Netflix Hero + YouTube Grid aesthetic
   ===================================================== */

:root {
    --bf-bg: #0f0f0f;
    --bf-bg-soft: #181818;
    --bf-bg-card: #1f1f1f;
    --bf-border: #2a2a2a;
    --bf-text: #f1f1f1;
    --bf-text-soft: #aaaaaa;
    --bf-text-dim: #717171;
    --bf-accent: #e50914;
    --bf-accent-hover: #f6121d;
    --bf-radius: 10px;
    --bf-radius-sm: 6px;
    --bf-shadow: 0 10px 30px rgba(0,0,0,0.5);
    --bf-header-h: 64px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bf-bg);
    color: var(--bf-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ============ HEADER ============ */
.bf-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bf-border);
    height: var(--bf-header-h);
}

.bf-header-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.bf-header-left {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
    min-width: 0;
}

.bf-logo { flex-shrink: 0; }
.bf-logo-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}
.bf-logo-text span { color: var(--bf-accent); }

.bf-nav { flex: 1; min-width: 0; }
.bf-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 24px;
}
.bf-menu li { position: relative; }
.bf-menu a {
    color: var(--bf-text-soft);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.2s;
}
.bf-menu a:hover { color: var(--bf-text); }

.bf-has-dropdown:hover .bf-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.bf-dropdown {
    position: absolute;
    top: 100%;
    left: -10px;
    background: var(--bf-bg-soft);
    border: 1px solid var(--bf-border);
    border-radius: var(--bf-radius-sm);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.18s ease;
    box-shadow: var(--bf-shadow);
}
.bf-dropdown li a { display: block; padding: 8px 16px; }
.bf-dropdown li a:hover { background: var(--bf-bg-card); color: #fff; }

.bf-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* ============ SEARCH BAR ============ */
.bf-search-form {
    display: flex;
    align-items: center;
    background: var(--bf-bg-card);
    border: 1px solid var(--bf-border);
    border-radius: 999px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 360px;
    max-width: 100%;
}
.bf-search-form:focus-within {
    border-color: var(--bf-accent);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}
.bf-search-input {
    flex: 1;
    background: transparent;
    border: 0;
    color: var(--bf-text);
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    min-width: 0;
}
.bf-search-input::placeholder { color: var(--bf-text-dim); }
.bf-search-btn {
    background: transparent;
    border: 0;
    color: var(--bf-text-soft);
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}
.bf-search-btn:hover { color: var(--bf-accent); }

.bf-mobile-toggle {
    display: none;
    background: transparent;
    border: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.bf-mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--bf-text);
    border-radius: 2px;
}

/* ============ MAIN ============ */
.bf-main { min-height: 60vh; }

/* ============ HERO (Netflix-style) ============ */
.bf-hero {
    position: relative;
    min-height: 70vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    padding: 80px 48px 100px;
    margin-bottom: 24px;
}
.bf-hero-default {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a0a0a 100%);
    align-items: center;
    text-align: center;
    justify-content: center;
}
.bf-hero-content { max-width: 640px; position: relative; z-index: 2; }
.bf-hero-badge {
    display: inline-block;
    background: var(--bf-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.bf-hero-title {
    font-size: clamp(32px, 5vw, 60px);
    font-weight: 800;
    margin: 0 0 16px;
    line-height: 1.05;
    letter-spacing: -1px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.bf-hero-desc {
    font-size: clamp(15px, 1.5vw, 18px);
    color: var(--bf-text-soft);
    margin: 0 0 28px;
    line-height: 1.5;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.bf-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============ BUTTONS ============ */
.bf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border: 0;
    border-radius: var(--bf-radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
}
.bf-btn-primary { background: #fff; color: #000; }
.bf-btn-primary:hover { background: rgba(255,255,255,0.85); transform: translateY(-1px); }
.bf-btn-secondary { background: rgba(109, 109, 110, 0.7); color: #fff; backdrop-filter: blur(4px); }
.bf-btn-secondary:hover { background: rgba(109, 109, 110, 0.5); }

/* ============ SECTIONS ============ */
.bf-section {
    max-width: 1600px;
    margin: 0 auto;
    padding: 32px 24px;
}
.bf-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 16px;
}
.bf-section-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
}
.bf-section-link {
    color: var(--bf-text-soft);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s;
}
.bf-section-link:hover { color: var(--bf-accent); }

/* ============ GRID (YouTube-style) ============ */
.bf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px 16px;
}

/* ============ HORIZONTAL RAIL (Netflix-style) ============ */
.bf-row {
    position: relative;
}
.bf-row-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 8px;
}
.bf-row-track::-webkit-scrollbar { display: none; }
.bf-row-track .bf-card {
    flex: 0 0 280px;
}
.bf-rail-btn {
    position: absolute;
    top: 0;
    bottom: 8px;
    width: 48px;
    background: linear-gradient(to right, rgba(15,15,15,0.95) 30%, transparent);
    border: 0;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}
.bf-rail-prev { left: 0; }
.bf-rail-next {
    right: 0;
    background: linear-gradient(to left, rgba(15,15,15,0.95) 30%, transparent);
}
.bf-row:hover .bf-rail-btn { opacity: 1; }

/* ============ CARD ============ */
.bf-card {
    background: transparent;
    border-radius: var(--bf-radius);
    overflow: hidden;
    transition: transform 0.25s ease;
}
.bf-card:hover { transform: translateY(-4px); }
.bf-card-link { display: block; color: inherit; }

.bf-card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--bf-bg-card);
    border-radius: var(--bf-radius);
    overflow: hidden;
}
.bf-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.bf-card:hover .bf-card-thumb img { transform: scale(1.05); }

.bf-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.bf-card:hover .bf-card-overlay { opacity: 1; }
.bf-play-btn {
    width: 64px;
    height: 64px;
    background: var(--bf-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transform: scale(0.85);
    transition: transform 0.2s;
}
.bf-card:hover .bf-play-btn { transform: scale(1); }

.bf-card-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
    line-height: 1;
}

.bf-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bf-bg-card);
    color: var(--bf-text-dim);
    font-size: 48px;
}

.bf-card-body { padding: 12px 4px 0; }
.bf-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.35;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bf-card-actresses {
    font-size: 12px;
    color: #cccccc;
    margin: 4px 0 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.bf-actress-label { opacity: 0.7; flex-shrink: 0; }
.bf-card-meta {
    font-size: 13px;
    color: var(--bf-text-soft);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.bf-meta-dot { color: var(--bf-text-dim); margin: 0 2px; }

/* Tag labels in single video page */
.bf-tag-label {
    color: var(--bf-text-soft);
    font-size: 13px;
    font-weight: 500;
    margin-right: 4px;
}
.bf-tag-actress { background: rgba(229, 9, 20, 0.15); color: #ffaaae; }
.bf-tag-actress:hover { background: var(--bf-accent); color: #fff; }

/* Trending rank badge */
.bf-trend-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--bf-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

/* ============ ARCHIVE / CATEGORY / SEARCH ============ */
.bf-archive {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}
.bf-archive-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--bf-border);
}
.bf-trending-header {
    background: linear-gradient(135deg, rgba(229,9,20,0.12) 0%, transparent 70%);
    padding: 32px 24px;
    border-radius: var(--bf-radius);
    border-bottom: 0;
    margin-bottom: 24px;
}
.bf-category-eyebrow {
    display: inline-block;
    color: var(--bf-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.bf-archive-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: -1px;
}
.bf-archive-desc {
    color: var(--bf-text-soft);
    font-size: 16px;
    margin: 0;
}
.bf-archive-count {
    color: var(--bf-text-dim);
    font-size: 14px;
    margin: 8px 0 0;
}

/* ============ SINGLE VIDEO ============ */
.bf-watch-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 24px 60px;
}
.bf-player {
    margin-bottom: 24px;
    border-radius: var(--bf-radius);
    overflow: hidden;
    background: #000;
    box-shadow: var(--bf-shadow);
}
.bf-embed-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}
.bf-embed-container iframe,
.bf-embed-container video,
.bf-embed-container object,
.bf-embed-container embed {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}
.bf-embed-empty {
    padding-bottom: 0;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bf-text-dim);
    background: var(--bf-bg-card);
}
.bf-watch-info { padding: 0 4px; }
.bf-watch-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.25;
    letter-spacing: -0.5px;
}
.bf-watch-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--bf-text-soft);
    font-size: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bf-border);
}
.bf-views { font-weight: 600; color: var(--bf-text); }
.bf-duration-tag {
    background: var(--bf-bg-card);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}
.bf-watch-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.bf-tag {
    background: var(--bf-bg-card);
    color: var(--bf-text);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s;
}
.bf-tag:hover { background: var(--bf-accent); color: #fff; }
.bf-watch-desc {
    background: var(--bf-bg-soft);
    padding: 20px;
    border-radius: var(--bf-radius);
    color: var(--bf-text-soft);
    line-height: 1.65;
}
.bf-watch-desc p:first-child { margin-top: 0; }
.bf-watch-desc p:last-child { margin-bottom: 0; }

/* ============ PAGINATION ============ */
.bf-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}
.bf-pagination .nav-links,
.bf-pagination > * {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.bf-pagination .page-numbers,
.bf-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    background: var(--bf-bg-card);
    color: var(--bf-text);
    border-radius: var(--bf-radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
    text-decoration: none;
}
.bf-pagination .page-numbers:hover,
.bf-pagination .page-numbers.current {
    background: var(--bf-accent);
    color: #fff;
}

/* ============ EMPTY ============ */
.bf-empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--bf-text-soft);
}
.bf-empty h2 { color: var(--bf-text); margin: 0 0 8px; }
.bf-empty .bf-btn { margin-top: 20px; }

/* ============ PAGE ============ */
.bf-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}
.bf-page-content {
    color: var(--bf-text-soft);
    line-height: 1.7;
    font-size: 16px;
}
.bf-page-content a { color: var(--bf-accent); }
.bf-page-content h2, .bf-page-content h3 { color: var(--bf-text); }

/* ============ FOOTER ============ */
.bf-footer {
    background: #080808;
    border-top: 1px solid var(--bf-border);
    padding: 48px 24px 24px;
    margin-top: 60px;
}
.bf-footer-inner {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}
.bf-footer-col h4 {
    color: var(--bf-text);
    font-size: 14px;
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.bf-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.bf-footer-col li { margin-bottom: 8px; }
.bf-footer-col a {
    color: var(--bf-text-soft);
    font-size: 14px;
    transition: color 0.15s;
}
.bf-footer-col a:hover { color: var(--bf-accent); }
.bf-footer-col p { color: var(--bf-text-soft); font-size: 14px; margin: 0; line-height: 1.6; }
.bf-footer-bottom {
    max-width: 1600px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--bf-border);
    color: var(--bf-text-dim);
    font-size: 13px;
    text-align: center;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .bf-search-form { width: 240px; }
    .bf-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 768px) {
    .bf-mobile-toggle { display: flex; }
    .bf-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bf-bg-soft);
        border-bottom: 1px solid var(--bf-border);
        padding: 12px 24px;
        display: none;
    }
    .bf-nav.is-open { display: block; }
    .bf-menu { flex-direction: column; align-items: stretch; gap: 0; }
    .bf-menu li { border-bottom: 1px solid var(--bf-border); }
    .bf-menu li:last-child { border-bottom: 0; }
    .bf-menu a { display: block; padding: 14px 0; }
    .bf-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        border: 0;
        box-shadow: none;
        padding-left: 16px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
    }
    .bf-has-dropdown.is-open .bf-dropdown { max-height: 500px; }
    .bf-search-form { width: 100%; max-width: 240px; }
    .bf-hero { padding: 60px 24px 60px; min-height: 60vh; }
    .bf-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px 12px; }
    .bf-row-track .bf-card { flex: 0 0 220px; }
    .bf-card-title { font-size: 14px; }
    .bf-section { padding: 24px 16px; }
    .bf-section-title { font-size: 18px; }
    .bf-archive { padding: 24px 16px 40px; }
    .bf-watch-wrap { padding: 16px 16px 40px; }
    .bf-watch-title { font-size: 20px; }
}

@media (max-width: 480px) {
    .bf-header-inner { padding: 0 16px; gap: 12px; }
    .bf-search-form { width: 180px; }
    .bf-search-input { padding: 8px 12px; font-size: 13px; }
    .bf-grid { grid-template-columns: repeat(2, 1fr); }
    .bf-hero-actions { flex-direction: column; align-items: stretch; }
    .bf-hero-actions .bf-btn { justify-content: center; }
}
