/* ========================================= */
/* 1. FONT YÜKLƏMƏLƏRİ (Inter) */
/* ========================================= */

/* inter-regular */
@font-face {
    font-display: swap;
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    src: url('fonts/inter-v20-latin_latin-ext-regular.woff2') format('woff2');
}

/* inter-500 */
@font-face {
    font-display: swap;
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    src: url('fonts/inter-v20-latin_latin-ext-500.woff2') format('woff2');
}

/* inter-600 */
@font-face {
    font-display: swap;
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    src: url('fonts/inter-v20-latin_latin-ext-600.woff2') format('woff2');
}

/* inter-800 */
@font-face {
    font-display: swap;
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    src: url('fonts/inter-v20-latin_latin-ext-800.woff2') format('woff2');
}

/* inter-900 */
@font-face {
    font-display: swap;
    font-family: 'Inter';
    font-style: normal;
    font-weight: 900;
    src: url('fonts/inter-v20-latin_latin-ext-900.woff2') format('woff2');
}

/* ========================================= */
/* 2. TEMA DƏYİŞƏNLƏRİ (Variables) */
/* ========================================= */

/* === KOYU TEMA (VARSAYILAN) === */
:root {
    --brand-primary: #f59e0b;
    --brand-gradient: linear-gradient(135deg, #f59e0b 0%, #ffdf9e 50%, #f59e0b 100%);
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f5f5f5;
    --text-secondary: #a3a3a3;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

/* === AÇIK TEMA === */
[data-theme="light"] {
    --bg-primary: #f3f4f6;
    --bg-secondary: #ffffff;
    --border-color: rgba(0, 0, 0, 0.06);
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --shadow-color: rgba(0, 0, 0, 0.08);
}

/* ========================================= */
/* 3. QLOBAL AYARLAR */
/* ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    /* Fontu burada məcburi tətbiq edirik */
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif !important;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 15% 25%, hsla(28, 90%, 50%, 0.08) 0%, transparent 40%), radial-gradient(circle at 85% 75%, hsla(210, 90%, 50%, 0.08) 0%, transparent 40%);
    animation: aurora 60s linear infinite alternate;
}

@keyframes aurora {
    from {
        transform: rotate(0deg) scale(1.2);
    }

    to {
        transform: rotate(360deg) scale(1.5);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 10px;
    border: 2px solid var(--bg-primary);
}

/* ========================================= */
/* 4. XÜSUSİ KOMPONENTLƏR (Header, Logo, Card) */
/* ========================================= */

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg-primary) 80%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

/* Logo Animasiyası */
.logo .vip {
    background: var(--brand-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    font-weight: 900;
    background-size: 200% auto;
    animation: gradient-flow 3s linear infinite;
}

@keyframes gradient-flow {
    to {
        background-position: 200% center;
    }
}

/* Düymələr */
.sort-btn {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.sort-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

/* Video Kartları */
.video-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.5s ease;
    overflow: hidden;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
}

.video-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -5px var(--shadow-color);
    border-color: rgba(245, 158, 11, 0.5);
}

.video-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Thumbnail və Preview */
.thumbnail-container {
    position: relative;
    overflow: hidden;
    background-color: #000;
    border-radius: 0.8rem 0.8rem 0 0;
    aspect-ratio: 16 / 10;
}

.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    z-index: 2;
}

.thumbnail-static {
    transition: opacity 0.4s ease-in-out, transform 0.6s ease;
    z-index: 1;
}

.video-card.has-preview:hover .thumbnail-preview {
    opacity: 1;
}

.video-card.has-preview:hover .thumbnail-static {
    opacity: 0;
    transform: scale(1.1);
}

.duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.35rem;
    z-index: 3;
    transition: opacity 0.3s ease;
}

.video-card.has-preview:hover .duration {
    opacity: 0;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Arama Input Animasyonu - Watch.php'den Kopyalandı */
#search-form {
    transition: all 0.5s ease-out;
}

/* Dropdown Animasiyası - Tüm dropdownlar için */
.dropdown-anim,
#profile-menu,
#theme-settings-menu {
    animation: fadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Custom Scrollbar (Dropdown üçün) */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Login Prompt Modal */
.login-prompt-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.login-prompt-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.login-prompt-box {
    background: var(--bg-secondary);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 0;
}

.login-prompt-overlay.visible .login-prompt-box {
    transform: scale(1);
}

@media (min-width: 640px) {
    .login-prompt-box {
        width: 100%;
        max-width: 500px;
        height: auto;
        border-radius: 1rem;
        border: 1px solid var(--border-color);
        box-shadow: 0 25px 50px -12px var(--shadow-color);
    }

    .duration {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
        bottom: 0.4rem;
        right: 0.4rem;
    }
}

/* Mobil Menyu */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Yeni Badge */
.today-badge {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
    color: var(--brand-primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    border: 1px solid rgba(245, 158, 11, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.today-badge .live-dot {
    width: 6px;
    height: 6px;
    background-color: #f59e0b;
    border-radius: 50%;
    box-shadow: 0 0 10px #f59e0b;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

/* Yüklənmə effekti */
#content-container.loading #video-grid-container {
    opacity: 0.5;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Mobil Axtarış Nəticələri */
.mobile-search-result {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
    text-decoration: none;
}

.mobile-search-result:hover {
    background-color: var(--bg-secondary);
}

/* Skeleton Loader */
.skeleton-card {
    background: var(--bg-secondary);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.skeleton-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 10;
    background-color: rgba(100, 100, 100, 0.1);
}

.skeleton-details {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
}

.skeleton-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(100, 100, 100, 0.1);
    flex-shrink: 0;
}

.skeleton-text-group {
    flex-grow: 1;
}

.skeleton-line {
    background-color: rgba(100, 100, 100, 0.1);
    border-radius: 0.25rem;
}

.skeleton-card,
.skeleton-line {
    animation: skeleton-pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes skeleton-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Yuxarı Çıx Düyməsi */
#scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 50;
    width: 48px;
    height: 48px;
    background-color: var(--brand-primary);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

#scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#scroll-to-top:hover {
    background-color: #ffc700;
    transform: translateY(0) scale(1.1);
}

.fa-chevron-down {
    transition: transform 0.3s ease-in-out;
}