:root {
    --bg-color: #0a0a0c;
    --card-bg: #16161a;
    --accent-color: #ff3e3e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a8;
    --nav-height: 70px;
    --glass-bg: rgba(22, 22, 26, 0.7);
    --hover-color: #ff5f5f;
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Nav */
nav {
    height: var(--nav-height);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav .logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

nav .logo span {
    color: #fff;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: 0.3s;
}

nav ul li a:hover {
    color: var(--accent-color);
}

/* Header */
header {
    margin-top: calc(var(--nav-height) + 40px);
    padding: 40px 5%;
    text-align: left;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #fff, #888);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Section Title */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    margin: 40px 0 20px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--accent-color);
    border-radius: 4px;
}

/* Horizontal Scroll */
.scroll-wrapper {
    position: relative;
    padding: 0 5%;
    margin-bottom: 50px;
}

.horizontal-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0 20px;
    scrollbar-width: none;
    /* Firefox */
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
    /* Safari and Chrome */
}

/* Video Card */
.video-card {
    min-width: 280px;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.video-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255, 62, 62, 0.3);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.video-card .thumbnail-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.video-card .thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.video-card:hover .thumbnail {
    transform: scale(1.1);
}

.video-card .badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent-color);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(255, 62, 62, 0.4);
}

.video-card .duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.video-card .info {
    padding: 15px;
}

.video-card .title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8rem;
}

.video-card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Grid Layout */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 0 5%;
}

/* Nav Buttons */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    z-index: 50;
    transition: 0.3s;
}

.nav-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
}

.nav-btn.prev {
    left: 2%;
}

.nav-btn.next {
    right: 2%;
}

/* Skeleton Loading */
.skeleton {
    min-width: 280px;
    height: 250px;
    background: linear-gradient(90deg, #16161a 25%, #2a2a30 50%, #16161a 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 12px;
}

@keyframes loading {
    to {
        background-position: -200% 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    nav ul {
        display: none;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .video-card {
        min-width: 160px;
    }

    .video-card .title {
        font-size: 0.8rem;
        height: 2.4rem;
    }

    .skeleton {
        min-width: 160px;
        height: 200px;
    }
}