/* BedTapes Theme Styles */

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

:root {
    --bg: #0d0d0d;
    --card: #1a1a1a;
    --card-h: #222;
    --border: #2a2a2a;
    --fg: #fff;
    --muted: #888;
    --gold: #c9a84c;
    --gold-d: #a88630;
    --orange: #e8642a;
    --pill: #2e2e2e;
}

html { color-scheme: dark; }

body {
    background: var(--bg) !important;
    color: var(--fg) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; margin: 0; padding: 0; }

/* WRAP */
.bt-wrap {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 18px;
}

/* ── HEADER ── */
#bt-header {
    background: #111;
    border-bottom: 3px solid var(--orange);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 500;
}

.admin-bar #bt-header { top: 32px; }
@media (max-width: 782px) { .admin-bar #bt-header { top: 46px; } }

#bt-header .bt-wrap {
    display: flex;
    align-items: center;
    height: 54px;
    gap: 20px;
}

.bt-logo {
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
}
.bt-logo em { color: var(--gold); font-style: normal; }

.bt-nav {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.bt-nav a {
    display: inline-block;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    white-space: nowrap;
    transition: color .15s;
}
.bt-nav a:hover { color: #fff; }

.bt-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.bt-search input {
    background: #1c1c1c;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: #fff;
    padding: 6px 11px;
    font-size: 13px;
    width: 170px;
    outline: none;
}
.bt-search input:focus { border-color: var(--gold); }
.bt-search button {
    background: var(--gold);
    border: none;
    border-radius: 4px;
    color: #000;
    padding: 7px 13px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.bt-search button:hover { background: var(--gold-d); }

/* ── PILLS ── */
.bt-pills {
    padding: 14px 0 2px;
    overflow-x: auto;
    scrollbar-width: none;
}
.bt-pills::-webkit-scrollbar { display: none; }
.bt-pills-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    padding-bottom: 10px;
}
.bt-pill {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid var(--pill);
    color: var(--muted);
    background: transparent;
    transition: all .15s;
}
.bt-pill:hover { border-color: var(--gold); color: var(--gold); }
.bt-pill.on { background: var(--gold); border-color: var(--gold); color: #000; font-weight: 700; }

/* ── SECTION LABEL ── */
.bt-sec {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 18px 0 14px;
}
.bt-sec-bar {
    width: 4px;
    min-width: 4px;
    height: 17px;
    background: var(--gold);
    border-radius: 2px;
}
.bt-sec-lbl {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
}

/* ── GRID ── */
.bt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}
@media (max-width: 900px) { .bt-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .bt-grid { grid-template-columns: 1fr; } }

/* ── CARD ── */
.bt-card {
    display: block;
    background: var(--card);
    border-radius: 6px;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    transition: transform .15s, background .15s;
}
.bt-card:hover {
    transform: translateY(-2px);
    background: var(--card-h);
    color: #fff;
}

.bt-card-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #111;
    overflow: hidden;
}
.bt-card-thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.bt-card:hover .bt-card-thumb img { transform: scale(1.04); }

.bt-card-dur {
    position: absolute;
    bottom: 6px; right: 7px;
    background: rgba(0,0,0,.82);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 2;
}
.bt-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.28);
    opacity: 0;
    transition: opacity .2s;
    z-index: 2;
}
.bt-card:hover .bt-card-play { opacity: 1; }
.bt-card-play svg { width: 44px; height: 44px; fill: rgba(255,255,255,.9); }

.bt-card-body { padding: 9px 11px 11px; }
.bt-card-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #fff;
}
.bt-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bt-card-tag { font-size: 11px; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: .05em; }
.bt-card-views { font-size: 11px; color: var(--muted); margin-left: auto; }

/* ── PAGINATION ── */
.bt-pages {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px 0 40px;
}
.bt-pages a,
.bt-pages span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid var(--border);
    color: var(--muted);
    text-decoration: none;
    transition: all .15s;
}
.bt-pages a:hover,
.bt-page-btn:hover { border-color: var(--gold); color: var(--gold); }
.bt-pages .current,
.bt-page-btn.on { background: var(--gold); border-color: var(--gold); color: #000; font-weight: 700; }
.bt-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid var(--border);
    color: var(--muted);
    text-decoration: none;
    transition: all .15s;
    cursor: pointer;
}
.bt-page-ellipsis { cursor: default; border-color: transparent; }

/* ── SINGLE VIDEO ── */
.bt-single { padding: 22px 0 40px; }

.bt-player-wrap {
    width: 100%;
    margin-bottom: 16px;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    /* hard clip — prevents iframe JS from expanding outside */
    max-height: calc(100vw * 0.5625);
}
.bt-player {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    font-size: 0;
    line-height: 0;
    pointer-events: none; /* re-enabled below */
}
.bt-player iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
    display: block;
    pointer-events: all;
}

.bt-single-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}
.bt-single-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.bt-single-meta span { font-size: 13px; color: var(--muted); }
.bt-single-meta strong { color: #fff; }

.bt-tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.bt-tag-item {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid var(--pill);
    border-radius: 20px;
    font-size: 12px;
    color: var(--muted);
    transition: all .15s;
}
.bt-tag-item:hover { border-color: var(--gold); color: var(--gold); }

/* ── FOOTER ── */
#bt-footer {
    background: #0a0a0a;
    border-top: 1px solid var(--border);
    padding: 22px 18px;
    text-align: center;
}
.bt-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px 16px;
    margin-bottom: 10px;
}
.bt-footer-links a { font-size: 12px; color: var(--muted); }
.bt-footer-links a:hover { color: #fff; }
.bt-footer-copy { font-size: 12px; color: #444; }

/* ── EMPTY / 404 ── */
.bt-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.bt-empty h2 { font-size: 18px; color: #fff; margin-bottom: 8px; }

.bt-404 { text-align: center; padding: 80px 20px; }
.bt-404-num { font-size: 90px; font-weight: 800; color: var(--gold); line-height: 1; margin-bottom: 14px; }
.bt-404 h1 { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.bt-404 p { color: var(--muted); margin-bottom: 24px; }
.bt-btn {
    display: inline-block;
    background: var(--gold);
    color: #000;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.bt-btn:hover { background: var(--gold-d); color: #000; }

/* ── PAGE ── */
.bt-page { padding: 30px 0 60px; max-width: 760px; }
.bt-page h1 { font-size: 24px; font-weight: 700; margin-bottom: 18px; }
.bt-page-content { font-size: 14px; line-height: 1.8; color: #ccc; }
.bt-page-content p { margin-bottom: 14px; }
.bt-page-content h2 { color: #fff; font-size: 18px; margin: 24px 0 10px; }

/* ── RESPONSIVE HEADER ── */
@media (max-width: 680px) {
    .bt-search input { width: 120px; }
    .bt-nav a { padding: 5px 7px; }
}
@media (max-width: 460px) {
    .bt-nav { display: none; }
    .bt-search input { width: 140px; }
}
