/* StreamVault - Dark Cinematic Theme */

:root {
    --accent: #1db954;
    --accent-dark: #158a3e;
    --accent-hover: #1ed760;
    --highlight: #e8b04b;
    --ink: #ffffff;
    --ink-muted: #b3b3b3;
    --ink-faint: #535353;
    --surface-0: #121212;
    --surface-1: #181818;
    --surface-2: #242424;
    --surface-3: #2a2a2a;
    --surface-4: #333333;
    --border-subtle: rgba(255,255,255,0.08);
    --border-mid: rgba(255,255,255,0.15);
    --glow: rgba(29, 185, 84, 0.25);
    --glow-strong: rgba(29, 185, 84, 0.4);
    --shadow-card: 0 4px 20px rgba(0,0,0,0.5);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.7);
    --btn-gradient: linear-gradient(135deg, #1db954 0%, #158a3e 100%);
    --radius: 8px;
    --radius-sm: 6px;
    --radius-pill: 24px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.25s var(--ease);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    background: var(--surface-0);
    color: var(--ink);
    line-height: 1.5;
    font-size: 14px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============ HEADER ============ */
.site-header {
    background: var(--surface-1);
    border-bottom: 1px solid var(--border-subtle);
    padding: 10px 0;
}

.hd-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.brand-link {
    text-decoration: none;
    display: inline-block;
}

.brand-name {
    font-size: 26px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.5px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
    display: inline-block;
}

.brand-name:hover {
    color: var(--accent);
}

.brand-divider {
    width: 1px;
    height: 22px;
    background: var(--border-mid);
    flex-shrink: 0;
}

.domain-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.domain-tag {
    font-size: 10px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(29,185,84,0.12);
    border: 1px solid rgba(29,185,84,0.3);
    padding: 2px 7px;
    border-radius: 4px;
}

.domain-addr {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.3px;
    font-family: 'SF Mono', 'Courier New', monospace;
}

/* ============ CONTAINER ============ */
.wrap {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 14px;
}

.sec {
    padding: 10px 0;
}

/* ============ NAVIGATION ============ */
.nav-block {
    background: var(--surface-1);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--border-subtle);
}

.nav-strip {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border-subtle);
}

.nav-strip:last-child {
    border-bottom: none;
}

.zone-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: 10%;
    text-align: center;
    border-right: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    flex-shrink: 0;
    background: var(--surface-2);
}

.zone-links {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 9px 10px;
    align-items: center;
}

.zone-links a {
    display: inline-block;
    color: var(--ink-muted);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.zone-links a:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    box-shadow: 0 2px 10px var(--glow);
}

.zone-links a.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    font-weight: 700;
    box-shadow: 0 2px 10px var(--glow);
}

/* ============ SEARCH ============ */
.search-bar {
    background: var(--surface-1);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border-subtle);
}

.search-bar form {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
}

.search-bar input[type="text"] {
    flex: 1;
    min-width: 120px;
    padding: 10px 14px;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-pill);
    background: var(--surface-3);
    color: var(--ink);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.search-bar input[type="text"]:focus {
    border-color: var(--accent);
    background: var(--surface-2);
    box-shadow: 0 0 0 3px var(--glow);
}

.search-bar input[type="text"]::placeholder {
    color: var(--ink-faint);
}

.search-bar button {
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--btn-gradient);
    color: #000;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.search-bar button:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 14px var(--glow-strong);
    transform: scale(1.03);
}

/* ============ TAG GRIDS ============ */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    padding: 12px;
    background: var(--surface-1);
    border-radius: var(--radius);
    margin-bottom: 10px;
    border: 1px solid var(--border-subtle);
}

.tag-item {
    padding: 5px 14px;
    background: var(--surface-3);
    border-radius: var(--radius-pill);
    color: var(--ink-muted);
    text-decoration: none;
    font-size: 12px;
    transition: var(--transition);
    border: 1px solid var(--border-subtle);
}

.tag-item:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    box-shadow: 0 2px 8px var(--glow);
}

/* ============ SECTION HEADINGS ============ */
.section-block {
    margin-bottom: 16px;
}

.section-hd {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}

.section-hd::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.section-ttl {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
    color: var(--ink);
}

.section-ttl a {
    color: var(--ink);
    text-decoration: none;
    transition: var(--transition);
}

.section-ttl a:hover {
    color: var(--accent);
}

/* ============ CARD GRID ============ */
.card-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    list-style: none;
    padding: 0;
}

.card-row li {
    position: relative;
    animation: riseUp 0.5s ease backwards;
}

.card-row li:nth-child(1) { animation-delay: 0.04s; }
.card-row li:nth-child(2) { animation-delay: 0.08s; }
.card-row li:nth-child(3) { animation-delay: 0.12s; }
.card-row li:nth-child(4) { animation-delay: 0.16s; }
.card-row li:nth-child(5) { animation-delay: 0.20s; }
.card-row li:nth-child(6) { animation-delay: 0.24s; }
.card-row li:nth-child(7) { animation-delay: 0.28s; }
.card-row li:nth-child(8) { animation-delay: 0.32s; }

@keyframes riseUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.thumb-link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 600 / 350;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
}

.thumb-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease);
}

.thumb-link::before {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: rgba(255,255,255,0.9);
    background: rgba(0,0,0,0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 2;
}

.thumb-link:hover img {
    transform: scale(1.06);
}

.thumb-link:hover::before {
    opacity: 1;
}

.card-meta {
    padding: 8px 0 4px;
}

.card-meta h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.card-meta h5 a {
    color: var(--ink-muted);
    text-decoration: none;
    transition: var(--transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta h5 a:hover {
    color: var(--ink);
}

/* ============ VIDEO PLAYER ============ */
.player-outer {
    width: 100%;
    height: 640px;
    max-height: 640px;
    margin-bottom: 16px;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.player-outer iframe,
.player-outer video,
.player-outer #video-container {
    width: 100%;
    height: 100%;
    border: none;
}

.MacPlayer {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
}

/* ============ CAPTURE IMAGE ============ */
.capture-zone {}

.capture-zone img,
.capture-zone .img_item img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    display: block;
    border: 1px solid var(--border-subtle);
}

.capture-zone .img_item {
    width: 100%;
}

/* ============ DOWNLOAD BUTTONS ============ */
.dl-actions {
    text-align: center;
    padding: 16px;
    background: var(--surface-1);
    border-radius: var(--radius);
    margin: 14px 0;
    border: 1px solid var(--border-subtle);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.dl-btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--btn-gradient);
    color: #000;
    text-decoration: none;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition);
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
}

.dl-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 16px var(--glow-strong);
    transform: scale(1.04);
}

/* ============ SHARE SECTION ============ */
.link-share {
    background: var(--surface-1);
    border-radius: var(--radius);
    padding: 16px;
    margin: 14px 0;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 12px;
}

.link-display {
    background: var(--surface-3);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.link-label {
    font-weight: 700;
    font-size: 12px;
    color: var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
}

.link-url {
    font-size: 12px;
    color: var(--ink-muted);
    font-family: 'SF Mono', 'Courier New', monospace;
    word-break: break-all;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-copy-btn {
    padding: 10px 20px;
    background: var(--btn-gradient);
    color: #000;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.link-copy-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 14px var(--glow-strong);
}

.lnk-icon {
    font-size: 16px;
}

/* ============ PAGINATION ============ */
.pager-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.pg-link,
.pg-active {
    display: inline-block;
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--transition);
    min-width: 36px;
    text-align: center;
}

.pg-link {
    background: var(--surface-2);
    color: var(--ink-muted);
    border: 1px solid var(--border-subtle);
}

.pg-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.pg-active {
    background: var(--accent);
    color: #000;
    border: 1px solid var(--accent);
    cursor: default;
    font-weight: 700;
}

/* ============ FRIENDLY LINKS ============ */
.friendlinks-box {
    padding: 12px;
    background: var(--surface-1);
    border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
}

.friendlinks-box dl { margin: 0; }

.friendlinks-box dd {
    display: inline-block;
    margin: 4px;
}

.friendlinks-box a {
    color: var(--ink-faint);
    text-decoration: none;
    transition: var(--transition);
    font-size: 13px;
}

.friendlinks-box a:hover {
    color: var(--accent);
}

/* ============ FOOTER ============ */
.ft-bar {
    padding: 22px 0;
    text-align: center;
    border-top: 1px solid var(--border-subtle);
    margin-top: 24px;
    background: var(--surface-1);
}

.ft-bar p {
    margin: 6px 0;
    color: var(--ink-faint);
    font-size: 13px;
}

.ft-bar a {
    color: var(--ink-faint);
    text-decoration: none;
    transition: var(--transition);
}

.ft-bar a:hover {
    color: var(--accent);
}

/* ============ UTILITIES ============ */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.show-desktop { display: block; }
.show-mobile { display: block; }

@media (max-width: 768px) {
    .show-desktop { display: none !important; }
}

@media (min-width: 769px) {
    .show-mobile { display: none !important; }
}

img[data-original] {
    background: var(--surface-2);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .wrap { padding: 0 8px; }

    .sec { padding: 8px 0; }

    .hd-wrap { gap: 10px; }

    .brand-name { font-size: 20px; }

    .domain-addr { font-size: 15px; }

    .player-outer {
        height: 56.25vw;
        max-height: 400px;
        margin-bottom: 12px;
    }

    /* Nav mobile: 15% label + 85% links, 4 per row */
    .nav-strip {
        align-items: stretch;
    }

    .zone-tag {
        width: 15%;
        font-size: 10px;
        padding: 8px 3px;
    }

    .zone-links {
        width: 85%;
        font-size: 12px;
        gap: 4px;
        padding: 8px 5px;
    }

    .zone-links a {
        font-size: 12px;
        padding: 5px 2px;
        width: calc((100% - 12px) / 4);
    }

    /* Card grid: 2 per row on mobile */
    .card-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .section-ttl { font-size: 17px; }

    .search-bar { padding: 10px; }

    .search-bar input[type="text"] {
        padding: 9px 12px;
        font-size: 13px;
        min-width: 80px;
    }

    .search-bar button {
        padding: 9px 12px;
        font-size: 12px;
    }

    .dl-actions {
        padding: 12px 8px;
        gap: 8px;
        margin: 12px 0;
    }

    .dl-btn {
        padding: 9px 14px;
        font-size: 13px;
    }

    .link-share {
        padding: 12px;
        margin: 12px 0;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .link-display {
        padding: 9px 10px;
        gap: 7px;
    }

    .link-url { font-size: 11px; }
    .link-label { font-size: 11px; }

    .link-copy-btn {
        padding: 9px 12px;
        font-size: 12px;
    }

    .pager-row { padding: 14px 0; gap: 5px; }

    .pg-link, .pg-active {
        padding: 7px 11px;
        font-size: 12px;
        min-width: 32px;
    }

    .section-block { margin-bottom: 12px; }

    .tag-list { padding: 10px; gap: 6px; margin-bottom: 8px; }
    .tag-item { padding: 4px 11px; font-size: 12px; }

    .ft-bar { padding: 18px 0; margin-top: 18px; }
}

@media (max-width: 480px) {
    .brand-name { font-size: 18px; }

    .brand-divider { height: 16px; }

    .domain-tag { font-size: 9px; }
    .domain-addr { font-size: 14px; }

    .zone-tag {
        width: 15%;
        font-size: 10px;
        padding: 7px 2px;
    }

    .zone-links {
        width: 85%;
        font-size: 12px;
        gap: 3px;
        padding: 6px 4px;
    }

    .zone-links a {
        font-size: 12px;
        padding: 4px 2px;
        width: calc((100% - 9px) / 4);
    }

    .player-outer {
        max-height: 300px;
        margin-bottom: 10px;
    }

    .card-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .card-meta h5 { font-size: 12px; }

    .section-ttl { font-size: 15px; }

    .dl-btn { padding: 8px 10px; font-size: 12px; }

    .link-share { padding: 10px; gap: 6px; }

    .link-copy-btn { padding: 8px 10px; font-size: 11px; }

    .lnk-icon { font-size: 14px; }
}
