:root {
    --bg: #111111;
    --surface: #1c1c1c;
    --surface-hover: #252525;
    --accent: #e8a020;
    --accent-light: #f0bc4a;
    --text: #f0f0f0;
    --text-muted: #888888;
    --border: #2e2e2e;
    --radius: 12px;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
}

a { color: inherit; }

/* ─── Header ─────────────────────────────── */

header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.5px;
}

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

/* ─── Catalog ─────────────────────────────── */

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.section-title {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-weight: 400;
}

.catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.video-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.video-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 32px rgba(232, 160, 32, 0.12);
}

.video-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.video-card:nth-child(1) .video-thumb { background: linear-gradient(135deg, #2a1500 0%, #4a2800 100%); }
.video-card:nth-child(2) .video-thumb { background: linear-gradient(135deg, #1a0a28 0%, #301844 100%); }
.video-card:nth-child(3) .video-thumb { background: linear-gradient(135deg, #001828 0%, #003048 100%); }
.video-card:nth-child(4) .video-thumb { background: linear-gradient(135deg, #182800 0%, #2c4400 100%); }

.video-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, rgba(232,160,32,0.08) 0%, transparent 65%);
}

.play-btn {
    width: 60px;
    height: 60px;
    background: rgba(232, 160, 32, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(4px);
}

.video-card:hover .play-btn {
    background: var(--accent-light);
    transform: scale(1.08);
}

.play-arrow {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 11px 0 11px 20px;
    border-color: transparent transparent transparent #111111;
    margin-left: 4px;
}

.quality-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: var(--accent);
    padding: 3px 7px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(232, 160, 32, 0.25);
    z-index: 1;
}

.video-info {
    padding: 14px 16px 16px;
}

.video-info h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-info .meta {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ─── Video Page ──────────────────────────── */

.video-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 60px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.back-link:hover { color: var(--accent); }

.player-wrap {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.player-wrap video {
    width: 100%;
    display: block;
    max-height: 72vh;
    object-fit: contain;
}

.video-meta h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.video-meta .desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.tag {
    display: inline-block;
    background: rgba(232, 160, 32, 0.12);
    color: var(--accent);
    border: 1px solid rgba(232, 160, 32, 0.28);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-right: 6px;
}

/* ─── Footer ──────────────────────────────── */

footer {
    text-align: center;
    padding: 20px 24px;
    color: var(--text-muted);
    font-size: 0.82rem;
    border-top: 1px solid var(--border);
}

/* ─── Not found ───────────────────────────── */

.not-found {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}

.not-found h2 { font-size: 1.4rem; margin-bottom: 8px; color: var(--text); }

/* ─── Responsive ──────────────────────────── */

@media (max-width: 600px) {
    .logo { font-size: 1.4rem; }
    .logo-sub { display: none; }
    .catalog { grid-template-columns: 1fr; }
    .video-meta h1 { font-size: 1.25rem; }
}
