:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #a855f7;
    --accent: #f43f5e;
    --bg-dark: #030712;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.1) 0%, transparent 30%);
    pointer-events: none;
    z-index: -1;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    z-index: 1000;
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition);
}

header.scrolled {
    height: 65px;
    background: rgba(3, 7, 18, 0.95);
}

.logo {
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    background: linear-gradient(90deg, #fff, var(--primary), var(--secondary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientBG 5s ease infinite;
    cursor: pointer;
}

nav ul {
    display: flex;
    list-style: none;
    gap: clamp(15px, 3vw, 40px);
}

nav ul li a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    padding: 10px 0;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
    box-shadow: 0 0 10px var(--primary-glow);
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--text-main);
}

nav ul li a.active::after {
    width: 100%;
}

.search-container {
    position: relative;
    width: 300px;
    display: none;
    /* Hidden by default on small mobile, shown on desktop */
}

@media (min-width: 1024px) {
    .search-container {
        display: block;
    }
}

.search-container input {
    width: 100%;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    padding: 10px 40px 10px 15px;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.search-container input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.search-container i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Hero Section */
.hero {
    height: 85vh;
    width: 100%;
    padding: 120px 5% 60px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--bg-dark) 20%, transparent 60%),
        linear-gradient(to top, var(--bg-dark) 5%, transparent 30%);
    z-index: 1;
}

.hero-img {
    position: absolute;
    top: 0;
    right: 0;
    width: 70%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.6;
    mask-image: linear-gradient(to left, black, transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeIn 1s ease-out;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.hero-title {
    font-size: clamp(40px, 8vw, 84px);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.hero-desc {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 25px var(--primary-glow);
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px var(--primary-glow);
}

.btn-blur {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
}

.btn-blur:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* Rows & Grid */
.row {
    padding: 40px 5%;
}

.row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.row-title {
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
}

.row-title span {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

@media (max-width: 640px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 15px;
    }
}

/* Cards */
.card {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-glass);
    background: var(--bg-card);
}

.card:hover {
    transform: scale(1.05) translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover img {
    filter: brightness(0.6);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(3, 7, 18, 0.9) 0%, transparent 60%);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: var(--transition);
}

.card:hover .card-overlay {
    opacity: 1;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: var(--transition);
    box-shadow: 0 0 20px var(--primary-glow);
}

.card:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%);
}

/* Player Overlay */
#player-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 2000;
    display: none;
    flex-direction: column;
}

.player-header {
    height: 80px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2;
}

#video-player {
    width: 100%;
    height: 100%;
    outline: none;
}

.close-player {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.close-player:hover {
    background: var(--accent);
}

/* Modal Details */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    height: auto;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .modal-content {
        flex-direction: row;
    }
}

.modal-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

@media (min-width: 768px) {
    .modal-img {
        width: 40%;
        height: auto;
    }
}

.modal-info {
    padding: 40px;
    flex: 1;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    font-size: 24px;
    color: var(--text-muted);
}

/* Utilities */
.text-accent {
    color: var(--primary);
}

.loading-skeleton {
    background: linear-gradient(90deg, var(--bg-glass) 25%, var(--border-glass) 50%, var(--bg-glass) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}