/* ZONE - Purple Premium */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #050505;
    --bg-elevated: #0a0a0c;
    --bg-card: #0e0e12;
    --bg-hover: #15151a;
    --border: rgba(255, 255, 255, 0.05);
    --border-strong: rgba(255, 255, 255, 0.09);
    --accent: #a78bfa;
    --accent-dim: #8b5cf6;
    --accent-glow: rgba(167, 139, 250, 0.15);
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-full: 9999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    background-image: 
        radial-gradient(ellipse 100% 60% at 50% -10%, rgba(167, 139, 250, 0.12), transparent 50%),
        radial-gradient(ellipse 80% 50% at 80% 100%, rgba(139, 92, 246, 0.06), transparent);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dim); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.container-sm { max-width: 420px; margin: 0 auto; padding: 0 24px; }

/* Header */
.header {
    background: rgba(5, 5, 5, 0.75);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.04em;
}
.logo span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a, .nav button {
    padding: 8px 14px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}
.nav a:hover, .nav button:hover { 
    color: var(--text); 
    background: var(--bg-hover);
}
.nav .btn-primary { 
    background: var(--accent);
    color: #ffffff;
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-decoration: none;
}
.btn-primary {
    background: var(--accent);
    color: #ffffff;
    font-weight: 600;
    border-color: var(--accent);
}
.btn-primary:hover { 
    background: var(--accent-dim);
    transform: translateY(-1px);
}
.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-hover); }
.btn-danger { background: #ef4444; color: white; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-full { width: 100%; }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}
.card:hover { border-color: var(--border-strong); }

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 24px 0;
}
.video-card { 
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}
.video-thumb {
    aspect-ratio: 16/9;
    background: linear-gradient(180deg, #121216 0%, #0a0a0d 100%);
    position: relative;
    overflow: hidden;
}
.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video-info { padding: 14px; }
.video-info h3 { 
    font-size: 14px; 
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}
.video-meta { 
    display: flex; 
    gap: 6px; 
    font-size: 12px; 
    color: var(--text-muted); 
    flex-wrap: wrap;
    align-items: center;
}
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
}
.outlier-badge {
    background: var(--accent);
    color: #ffffff;
    font-weight: 600;
}

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}
.form-control {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
}
textarea.form-control { min-height: 100px; resize: vertical; }

/* Search */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.search-bar input { flex: 1; }

/* Filters */
.filters { 
    display: flex; 
    gap: 6px; 
    flex-wrap: wrap; 
    margin-bottom: 20px; 
}
.filter-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}
.filter-btn:hover { border-color: var(--border-strong); color: var(--text); }
.filter-btn.active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

/* Video Detail */
.video-detail {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    padding: 32px 0;
}
.video-player {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}
.video-player video { width: 100%; display: block; }
.analysis-panel { 
    background: var(--bg-card); 
    border: 1px solid var(--border);
    border-radius: var(--radius); 
    padding: 20px; 
}
.metric { 
    display: flex; 
    justify-content: space-between; 
    padding: 12px 0; 
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.metric:last-child { border-bottom: none; }
.metric-value { font-weight: 600; color: var(--accent); }
.section-title { 
    font-size: 11px; 
    font-weight: 600;
    margin: 20px 0 8px; 
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hero */
.hero {
    text-align: center;
    padding: 100px 0 80px;
}
.hero h1 { 
    font-size: 48px; 
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    line-height: 1.1;
}
.hero p { 
    font-size: 18px; 
    color: var(--text-secondary); 
    max-width: 480px; 
    margin: 0 auto 32px;
    line-height: 1.6;
}

/* Admin */
.admin-sidebar {
    width: 220px;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border);
    min-height: calc(100vh - 60px);
    padding: 16px 0;
}
.admin-layout { display: flex; }
.admin-content { flex: 1; padding: 32px; }
.admin-nav a {
    display: block;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}
.admin-nav a:hover, .admin-nav a.active {
    color: var(--text);
    background: var(--bg-hover);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success { background: var(--accent-glow); color: var(--accent); }
.alert-error { background: rgba(239, 68, 68, 0.1); color: #f87171; }
.alert-warning { background: rgba(234, 179, 8, 0.1); color: #fbbf24; }

/* Feed */
.feed-scroll {
    height: calc(100vh - 60px);
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}
.feed-item {
    height: calc(100vh - 60px);
    scroll-snap-align: start;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    padding: 20px 24px;
    align-items: center;
}
.feed-video {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    max-height: 80vh;
}
.feed-video video, .feed-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.feed-info { max-height: 80vh; overflow-y: auto; }
.feed-info h2 { font-size: 22px; font-weight: 600; margin-bottom: 12px; }
.feed-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.feed-section { margin-bottom: 16px; }
.feed-section h4 { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.feed-section p { color: var(--text-secondary); font-size: 14px; line-height: 1.6; }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    
    .header { padding: 12px 0; }
    .header-inner { flex-wrap: wrap; gap: 8px; }
    .logo { font-size: 18px; }
    .nav { 
        width: 100%; 
        gap: 4px;
        overflow-x: auto;
        padding-bottom: 4px;
    }
    .nav a, .nav button { 
        padding: 6px 10px; 
        font-size: 13px;
        white-space: nowrap;
    }
    
    .hero { padding: 48px 0 32px; }
    .hero h1 { font-size: 26px; }
    .hero p { font-size: 15px; margin-bottom: 24px; }
    
    .video-grid { grid-template-columns: 1fr; gap: 16px; }
    .video-info { padding: 12px; }
    .video-info h3 { font-size: 14px; }
    
    .filters { 
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        margin-bottom: 16px;
    }
    .filter-btn { white-space: nowrap; font-size: 12px; padding: 6px 10px; }
    
    .search-bar { flex-direction: column; }
    .search-bar .btn { width: 100%; }
    
    .video-detail { grid-template-columns: 1fr; gap: 20px; padding: 20px 0; }
    .analysis-panel { padding: 16px; }
    .metric { font-size: 13px; padding: 10px 0; }
    
    /* Feed mobile */
    .feed-scroll {
        height: auto;
        overflow-y: visible;
        scroll-snap-type: none;
    }
    .feed-item {
        display: flex;
        flex-direction: column;
        height: auto;
        padding: 16px;
        gap: 12px;
        margin-bottom: 20px;
        border-bottom: 1px solid var(--border);
    }
    .feed-video {
        width: 100%;
        height: 56vw;
        max-height: 280px;
        order: 1;
    }
    .feed-info {
        order: 2;
        max-height: none;
        overflow: visible;
    }
    .feed-info h2 { font-size: 18px; margin-bottom: 8px; }
    .feed-meta { margin-bottom: 12px; }
    .feed-section { margin-bottom: 12px; }
    .feed-section p { font-size: 13px; }
    .feed-nav { display: none; }
    
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; min-height: auto; border-right: none; border-bottom: 1px solid var(--border); }
    .admin-content { padding: 20px 16px; }
    .admin-nav { display: flex; overflow-x: auto; }
    .admin-nav a { white-space: nowrap; }
}

@media (max-width: 380px) {
    .hero h1 { font-size: 22px; }
    .feed-video { height: 50vw; }
    .nav a, .nav button { padding: 6px 8px; font-size: 12px; }
}

/* Utility */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-4 { margin-top: 24px; }
.mb-4 { margin-bottom: 24px; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }