/**
 * PrimeFlix - Ana CSS
 * Netflix tarzı koyu tema + mor vurgular
 */

/* ============================================
   DEĞİŞKENLER
   ============================================ */
:root {
    --primary: #6C5CE7;
    --primary-dark: #5B4BD6;
    --primary-light: rgba(108, 92, 231, 0.15);
    --primary-glow: rgba(108, 92, 231, 0.4);
    
    --bg: #0a0a14;
    --bg-card: #14141f;
    --bg-hover: #1f1f2e;
    --bg-elevated: #1a1a2e;
    
    --text: #ffffff;
    --text-muted: #a0a0b8;
    --text-dim: #6b6b80;
    
    --border: #25253a;
    --border-light: #333350;
    
    --success: #00b894;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #0984e3;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
    --shadow-glow: 0 8px 32px rgba(108, 92, 231, 0.35);
    
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    --container: 1400px;
    --header-height: 72px;
}

/* Light tema (opsiyonel) */
[data-theme="light"] {
    --bg: #f5f6fa;
    --bg-card: #ffffff;
    --bg-hover: #eef0f7;
    --bg-elevated: #ffffff;
    --text: #1a1a2e;
    --text-muted: #5a5a70;
    --text-dim: #8a8a9e;
    --border: #e1e5ea;
    --border-light: #d0d5dd;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }

/* ============================================
   KAPSAYICI
   ============================================ */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
}

/* ============================================
   ÜST MENÜ (HEADER)
   ============================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: rgba(10, 10, 20, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: var(--transition);
}

.site-header.scrolled {
    background: rgba(10, 10, 20, 0.95);
    border-bottom-color: var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.logo-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    box-shadow: var(--shadow-glow);
}

.logo-text { color: var(--text); }
.logo-text span { color: var(--primary); }

/* Nav */
.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-nav::-webkit-scrollbar { display: none; }

.nav-link {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    transition: var(--transition);
}

.nav-link:hover { color: var(--text); background: var(--bg-hover); }
.nav-link.active { color: var(--text); background: var(--primary-light); }

/* Header aksiyonlar */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.icon-btn {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: var(--bg-hover);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
    position: relative;
}

.icon-btn:hover { background: var(--primary-light); color: var(--primary); }

.icon-btn .badge-dot {
    position: absolute;
    top: 8px; right: 8px;
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg);
}

/* Profil menüsü */
.user-menu-wrap { position: relative; }

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 12px;
    transition: var(--transition);
}

.user-menu-btn:hover { background: var(--bg-hover); }

.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-menu-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 1001;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--text);
    transition: var(--transition);
    cursor: pointer;
}

.dropdown-item:hover { background: var(--bg-hover); }
.dropdown-item i { width: 18px; text-align: center; color: var(--primary); font-size: 14px; }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger i { color: var(--danger); }

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

/* Mobil menü butonu */
.mobile-menu-btn {
    display: none;
    width: 42px; height: 42px;
    border-radius: 12px;
    background: var(--bg-hover);
    color: var(--text);
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* ============================================
   ANASAYFA - HERO SLIDER
   ============================================ */
.hero {
    position: relative;
    height: 85vh;
    min-height: 550px;
    max-height: 800px;
    margin-top: var(--header-height);
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease;
}

.hero-slide.active { opacity: 1; visibility: visible; }

.hero-backdrop {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 20, 0.3) 0%,
        rgba(10, 10, 20, 0.7) 60%,
        var(--bg) 100%
    ),
    linear-gradient(
        to right,
        rgba(10, 10, 20, 0.9) 0%,
        rgba(10, 10, 20, 0.5) 50%,
        transparent 100%
    );
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 2;
}

.hero-info {
    max-width: 600px;
    animation: heroFadeIn 0.8s ease;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--primary);
    color: #fff;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.hero-badge.premium {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.hero-title {
    font-size: 56px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #d0d0e0;
    flex-wrap: wrap;
}

.hero-meta-item { display: flex; align-items: center; gap: 6px; }
.hero-meta-item i { color: var(--primary); }

.hero-rating { color: #f39c12; font-weight: 700; }

.hero-description {
    font-size: 15px;
    color: #b8b8c8;
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 550px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 8px 24px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px var(--primary-glow);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-glass:hover { background: rgba(255, 255, 255, 0.25); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-sm { padding: 10px 20px; font-size: 13px; }

/* Hero indicator */
.hero-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.hero-indicator {
    width: 32px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.hero-indicator.active { background: var(--primary); width: 48px; }

/* ============================================
   İÇERİK BÖLÜMÜ (Yatay Kaydırma)
   ============================================ */
.section {
    padding: 40px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i { color: var(--primary); font-size: 20px; }

.section-more {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    font-weight: 600;
}

.section-more:hover { color: var(--primary); gap: 10px; }

/* Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

@media (max-width: 640px) {
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
}

/* Kart */
.content-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    transition: var(--transition);
    cursor: pointer;
    display: block;
}

.content-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 0 0 2px var(--primary);
    z-index: 2;
}

.content-card-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    background: var(--bg-elevated);
    overflow: hidden;
}

.content-card-poster img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.content-card:hover .content-card-poster img { transform: scale(1.1); }

.content-card-placeholder {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 36px;
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-hover));
}

.content-card-overlay {
    position: absolute;
    top: 8px; right: 8px;
    display: flex;
    gap: 4px;
}

.card-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.badge-premium {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
}

.badge-quality {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    backdrop-filter: blur(10px);
}

.content-card-info {
    padding: 10px 12px;
}

.content-card-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

.content-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-muted);
}

.content-card-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #f39c12;
    font-weight: 700;
}

/* Yatay kaydırma */
.horizontal-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 4px 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    margin: 0 -24px;
    padding-left: 24px;
    padding-right: 24px;
}

.horizontal-scroll::-webkit-scrollbar { height: 6px; }
.horizontal-scroll::-webkit-scrollbar-track { background: transparent; }
.horizontal-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
.horizontal-scroll::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.horizontal-scroll .content-card {
    flex-shrink: 0;
    width: 180px;
    scroll-snap-align: start;
}

@media (max-width: 640px) {
    .horizontal-scroll { gap: 12px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
    .horizontal-scroll .content-card { width: 140px; }
}

/* ============================================
   YÜKLEME / BOŞ DURUM
   ============================================ */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.loading-state i {
    font-size: 32px;
    color: var(--primary);
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 16px;
    color: var(--primary);
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state p { font-size: 14px; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

.footer-brand { max-width: 320px; }

.footer-brand .logo { margin-bottom: 16px; }

.footer-brand p {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 8px;
}

.footer-social a {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--bg-hover);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }

.footer-col a {
    font-size: 13.5px;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-col a:hover { color: var(--primary); }

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12.5px;
    color: var(--text-dim);
}

/* ============================================
   MOBİL
   ============================================ */
@media (max-width: 900px) {
    .site-nav { display: none; }
    .mobile-menu-btn { display: flex; }
    .user-menu-name { display: none; }
    .hero { height: 70vh; min-height: 480px; }
    .hero-title { font-size: 36px; }
    .hero-description { font-size: 14px; -webkit-line-clamp: 2; }
    .btn { padding: 12px 22px; font-size: 13.5px; }
}

@media (max-width: 640px) {
    :root { --header-height: 60px; }
    .hero-title { font-size: 28px; }
    .section-title { font-size: 18px; }
    .section { padding: 28px 0; }
    .logo-text { font-size: 18px; }
    .icon-btn { width: 38px; height: 38px; font-size: 14px; }
}

/* ============================================
   UTIL
   ============================================ */
.hidden { display: none !important; }

/* Scrollbar global */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Seçim */
::selection { background: var(--primary); color: #fff; }