/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-card: #222;
    --bg-hover: #2a2a2a;
    --bg-elevated: #2a2a2a;
    --text-primary: #f1f1f1;
    --text-secondary: #aaa;
    --text-muted: #717171;
    --accent: #ff0000;
    --accent-hover: #cc0000;
    --border: #303030;
    --shadow: 0 2px 8px rgba(0,0,0,0.4);
    --radius: 12px;
    --radius-sm: 8px;
    --header-h: 60px;
    --sidebar-w: 240px;
    --sidebar-collapsed-w: 72px;
    --nav-h: 56px;
    font-size: 14px;
}
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, textarea, select {
    font: inherit; color: inherit;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    width: 100%;
    outline: none;
    transition: border-color .2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 80px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23aaa' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius-sm);
    font-weight: 500; font-size: 14px;
    transition: all .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { border: 1px solid var(--border); color: var(--text-primary); }
.btn-outline:hover { background: var(--bg-hover); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-success { background: #27ae60; color: #fff; }
.btn-warning { background: #f39c12; color: #000; }
.btn-upload {
    background: var(--bg-hover); color: var(--text-primary);
    border-radius: 20px; padding: 8px 16px;
    font-size: 14px;
}
.btn-upload:hover { background: var(--bg-elevated); }

/* ===== ALERTS ===== */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.alert-error { background: rgba(231,76,60,0.15); color: #e74c3c; border: 1px solid rgba(231,76,60,0.3); }
.alert-success { background: rgba(46,204,113,0.15); color: #2ecc71; border: 1px solid rgba(46,204,113,0.3); }
.text-muted { color: var(--text-muted); }
.text-danger { color: #e74c3c; }
.badge-success { color: #2ecc71; }
.badge-danger { color: #e74c3c; }

/* ===== AUTH PAGES ===== */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg-primary); }
.auth-container { width: 100%; max-width: 400px; padding: 20px; }
.auth-card {
    background: var(--bg-secondary); border-radius: var(--radius);
    padding: 40px 30px; text-align: center;
    border: 1px solid var(--border);
}
.auth-logo { margin-bottom: 8px; }
.auth-logo i { font-size: 48px; color: var(--accent); }
.auth-logo h1 { font-size: 28px; margin-top: 8px; }
.auth-tagline { color: var(--text-secondary); margin-bottom: 24px; }
.auth-form .form-group { margin-bottom: 14px; }
.auth-form .btn { margin-top: 8px; }
.auth-link { margin-top: 20px; color: var(--text-secondary); }
.auth-link a { color: var(--accent); }
.auth-link a:hover { text-decoration: underline; }
.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0; color: var(--text-secondary); font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
    background: var(--bg-secondary); color: var(--text-primary);
    border: 1px solid var(--border); font-size: 14px; font-weight: 500;
    transition: background .2s;
}
.btn-google:hover { background: var(--bg-hover); text-decoration: none; }

/* ===== HEADER ===== */
.main-header {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--bg-secondary);
    display: flex; align-items: center;
    padding: 0 16px;
    gap: 16px;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}
.header-left { display: flex; align-items: center; gap: 12px; min-width: 160px; }
.sidebar-toggle {
    font-size: 20px; padding: 8px;
    border-radius: 50%; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
}
.sidebar-toggle:hover { background: var(--bg-hover); }
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; }
.logo i { color: var(--accent); font-size: 28px; }
.logo img { height: 32px; width: auto; display: block; }
.header-center { flex: 1; max-width: 600px; margin: 0 auto; }
.search-bar { position: relative; }
.search-bar .search-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 14px;
}
.search-bar input {
    padding-left: 40px; padding-right: 36px;
    background: var(--bg-primary); border-radius: 20px;
    border: 1px solid var(--border);
    height: 40px;
}
.search-bar input:focus { border-color: #555; }
.search-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: none; padding: 6px; color: var(--text-muted); }
.search-clear.show { display: block; }
.search-suggestions {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-elevated); border-radius: var(--radius-sm);
    border: 1px solid var(--border); margin-top: 4px;
    display: none; z-index: 100;
    max-height: 400px; overflow-y: auto;
}
.search-suggestions.show { display: block; }
.search-suggestion { display: flex; align-items: center; gap: 12px; padding: 10px 16px; cursor: pointer; }
.search-suggestion:hover { background: var(--bg-hover); }
.search-suggestion img { width: 40px; height: 28px; object-fit: cover; border-radius: 4px; }
.search-suggestion .suggestion-title { font-size: 13px; }
.search-suggestion .suggestion-views { font-size: 12px; color: var(--text-muted); }
.header-right { display: flex; align-items: center; gap: 12px; }
.header-icon { position: relative; padding: 8px; border-radius: 50%; font-size: 20px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.header-icon:hover { background: var(--bg-hover); }
.header-icon.app-btn { width: auto; border-radius: 20px; padding: 8px 14px; gap: 6px; font-size: 14px; font-weight: 600; }

/* ===== MOBILE SEARCH OVERLAY ===== */
.search-mobile-btn { display: none; }
.search-overlay {
    display: none; position: fixed; inset: 0;
    background: var(--bg-primary); z-index: 9999;
    flex-direction: column;
}
.search-overlay.open { display: flex; }
.search-overlay-header {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}
.search-overlay-close {
    font-size: 22px; padding: 8px;
    background: none; border: none; color: var(--text);
    cursor: pointer;
}
.search-overlay-input-wrap {
    flex: 1; display: flex; align-items: center;
    position: relative;
}
.search-overlay-input-wrap input {
    width: 100%; padding: 10px 16px; padding-right: 36px;
    border-radius: 20px; border: 1px solid var(--border);
    background: var(--bg-primary); color: var(--text);
    font-size: 16px;
}
.search-overlay-input-wrap input:focus { outline: none; border-color: var(--accent); }
.search-overlay-clear {
    position: absolute; right: 8px; display: none;
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; padding: 4px; font-size: 16px;
}
.search-overlay-clear.show { display: block; }
.search-overlay-suggestions {
    flex: 1; overflow-y: auto; padding: 8px 0;
}
.search-overlay-suggestions .search-suggestion { padding: 12px 16px; }
.search-overlay-suggestions .search-suggestion img { width: 48px; height: 32px; }
.header-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.notif-badge {
    position: absolute; top: 4px; right: 4px;
    background: var(--accent); color: #fff;
    font-size: 11px; font-weight: 700;
    min-width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px; padding: 0 4px;
}

/* ===== DROPDOWNS ===== */
.notif-dropdown, .profile-dropdown {
    position: absolute; top: 100%; right: 0;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-sm); width: 320px;
    display: none; z-index: 1001;
    box-shadow: var(--shadow);
}
.profile-dropdown { width: 220px; }
.notif-dropdown.show, .profile-dropdown.show { display: block; }
.notif-header { padding: 14px 16px; font-weight: 600; border-bottom: 1px solid var(--border); }
.notif-list { max-height: 300px; overflow-y: auto; }
.notif-item { display: flex; gap: 12px; padding: 12px 16px; align-items: flex-start; }
.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { background: rgba(255,0,0,0.05); }
.notif-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-hover); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-body p { font-size: 13px; }
.notif-body small { font-size: 12px; color: var(--text-muted); }
.notif-empty { padding: 30px; text-align: center; color: var(--text-muted); }
.notif-mark-read { display: block; padding: 10px 16px; text-align: center; font-size: 13px; color: var(--accent); border-top: 1px solid var(--border); }
.notif-push-section { border-top: 1px solid var(--border); padding: 8px; }
.notif-push-btn { width: 100%; padding: 10px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: opacity .2s; }
.notif-push-btn:hover { opacity: .85; }
.dropdown-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; font-size: 14px; }
.dropdown-item:hover { background: var(--bg-hover); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed; top: var(--header-h); left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--bg-secondary);
    overflow-y: auto;
    z-index: 900;
    padding: 8px 0;
    border-right: 1px solid var(--border);
    transition: transform .3s;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.sidebar-nav { display: flex; flex-direction: column; }
.sidebar-item {
    display: flex; align-items: center; gap: 14px;
    padding: 10px 24px;
    font-size: 14px;
    transition: background .2s;
}
.sidebar-item:hover { background: var(--bg-hover); }
.sidebar-item.active { background: var(--bg-hover); font-weight: 600; }
.sidebar-item i { font-size: 20px; width: 24px; text-align: center; }
.sidebar-divider { height: 1px; background: var(--border); margin: 8px 16px; }
.sidebar-label { padding: 8px 24px; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.sidebar-footer { padding: 16px 24px; font-size: 12px; color: var(--text-muted); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 899; }

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-top: var(--header-h);
    margin-left: var(--sidebar-w);
    min-height: calc(100vh - var(--header-h));
    padding: 20px 24px;
    padding-bottom: calc(20px + var(--nav-h));
}
.main-content.no-sidebar { margin-left: 0; }

/* ===== HOMEPAGE ===== */
.hero-card { display: block; margin-bottom: 24px; border-radius: var(--radius); overflow: hidden; position: relative; }
.hero-thumb { position: relative; aspect-ratio: 16/9; max-height: 400px; overflow: hidden; }
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 60px; height: 60px; background: rgba(0,0,0,0.7);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: #fff;
}
.hero-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 40px 20px 16px;
}
.hero-overlay h2 { font-size: 22px; margin-bottom: 6px; }
.hero-meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-secondary); }

.category-pills {
    display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 16px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.category-pills::-webkit-scrollbar { display: none; }
.pill {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; background: var(--bg-hover);
    border-radius: 20px; white-space: nowrap;
    font-size: 13px; transition: background .2s;
}
.pill:hover { background: var(--bg-elevated); }

.video-section { margin-bottom: 32px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 4px; }
.section-header h2 { font-size: 20px; display: flex; align-items: center; gap: 8px; }
.section-subtitle { font-size: 13px; color: var(--text-muted); }
.section-link { font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.section-link:hover { color: var(--accent); }

/* Category rows */
.category-row { margin-bottom: 24px; }
.category-row-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
}
.category-row-header h3 {
    font-size: 16px; display: flex; align-items: center; gap: 6px;
}
.ad-category-gap { margin-bottom: 24px; margin-top: -8px; }
.ad-category-gap .ad-placeholder { margin-bottom: 0; }

/* Horizontal category row */
.horizontal-scroll {
    display: grid; grid-auto-flow: column; grid-auto-columns: 200px;
    gap: 14px; overflow-x: auto; padding-bottom: 4px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.horizontal-scroll::-webkit-scrollbar { height: 4px; }
.horizontal-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.card-scroll { scroll-snap-align: start; }

/* ===== VIDEO GRID ===== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.video-card {
    cursor: pointer; border-radius: var(--radius-sm);
    overflow: hidden; transition: transform .2s;
}
.video-card:hover { transform: translateY(-2px); }
.video-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; border-radius: var(--radius-sm); background: var(--bg-card); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.video-card:hover .video-thumb img { transform: scale(1.05); }
.video-duration {
    position: absolute; bottom: 6px; right: 6px;
    background: rgba(0,0,0,0.8); color: #fff;
    font-size: 12px; padding: 2px 6px; border-radius: 4px;
}
.video-status {
    position: absolute; top: 6px; right: 6px;
    font-size: 11px; padding: 2px 8px; border-radius: 4px;
    background: rgba(0,0,0,0.8);
}
.video-status.pending { color: #f39c12; }
.video-status.approved { color: #2ecc71; }
.video-status.rejected { color: #e74c3c; }
.video-info { padding: 10px 4px; }
.video-info h3 { font-size: 14px; font-weight: 500; line-height: 1.3; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.video-author { color: var(--text-secondary); }

.load-more-wrap { text-align: center; margin-top: 20px; }

/* ===== WATCH PAGE ===== */
.watch-layout { display: flex; gap: 24px; }
.watch-main { flex: 1; min-width: 0; max-width: 100%; }
.watch-sidebar { width: 350px; flex-shrink: 0; }
.video-player-wrap {
    aspect-ratio: 16/9; background: #000;
    border-radius: var(--radius-sm); overflow: hidden;
    margin-bottom: 16px;
}
.video-player-wrap iframe { width: 100%; height: 100%; border: 0; }
.video-player-wrap.is-facebook {
    background: #000; border-radius: var(--radius-sm); margin-bottom: 16px;
    aspect-ratio: unset; overflow: visible; height: auto; min-height: 250px;
}
.video-player-wrap.is-facebook .fb-video { width: 100% !important; }

/* Ads */
.ad-label { font-size: 11px; color: var(--text-muted); text-align: center; padding: 4px 0; }
.ad-placeholder {
    background: var(--bg-hover); border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 13px;
    margin-bottom: 16px;
}
.ad-728 { height: 90px; }
.ad-300 { height: 250px; }

/* Header Ad */
.ad-header { margin-bottom: 20px; }
.ad-desktop { height: 90px; margin-bottom: 0; }
.ad-mobile-header { height: 50px; margin-bottom: 0; display: none; }
.ad-header .ad-label { margin-bottom: 4px; }
.ad-mobile-320 { height: 50px; display: none; margin-bottom: 0; }
.ad-native-banner { height: 120px; }
.ad-native-mobile { height: 250px; display: none; }
.ad-mobile-only { display: none; }
.ad-infeed { margin-bottom: 24px; }
.ad-banner-top { margin-bottom: 16px; }
.ad-socialbar { display: none; margin-bottom: 16px; }
.ad-sidebar { margin-bottom: 16px; }

/* ===== SOCIAL BAR (GLOBAL) ===== */
.social-bar {
    position: fixed; left: 0; right: 0; z-index: 998;
    background: var(--bg-secondary);
    padding: 4px 12px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.social-bar-top {
    top: var(--header-h);
    border-bottom: 1px solid var(--border);
}
.social-bar-bottom {
    bottom: var(--nav-h);
    border-top: 1px solid var(--border);
}

/* Video Info */
.video-info-section { margin-bottom: 24px; }
.video-title { font-size: 20px; font-weight: 600; margin-bottom: 10px; line-height: 1.4; }
.video-actions-row {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.video-stats-row { font-size: 14px; color: var(--text-secondary); display: flex; gap: 12px; }
.video-actions { display: flex; gap: 8px; }
.action-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 20px;
    background: var(--bg-hover); font-size: 14px;
    transition: background .2s;
}
.action-btn:hover { background: var(--bg-elevated); }
.action-btn.active { background: rgba(255,0,0,0.15); color: var(--accent); }

.creator-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-top: 1px solid var(--border);
    margin-bottom: 12px;
}
.creator-info { display: flex; align-items: center; gap: 12px; }
.creator-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

.video-description {
    background: var(--bg-card); border-radius: var(--radius-sm);
    padding: 12px 16px; font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* ===== SIDEBAR ===== */
.sidebar-title { font-size: 16px; margin-bottom: 12px; }
.related-list { display: flex; flex-direction: column; gap: 10px; }
.related-card { display: flex; gap: 8px; }
.related-thumb { width: 168px; height: 94px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-info h4 { font-size: 13px; font-weight: 500; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-info span { display: block; font-size: 12px; color: var(--text-muted); }

/* ===== COMMENTS ===== */
.comments-section { margin-top: 24px; }
.comments-title { font-size: 18px; margin-bottom: 16px; }
.comment-form { display: flex; gap: 12px; margin-bottom: 20px; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-input-wrap { flex: 1; }
.comment-input-wrap textarea {
    background: transparent; border: none; border-bottom: 1px solid var(--border);
    border-radius: 0; padding: 8px 0; min-height: auto; margin-bottom: 8px;
}
.comment-input-wrap textarea:focus { border-bottom-color: var(--accent); }
.comment-login-msg { padding: 20px 0; font-size: 14px; color: var(--text-muted); }
.comment-login-msg a { color: var(--accent); }
.comment { display: flex; gap: 12px; margin-bottom: 16px; }
.comment-body p { font-size: 14px; margin-bottom: 4px; }
.comment-actions { display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--text-muted); }
.comment-reply-btn { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.comment-reply-btn:hover { color: var(--text-primary); }
.comment-delete-btn, .comment-pin-btn {
    font-size: 12px; background: none; border: none; cursor: pointer;
    padding: 2px 4px; border-radius: 4px; color: var(--text-muted);
    transition: color .2s;
}
.comment-delete-btn:hover { color: #e74c3c; }
.comment-pin-btn:hover { color: var(--accent); }
.pinned-badge {
    display: inline-block; font-size: 11px; color: var(--accent);
    margin-left: 6px; font-weight: 500;
}
.pinned-badge i { font-size: 11px; }
.comment.reply { margin-left: 48px; }

/* ===== MOBILE COMMENTS SHEET ===== */
.desktop-only { display: block; }
.mobile-only { display: none; }
.comments-preview { cursor: pointer; }
.comments-preview .comments-list { max-height: none; }
.comments-preview .comments-list .comment:not(:first-child) { display: none; }
.view-all-btn { width: 100%; margin-top: 8px; }
.add-comment-btn { width: 100%; margin-top: 8px; }
.comments-sheet-overlay {
    display: none; position: fixed; inset: 0; z-index: 9998;
    background: rgba(0,0,0,0.5);
}
.comments-sheet {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    background: var(--bg-secondary); border-radius: 16px 16px 0 0;
    max-height: 90vh; display: flex; flex-direction: column;
    transform: translateY(100%); transition: transform .3s ease;
}
.comments-sheet.open { transform: translateY(0); }
.comments-sheet.open + .comments-sheet-overlay { display: block; }
.sheet-header {
    display: flex; align-items: center; gap: 12px; padding: 16px;
    border-bottom: 1px solid var(--border); flex-shrink: 0;
    background: var(--bg-secondary); border-radius: 16px 16px 0 0;
}
.sheet-close-btn {
    background: none; border: none; color: var(--text-primary);
    font-size: 20px; cursor: pointer; padding: 4px;
}
.sheet-title { flex: 1; font-size: 16px; }
.sheet-sort { display: flex; gap: 4px; }
.sort-btn {
    background: none; border: 1px solid var(--border); color: var(--text-secondary);
    padding: 4px 14px; border-radius: 16px; font-size: 13px; cursor: pointer;
    transition: all .2s;
}
.sort-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.sheet-body {
    flex: 1; overflow-y: auto; padding: 16px;
    -webkit-overflow-scrolling: touch;
}
.sheet-loading { text-align: center; color: var(--text-muted); padding: 40px 0; }
.sheet-footer {
    display: flex; gap: 12px; align-items: center;
    padding: 12px 16px; border-top: 1px solid var(--border);
    background: var(--bg-secondary); flex-shrink: 0;
}
.sheet-footer .comment-input-wrap { flex: 1; }
.sheet-footer .comment-input-wrap textarea { margin-bottom: 0; }

/* ===== NOTIFICATION SHEET (MOBILE) ===== */
.notif-sheet-overlay {
    display: none; position: fixed; inset: 0; z-index: 9998;
    background: rgba(0,0,0,0.5);
}
.notif-sheet {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    background: var(--bg-secondary); border-radius: 16px 16px 0 0;
    max-height: 90vh; display: flex; flex-direction: column;
    transform: translateY(100%); transition: transform .3s ease;
}
.notif-sheet.open { transform: translateY(0); }
.notif-sheet.open + .notif-sheet-overlay { display: block; }
.notif-sheet-item {
    display: flex; gap: 12px; padding: 14px 16px; align-items: flex-start;
    border-bottom: 1px solid var(--border); cursor: pointer; text-decoration: none;
    color: var(--text-primary); transition: background .15s;
}
.notif-sheet-item:hover { background: var(--bg-hover); }
.notif-sheet-item.unread { background: rgba(255,0,0,0.04); }
.notif-sheet-avatar {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
    background: var(--bg-hover); flex-shrink: 0;
}
.notif-sheet-body { flex: 1; min-width: 0; }
.notif-sheet-msg { font-size: 13px; line-height: 1.4; margin-bottom: 2px; }
.notif-sheet-time { font-size: 12px; color: var(--text-muted); }
.notif-empty {
    text-align: center; color: var(--text-muted);
    padding: 40px 20px; font-size: 14px;
}
@media (max-width: 768px) {
    #notifMobileBadge,
.notif-badge-mobile {
        position: absolute; top: -4px; right: 2px;
        background: var(--accent); color: #fff;
        font-size: 9px; font-weight: 700;
        min-width: 16px; height: 16px; line-height: 16px;
        display: flex; align-items: center; justify-content: center;
        border-radius: 10px; padding: 0 3px;
    }
    .notif-badge-mobile { top: -4px; right: 6px; }
}

/* ===== MOBILE RELATED VIDEOS ===== */
.mobile-related-section h3 { font-size: 18px; margin-bottom: 12px; }
.mobile-related-scroll { display: block; padding: 0; }
.mobile-related-card {
    text-decoration: none; color: inherit;
    border-radius: var(--radius-sm); overflow: hidden;
    display: block; margin-bottom: 16px;
}
.mobile-related-thumb {
    position: relative; aspect-ratio: 16/9; overflow: hidden;
    border-radius: var(--radius-sm); background: var(--bg-card);
}
.mobile-related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mobile-related-info { padding: 8px 4px; }
.mobile-related-info h4 {
    font-size: 14px; font-weight: 500; line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.mobile-related-meta {
    font-size: 12px; color: var(--text-muted);
}

/* ===== UPLOAD PAGE ===== */
.upload-page { max-width: 640px; margin: 0 auto; }
.upload-container { padding: 20px 0; }
.upload-title { font-size: 24px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.upload-subtitle { color: var(--text-muted); margin-bottom: 24px; }
.upload-form .form-group { margin-bottom: 18px; }
.upload-form label { display: block; font-weight: 500; margin-bottom: 6px; }
.video-preview {
    display: flex; gap: 16px; align-items: center;
    background: var(--bg-card); border-radius: var(--radius-sm);
    padding: 16px; margin-bottom: 18px;
}
.video-preview img { width: 160px; height: 90px; object-fit: cover; border-radius: 6px; }
.preview-info strong { display: block; margin-bottom: 4px; }
.preview-info span { font-size: 13px; color: var(--text-muted); }

/* ===== SHORTS ===== */
.shorts-container {
    height: calc(100vh - var(--header-h) - var(--nav-h));
    overflow: hidden; position: relative;
    margin: 0 auto; max-width: 440px;
    transition: max-width .2s;
}
.shorts-viewport {
    height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
}
.short-card {
    height: 100%; scroll-snap-align: start;
    position: relative; display: flex; align-items: center; justify-content: center;
    background: #000; transition: opacity .3s;
}
.short-card:not(.active) { opacity: .6; }
.short-player {
    position: absolute; inset: 0;
}
.short-player iframe { width: 100%; height: 100%; }
.short-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 60px 16px 20px;
    display: flex; justify-content: space-between; align-items: flex-end;
}
.short-info { flex: 1; }
.short-title { font-size: 16px; font-weight: 600; display: block; margin-bottom: 4px; }
.short-creator { font-size: 13px; color: var(--text-secondary); }
.short-actions { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.short-action-btn {
    display: flex; flex-direction: column; align-items: center;
    gap: 4px; font-size: 12px; color: #fff;
}
.short-action-btn i {
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.short-sponsored {
    height: 100%; scroll-snap-align: start;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--bg-primary); gap: 12px;
}

/* ===== SHORTS SCROLL INDICATOR DOTS ===== */
.shorts-dots {
    position: fixed; right: 10px; top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 8px; z-index: 50;
    pointer-events: none;
}
.shorts-dots span {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,.3); cursor: pointer;
    transition: all .2s; pointer-events: auto;
}
.shorts-dots span.active {
    background: #fff; transform: scale(1.4);
}

/* ===== SHORTS RESPONSIVE ===== */
@media (max-width: 768px) {
    .shorts-container {
        max-width: none;
        margin: -20px -24px;
    }
    .short-overlay {
        padding: 40px 12px 12px;
    }
    .short-actions {
        position: absolute; right: 10px;
        top: 50%; transform: translateY(-50%);
        gap: 14px; z-index: 5;
    }
    .short-action-btn i {
        width: 40px; height: 40px; font-size: 18px;
    }
    .short-title { font-size: 14px; }
    .short-creator { font-size: 12px; }
    .short-card:not(.active) { opacity: 1; }
    .shorts-dots { right: 6px; gap: 6px; }
    .shorts-dots span { width: 5px; height: 5px; }
}

@media (max-width: 480px) {
    .shorts-container { margin: -12px -12px; }
    .short-overlay { padding: 30px 10px 10px; }
    .short-actions { right: 8px; gap: 12px; }
    .short-action-btn i { width: 36px; height: 36px; font-size: 16px; }
    .shorts-dots { right: 4px; gap: 5px; }
    .shorts-dots span { width: 4px; height: 4px; }
}

/* ===== SHORTS COMMENTS SHEET ===== */
.shorts-comments-sheet { z-index: 99999; }
.shorts-comments-sheet.open + .comments-sheet-overlay { z-index: 99998; }

/* ===== FLOATING BOTTOM AD BAR ===== */
.bottom-float-ad {
    position: fixed; bottom: var(--nav-h); left: 0; right: 0;
    z-index: 999;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 4px 12px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.bottom-float-ad .ad-label {
    font-size: 10px;
    margin: 0;
    white-space: nowrap;
}
.bottom-float-ad .ad-placeholder {
    margin-bottom: 0;
    flex: 1;
}
@media (max-width: 768px) {
    .bottom-float-ad { display: flex; }
}

/* ===== SEARCH ===== */
.search-header { margin-bottom: 20px; }
.search-header h1 { font-size: 20px; }
.search-header span { color: var(--text-muted); font-size: 14px; }

/* ===== CATEGORY PAGE ===== */
.category-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding-left: 16px; }
.category-header i { font-size: 32px; }
.category-header h1 { font-size: 24px; }

/* ===== PROFILE PAGE ===== */
.profile-header { margin-bottom: 24px; }
.profile-cover {
    height: 200px; background: var(--bg-card);
    border-radius: var(--radius-sm);
    position: relative;
    background-size: cover; background-position: center;
    margin-bottom: -48px;
}
.profile-cover:not([style*="url"]) {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-hover) 100%);
}
.cover-edit-btn {
    position: absolute; bottom: 12px; right: 12px;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(0,0,0,0.6); color: #fff; border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 14px; transition: background .2s;
}
.cover-edit-btn:hover { background: rgba(0,0,0,0.8); }
.profile-avatar-wrap {
    position: relative; width: 96px; height: 96px;
    margin-left: 24px; z-index: 1;
}
.profile-avatar {
    width: 96px; height: 96px; border-radius: 50%;
    border: 4px solid var(--bg-primary);
    object-fit: cover; display: block;
}
.avatar-edit-btn {
    position: absolute; bottom: 4px; right: 4px;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--accent); color: #fff; border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 12px; transition: background .2s; box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.avatar-edit-btn:hover { background: var(--accent-hover); }
.profile-info { padding: 52px 16px 16px; }
.profile-info h1 { font-size: 24px; margin-bottom: 4px; }
.profile-bio { color: var(--text-secondary); margin-bottom: 12px; }
.profile-stats { display: flex; gap: 20px; margin-bottom: 12px; font-size: 14px; color: var(--text-secondary); }
.profile-stats strong { color: var(--text-primary); }
.profile-followers { margin-bottom: 24px; }
.profile-followers h3 { font-size: 16px; margin-bottom: 12px; }
.follower-avatars { display: flex; gap: 8px; }
.follower-avatar img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.profile-videos h3 { font-size: 18px; margin-bottom: 16px; }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center; padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; opacity: .5; }

/* ===== ERROR PAGE ===== */
.error-page { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.error-content { text-align: center; }
.error-content i { font-size: 64px; color: var(--text-muted); margin-bottom: 16px; }
.error-content h1 { font-size: 72px; font-weight: 800; }
.error-content p { font-size: 18px; color: var(--text-muted); margin-bottom: 24px; }

/* ===== ADMIN ===== */
.admin-page { max-width: 1200px; }
.admin-header {
    margin-bottom: 28px; padding: 24px 0 0;
    border-bottom: 1px solid var(--border); padding-bottom: 20px;
}
.admin-header h1 { font-size: 26px; display: flex; align-items: center; gap: 10px; }
.admin-header h1 i { color: var(--accent); }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
    background: var(--bg-card); border-radius: var(--radius-sm);
    padding: 20px; display: flex; align-items: center; gap: 16px;
    transition: transform .15s, box-shadow .15s;
    position: relative; overflow: hidden;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.stat-card .stat-icon {
    width: 48px; height: 48px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.stat-card .stat-icon.users { background: rgba(52,152,219,0.15); color: #3498db; }
.stat-card .stat-icon.videos { background: rgba(46,204,113,0.15); color: #2ecc71; }
.stat-card .stat-icon.views { background: rgba(155,89,182,0.15); color: #9b59b6; }
.stat-card .stat-icon.pending { background: rgba(243,156,18,0.15); color: #f39c12; }
.stat-card .stat-body strong { display: block; font-size: 24px; line-height: 1.2; }
.stat-card .stat-body span { font-size: 13px; color: var(--text-muted); }
.admin-section {
    background: var(--bg-card); border-radius: var(--radius-sm);
    padding: 20px; margin-bottom: 24px;
}
.admin-section h2 {
    font-size: 16px; margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 8px;
}
.admin-section h2 .badge {
    margin-left: auto; background: var(--accent); color: #fff;
    font-size: 12px; padding: 2px 10px; border-radius: 12px;
    font-weight: 600;
}
.admin-table-wrap { overflow-x: auto; margin: 0 -20px 0; padding: 0 20px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 12px; border-bottom: 1px solid var(--border); }
.admin-table th { font-weight: 600; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.admin-table tr:hover { background: var(--bg-hover); }
.admin-thumb { width: 80px; height: 45px; object-fit: cover; border-radius: 4px; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-badge {
    display: inline-block; padding: 2px 10px; border-radius: 10px;
    font-size: 12px; font-weight: 600;
}
.admin-badge.active { background: rgba(46,204,113,0.15); color: #2ecc71; }
.admin-badge.banned { background: rgba(231,76,60,0.15); color: #e74c3c; }
.admin-badge.pending { background: rgba(243,156,18,0.15); color: #f39c12; }
.admin-badge.approved { background: rgba(46,204,113,0.15); color: #2ecc71; }
.admin-badge.rejected { background: rgba(231,76,60,0.15); color: #e74c3c; }
.admin-badge.completed { background: rgba(46,204,113,0.15); color: #27ae60; }
.admin-source { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.text-muted { color: var(--text-muted); }
@media(max-width:768px){
    .admin-stats { grid-template-columns: repeat(2,1fr); gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card .stat-icon { width: 40px; height: 40px; font-size: 18px; }
    .stat-card .stat-body strong { font-size: 20px; }
    .admin-section { padding: 14px; }
    .admin-table th, .admin-table td { padding: 8px 8px; font-size: 13px; }
    .admin-thumb { width: 60px; height: 34px; }
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--nav-h); background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    display: none; align-items: center; justify-content: space-around;
    z-index: 1000;
}
.bottom-nav-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 2px; font-size: 10px; color: var(--text-muted);
    padding: 4px 12px; position: relative;
}
.bottom-nav-item i { font-size: 20px; }
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-item.upload-nav i {
    font-size: 32px; color: var(--accent);
    margin-top: -8px;
}

/* ===== ADMIN REPORTS STAT ===== */
.stat-icon.reports { background: rgba(231,76,60,0.15); }
.stat-icon.reports i { color: #e74c3c; }

.admin-badge.approved { background: rgba(46,204,113,0.2); color: #2ecc71; }
.admin-badge.pending { background: rgba(243,156,18,0.2); color: #f39c12; }
.admin-badge.rejected { background: rgba(231,76,60,0.2); color: #e74c3c; }

/* ===== REPORT MODAL ===== */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,0.7); align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
    background: var(--card); border-radius: 12px; padding: 30px;
    max-width: 480px; width: 90%; position: relative;
    max-height: 85vh; overflow-y: auto;
}
.modal-close {
    position: absolute; top: 12px; right: 16px; background: none; border: none;
    color: var(--text-muted); font-size: 24px; cursor: pointer;
}
.modal-box h3 { margin: 0 0 8px; color: var(--text); }
.modal-desc { color: var(--text-muted); margin-bottom: 16px; font-size: 14px; }
.modal-box textarea {
    width: 100%; padding: 12px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--bg); color: var(--text); resize: vertical; font-family: inherit;
    margin-bottom: 16px;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
#reportFeedback { margin-top: 12px; }
.error-msg { color: #e74c3c; font-size: 13px; }
.success-msg { color: #2ecc71; font-size: 13px; }
.btn-outline {
    background: transparent; border: 1px solid var(--border); color: var(--text);
}
.btn-outline:hover { background: var(--border); }

/* ===== FORM ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text-primary); }
.form-group textarea {
    width: 100%; padding: 12px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--bg-secondary); color: var(--text-primary); resize: vertical; font-family: inherit;
    font-size: 14px;
}
.form-group textarea:focus { outline: none; border-color: var(--accent); }
.char-count { font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block; }
.upload-preview { position: relative; border-radius: 6px; overflow: hidden; background: var(--bg-card); }
.upload-btn {
    position: absolute; bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.6); color: #fff; border: none;
    padding: 6px 12px; border-radius: 6px; cursor: pointer;
    font-size: 13px; display: flex; align-items: center; gap: 6px;
    transition: background .2s;
}
.upload-btn:hover { background: rgba(0,0,0,0.8); }
.avatar-upload-preview {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.avatar-upload-preview img {
    width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
    border: 3px solid var(--border);
}
.btn-sm { padding: 6px 14px; font-size: 13px; }

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .main-content { margin-left: 0; }
    .watch-layout { flex-direction: column; }
    .watch-sidebar { width: 100%; }
    .related-list { flex-direction: row; overflow-x: auto; }
    .related-card { flex-direction: column; min-width: 180px; }
    .related-thumb { width: 100%; height: auto; aspect-ratio: 16/9; }
}
@media (max-width: 768px) {
    .main-header { padding: 0 12px; gap: 8px; }
    .header-left { gap: 6px; min-width: unset; }
    .header-left .logo span { display: none; }
    .sidebar-toggle { width: 32px; height: 32px; font-size: 16px; padding: 6px; }
    .logo { gap: 4px; font-size: 16px; }
    .logo i { font-size: 22px; }
    .logo img { height: 24px; }
    .header-right .btn-upload span { display: none; }
    .header-icon { width: 32px; height: 32px; font-size: 16px; padding: 6px; }
    .header-icon.app-btn { width: auto; padding: 6px 10px; font-size: 12px; }
    .header-right { gap: 4px; }
    .header-right .btn-primary { padding: 5px 10px; font-size: 12px; white-space: nowrap; }
    .header-avatar { width: 24px; height: 24px; }
    .search-mobile-btn { display: flex; }
    .header-center { display: none; }
    .bottom-nav { display: flex; }
    .main-content { padding: 12px 12px; padding-bottom: calc(12px + var(--nav-h)); }
    .video-grid { grid-template-columns: 1fr; gap: 14px; }
    .video-info h3 { font-size: 13px; }
    .hero-overlay h2 { font-size: 18px; }
    .ad-728 { display: none; }
    .ad-desktop { display: none; }
    .ad-mobile-header { display: flex; }
    .ad-mobile-320 { display: flex; }
    .ad-mobile-only { display: flex; }
    .ad-socialbar { display: block; }
    .watch-sidebar { display: none; }
    .desktop-only { display: none !important; }
    .mobile-only { display: block; }
}
@media (max-width: 480px) {
    .comment-form { flex-direction: column; }
    .auth-card { padding: 30px 20px; }
    .earnings-video-cell a { flex-direction: column; align-items: flex-start; }
    .earnings-video-cell img { width: 100%; height: auto; aspect-ratio: 16/9; }
}

/* ===== EARNINGS PAGE ===== */
.earnings-page { max-width: 1100px; margin: 0 auto; }
.earnings-header { border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 24px; }
.earnings-header h1 { font-size: 24px; display: flex; align-items: center; gap: 10px; }
.earnings-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
@media (max-width: 768px) { .earnings-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .earnings-stats .stat-body strong { font-size: 15px; } }
.earnings-stats .stat-body strong { color: #2ecc71; font-size: 18px; word-break: break-all; }
.stat-icon.total { background: rgba(46,204,113,0.15); }
.stat-icon.total i { color: #2ecc71; }
.stat-icon.available { background: rgba(52,152,219,0.15); }
.stat-icon.available i { color: #3498db; }
.stat-icon.pending-bal { background: rgba(243,156,18,0.15); }
.stat-icon.pending-bal i { color: #f39c12; }
.stat-icon.paid { background: rgba(155,89,182,0.15); }
.stat-icon.rate { background: rgba(0,188,212,0.15); }
.stat-icon.rate i { color: #00bcd4; }
.cpm-card { border: 1px solid rgba(0,188,212,0.3); }
.stat-icon.paid i { color: #9b59b6; }

/* Earnings Section */
.earnings-section { background: var(--card); border-radius: 12px; padding: 20px; margin-bottom: 24px; }
.earnings-section h2 { font-size: 18px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }

/* Withdraw Form */
.withdraw-form .form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.withdraw-form .form-group { display: flex; flex-direction: column; gap: 6px; }
.withdraw-form label { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.withdraw-form input, .withdraw-form select { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 14px; }
.withdraw-form .form-actions { display: flex; gap: 10px; }
#withdrawFeedback { margin-top: 12px; }

/* Earnings Table */
.earnings-table-wrap { overflow-x: auto; }
.earnings-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.earnings-table th, .earnings-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
.earnings-table th { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.earnings-table tr:hover { background: var(--bg-hover); }
.earnings-video-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.earnings-video-link img { width: 100px; height: 56px; object-fit: cover; border-radius: 6px; }
.earnings-video-link span { font-weight: 500; }

/* ===== PAYMENT METHODS ===== */
.payment-section { background: var(--card); border-radius: 12px; padding: 20px; margin-bottom: 24px; }
.payment-section h2 { font-size: 18px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.payment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 768px) { .payment-grid { grid-template-columns: repeat(2, 1fr); } }
.payment-card {
    position: relative; border-radius: 10px; padding: 14px; min-height: 100px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 6px; cursor: pointer;
    transition: all .2s; border: 2px solid var(--border);
}
.payment-card:hover { border-color: var(--accent); background: var(--bg-hover); }
.payment-card.empty { border-style: dashed; opacity: .5; }
.payment-card.empty:hover { opacity: 1; border-color: var(--accent); }
.payment-icon { font-size: 24px; }
.payment-name { font-size: 12px; font-weight: 600; text-transform: capitalize; }
.payment-account { font-size: 11px; color: var(--text-muted); word-break: break-all; max-width: 100%; }
.payment-card-actions {
    position: absolute; top: 4px; right: 4px; display: flex; gap: 2px; opacity: 0; transition: opacity .2s;
}
.payment-card:hover .payment-card-actions { opacity: 1; }
.payment-card-actions button {
    width: 24px; height: 24px; border-radius: 50%; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 10px;
    background: rgba(255,255,255,0.1); color: var(--text-muted); transition: all .2s;
}
.payment-card-actions .pay-edit:hover { background: var(--accent); color: #fff; }
.payment-card-actions .pay-delete:hover { background: #e74c3c; color: #fff; }
.payment-add-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.payment-add-form select, .payment-add-form input { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 13px; }
.payment-add-form select { width: 130px; }
.payment-add-form input { flex: 1; min-width: 180px; }
.payment-add-form button { padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer; font-size: 13px; transition: all .2s; }
.pay-btn-save { background: var(--accent); color: #fff; }
.pay-btn-save:hover { opacity: .85; }
.pay-btn-cancel { background: var(--bg-hover); color: var(--text-muted); }
.pay-btn-cancel:hover { color: var(--text); }

/* ===== SETTINGS FORM (Admin) ===== */
.settings-form .form-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-bottom: 10px; }
.settings-form .form-group { display: flex; flex-direction: column; gap: 6px; }
.settings-form label { font-size: 14px; color: var(--text); font-weight: 500; }
.settings-form input, .settings-form select { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 14px; }
.settings-form small { font-size: 12px; color: var(--text-muted); }
.settings-form .form-actions { margin-top: 20px; }
.quick-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: rgba(46,204,113,0.15); color: #2ecc71; border: 1px solid rgba(46,204,113,0.3); }
.filter-form .form-row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.filter-form .form-group { display: flex; flex-direction: column; gap: 4px; }
.filter-form label { font-size: 13px; color: var(--text-muted); }
.filter-form input { padding: 8px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.input-sm { padding: 6px 8px; border-radius: 4px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 12px; width: 120px; }

/* ===== ADMIN NAV ===== */
.admin-nav { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-nav a { padding: 8px 16px; border-radius: 8px; background: var(--card); color: var(--text); text-decoration: none; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.admin-nav a:hover, .admin-nav a.active { background: var(--accent); color: #fff; }

/* ===== SUBSCRIBE / BELL ===== */
.subscribe-wrap { display: flex; align-items: center; gap: 6px; }
.btn-subscribe {
    background: #c00; color: #fff; font-weight: 600;
    padding: 8px 18px; border: none; border-radius: 20px;
    font-size: 14px; cursor: pointer; transition: all .2s;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.btn-subscribe:hover { background: #8b0000; }
.btn-subscribed {
    background: rgba(255,255,255,0.08); color: #fff; font-weight: 600;
    padding: 8px 18px; border: 1px solid rgba(255,255,255,0.2); border-radius: 20px;
    font-size: 14px; cursor: pointer; transition: all .2s;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.btn-subscribed:hover { background: rgba(255,255,255,0.15); }
.bell-btn {
    width: 36px; height: 36px; border-radius: 50%; border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .2s; font-size: 16px;
    background: rgba(255,255,255,0.08); color: #fff;
}
.bell-btn:hover { background: rgba(255,255,255,0.18); }
.bell-on { color: #fff; }
.bell-on i { color: #fff; }
.bell-off { color: rgba(255,255,255,0.5); }
.bell-off i { color: rgba(255,255,255,0.5); }
.sub-count { display: block; font-size: 12px; color: var(--text-muted); font-weight: 400; margin-top: -2px; }

/* ===== LIVE TV ===== */
.live-page { max-width: 1200px; margin: 0 auto; }
.live-categories {
    display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 16px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.live-categories::-webkit-scrollbar { display: none; }
.live-cat-btn {
    padding: 8px 20px; border-radius: 20px; border: 1px solid var(--border);
    background: transparent; color: var(--text-secondary); font-size: 13px;
    white-space: nowrap; cursor: pointer; transition: all .2s;
}
.live-cat-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.live-cat-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.live-card {
    display: block; border-radius: var(--radius-sm); overflow: hidden;
    background: var(--bg-card); transition: transform .2s;
    text-decoration: none; color: inherit;
}
.live-card:hover { transform: translateY(-2px); }
.live-thumb {
    position: relative; aspect-ratio: 16/9; overflow: hidden;
    background: var(--bg-primary);
}
.live-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.live-card:hover .live-thumb img { transform: scale(1.05); }
.live-thumb-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    font-size: 48px; color: var(--accent); opacity: .6;
}
.live-badge {
    position: absolute; top: 8px; left: 8px;
    background: var(--accent); color: #fff;
    font-size: 11px; font-weight: 700; padding: 3px 8px;
    border-radius: 4px; display: flex; align-items: center; gap: 4px;
    text-transform: uppercase; letter-spacing: .5px;
}
.live-badge i { font-size: 8px; animation: pulse-dot 1.5s infinite; }
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}
.live-source-badge {
    position: absolute; top: 8px; right: 8px;
    background: rgba(0,0,0,0.7); color: #fff;
    font-size: 10px; font-weight: 600; padding: 2px 6px;
    border-radius: 4px; letter-spacing: .5px;
}
.live-card-info { padding: 10px 12px; }
.live-card-info h3 { font-size: 14px; font-weight: 500; margin-bottom: 4px; line-height: 1.3; }
.live-card-cat { font-size: 12px; color: var(--text-muted); text-transform: capitalize; }

/* Live Player Overlay */
.live-player-overlay {
    position: fixed; inset: 0; z-index: 999;
    background: rgba(0,0,0,0.92);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.live-player-container {
    width: 100%; max-width: 840px; max-height: 90vh;
    overflow-y: auto;
}
.live-player-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; gap: 12px;
}
.live-player-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.live-player-title h2 { font-size: 20px; }
.live-player-cat { font-size: 12px; color: var(--text-muted); text-transform: capitalize; }
.live-badge-lg {
    display: flex; align-items: center; gap: 6px;
    background: var(--accent); color: #fff;
    font-size: 12px; font-weight: 700; padding: 4px 12px;
    border-radius: 4px; text-transform: uppercase; letter-spacing: .5px;
}
.live-badge-lg i { font-size: 10px; animation: pulse-dot 1.5s infinite; }
.live-player-wrap {
    aspect-ratio: 16/9; background: #000;
    border-radius: var(--radius-sm); overflow: hidden;
}
.live-player-wrap iframe { width: 100%; height: 100%; border: 0; }
.live-player-wrap video { width: 100%; height: 100%; background: #000; }
.live-player-wrap.is-hls { background: #000; }
.live-player-actions { display: flex; gap: 8px; flex-shrink: 0; }

@media (max-width: 768px) {
    .live-grid { grid-template-columns: 1fr; }
    .live-player-overlay { padding: 8px; }
    .live-player-header { flex-direction: column; align-items: flex-start; }
    .live-player-title h2 { font-size: 16px; }
    .live-cat-btn { padding: 6px 16px; font-size: 12px; }
}

/* ===== HERO BANNER ===== */
.live-hero {
    position: relative; border-radius: var(--radius); overflow: hidden;
    margin-bottom: 20px; min-height: 280px;
    background: linear-gradient(135deg, #1a0000 0%, #0d0d2b 40%, #001a1a 100%);
}
.live-hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(255,0,0,0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 50%, rgba(0,100,255,0.1) 0%, transparent 50%);
    animation: hero-glow 4s ease-in-out infinite alternate;
}
@keyframes hero-glow {
    0% { opacity: .6; }
    100% { opacity: 1; }
}
.live-hero-content {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 24px;
    padding: 32px;
}
.live-hero-info { flex: 1; min-width: 0; }
.live-hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--accent); color: #fff;
    font-size: 13px; font-weight: 700; padding: 5px 14px;
    border-radius: 6px; text-transform: uppercase; letter-spacing: .5px;
    margin-bottom: 12px; box-shadow: 0 0 20px rgba(255,0,0,0.4);
}
.live-hero-badge i { font-size: 10px; animation: pulse-dot 1.5s infinite; }
.live-hero-title { font-size: 32px; font-weight: 800; margin-bottom: 8px; line-height: 1.2; text-shadow: 0 2px 20px rgba(0,0,0,0.5); }
.live-hero-score {
    font-size: 28px; font-weight: 700; color: #2ecc71;
    margin-bottom: 8px; text-shadow: 0 0 20px rgba(46,204,113,0.3);
}
.live-hero-meta { display: flex; gap: 16px; font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; }
.live-hero-preview {
    width: 320px; height: 180px; border-radius: var(--radius-sm); overflow: hidden;
    flex-shrink: 0; background: #000; opacity: .8;
    border: 1px solid rgba(255,255,255,0.1);
}
.btn-live-watch {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent); color: #fff; padding: 12px 28px;
    border-radius: 30px; font-size: 15px; font-weight: 600;
    text-decoration: none; transition: all .3s;
    box-shadow: 0 4px 20px rgba(255,0,0,0.3);
}
.btn-live-watch:hover { background: #ff1a1a; transform: scale(1.05); box-shadow: 0 6px 30px rgba(255,0,0,0.4); }

/* ===== SECTIONS ===== */
.live-section { margin-bottom: 32px; }
.live-section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px; gap: 8px;
}
.live-section-header h2 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.live-section-header h2 i { color: var(--accent); }
.live-section-count { font-size: 12px; color: var(--text-muted); }
.live-section-link { font-size: 13px; color: var(--accent); text-decoration: none; display: flex; align-items: center; gap: 4px; }

/* ===== CATEGORY PILLS (Glow) ===== */
.live-categories {
    display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 16px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.live-categories::-webkit-scrollbar { display: none; }
.live-cat-btn {
    padding: 8px 20px; border-radius: 20px; border: 1px solid var(--border);
    background: transparent; color: var(--text-secondary); font-size: 13px;
    white-space: nowrap; cursor: pointer; transition: all .3s;
}
.live-cat-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--accent); }
.live-cat-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 0 15px rgba(255,0,0,0.3); }

/* ===== CHANNEL CARDS (Glassmorphism) ===== */
.glass-card {
    background: rgba(30,30,30,0.7); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.06);
}
.live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.live-card {
    display: block; border-radius: var(--radius-sm); overflow: hidden;
    background: var(--bg-card); transition: all .3s;
    text-decoration: none; color: inherit;
}
.live-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(255,0,0,0.15); }
.live-card:hover.glass-card { border-color: rgba(255,0,0,0.2); }
.live-thumb {
    position: relative; aspect-ratio: 16/9; overflow: hidden;
    background: var(--bg-primary);
}
.live-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.live-card:hover .live-thumb img { transform: scale(1.08); }
.live-thumb-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    font-size: 48px; color: var(--accent); opacity: .6;
}
.live-badge {
    position: absolute; top: 8px; left: 8px;
    background: var(--accent); color: #fff;
    font-size: 11px; font-weight: 700; padding: 3px 8px;
    border-radius: 4px; display: flex; align-items: center; gap: 4px;
    text-transform: uppercase; letter-spacing: .5px;
}
.live-badge i { font-size: 8px; }
.live-badge.pulse i { animation: pulse-dot 1.5s infinite; }
.pulse i { animation: pulse-dot 1.5s infinite; }
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}
.live-viewers {
    position: absolute; bottom: 6px; right: 6px;
    background: rgba(0,0,0,0.75); color: #fff;
    font-size: 11px; padding: 2px 8px; border-radius: 4px;
    display: flex; align-items: center; gap: 4px;
}
.live-viewers i { font-size: 10px; }
.live-card-info { padding: 10px 12px; }
.live-card-info h3 { font-size: 14px; font-weight: 500; margin-bottom: 4px; line-height: 1.3; }
.live-card-cat { font-size: 12px; color: var(--text-muted); text-transform: capitalize; }
.live-card-meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--text-muted); }
.live-viewers-sm { font-size: 12px; color: var(--text-muted); }
.match-score-sm { color: #2ecc71; font-weight: 600; }

/* ===== SPORTS CARDS ===== */
.sports-card .live-thumb-placeholder { background: linear-gradient(135deg, #2d0a0a 0%, #4a1a1a 100%); }
.sports-card .live-thumb-placeholder i { color: #ffd700; }
.sports-card .live-card-info h3 { font-size: 14px; font-weight: 600; }

/* ===== MATCH CARDS ===== */
.match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.match-card {
    display: block; border-radius: var(--radius); overflow: hidden;
    background: var(--bg-card);
    text-decoration: none; color: inherit;
    transition: all .3s; border: 1px solid rgba(255,255,255,0.06);
}
.match-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(255,0,0,0.2); border-color: rgba(255,0,0,0.3); }

/* Thumbnail */
.match-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #111; }
.match-thumb img { width: 100%; height: 100%; object-fit: cover; }
.match-thumb-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    font-size: 42px; color: var(--accent); opacity: .4;
}
.match-thumb-overlay {
    position: absolute; top: 8px; left: 8px; right: 8px;
    display: flex; justify-content: space-between; align-items: flex-start;
    pointer-events: none;
}
.match-thumb-overlay .live-badge { position: static; }
.match-hd-badge {
    background: linear-gradient(135deg, #ffd700, #ff8c00); color: #000;
    font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 3px;
    letter-spacing: .5px; height: fit-content;
}

/* Body */
.match-body { padding: 14px 16px 16px; }

/* Teams row */
.match-teams {
    display: flex; align-items: center; justify-content: center; gap: 20px;
    margin-bottom: 10px; flex-wrap: nowrap;
}
.match-team-wrap {
    display: flex; align-items: center; gap: 6px;
    flex: 1; justify-content: center; white-space: nowrap;
}
.match-team-logo { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.match-team { font-size: 15px; font-weight: 700; text-align: center; white-space: nowrap; }

/* Score */
.match-score { text-align: center; font-size: 20px; font-weight: 700; color: #2ecc71; margin-bottom: 10px; text-shadow: 0 0 10px rgba(46,204,113,0.2); }

/* Meta */
.match-meta { text-align: center; font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }

/* Actions */
.match-actions { display: flex; }
.btn-match-watch {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
    background: var(--accent); color: #fff; padding: 10px; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.btn-match-watch:hover { background: #ff1a1a; }

/* Ad card between matches */
.match-ad-card {
    border-radius: var(--radius); overflow: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 120px; background: var(--bg-card); padding: 16px;
}

/* ===== PLAYER OVERLAY ===== */
.live-player-overlay {
    position: fixed; inset: 0; z-index: 999;
    background: rgba(0,0,0,0.95);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 16px; overflow-y: auto;
}
.live-player-container { width: 100%; max-width: 840px; }
.live-player-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; gap: 12px;
}
.live-player-back {
    background: rgba(255,255,255,0.1); border: none; color: #fff;
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; transition: background .2s; flex-shrink: 0;
}
.live-player-back:hover { background: rgba(255,255,255,0.2); }
.live-player-title { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.live-player-title-text { min-width: 0; }
.live-player-title-text h2 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-player-meta { font-size: 12px; color: var(--text-muted); }
.live-badge-lg {
    display: flex; align-items: center; gap: 6px;
    background: var(--accent); color: #fff;
    font-size: 12px; font-weight: 700; padding: 4px 12px;
    border-radius: 4px; text-transform: uppercase; letter-spacing: .5px;
    flex-shrink: 0;
}
.live-badge-lg i { font-size: 10px; }
.live-badge-lg.pulse i { animation: pulse-dot 1.5s infinite; }
.live-player-wrap {
    aspect-ratio: 16/9; background: #000;
    border-radius: var(--radius-sm); overflow: hidden;
}
.live-player-wrap iframe { width: 100%; height: 100%; border: 0; }
.live-player-wrap video { width: 100%; height: 100%; background: #000; }
.live-player-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-icon {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
    background: transparent; color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s; font-size: 14px;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ===== PLAYER SIDEBAR ADS (fixed — outside container) ===== */
.live-player-sidebar-ad {
    position: fixed; top: 50%; transform: translateY(-50%);
    width: 300px; z-index: 998; display: none;
}
.live-player-sidebar-ad .ad-label {
    font-size: 11px; color: var(--text-muted);
    text-align: center; padding: 4px 0;
}
.live-player-sidebar-ad.left { left: 16px; }
.live-player-sidebar-ad.right { right: 16px; }
@media (min-width: 1800px) {
    .live-player-sidebar-ad { display: block; }
}

/* ===== SERVER SWITCHING ===== */
.server-switch {
    display: flex; align-items: center; gap: 10px;
    margin-top: 12px; padding: 10px 16px;
    background: rgba(255,255,255,0.05); border-radius: var(--radius-sm);
    flex-wrap: wrap;
}
.server-label { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.server-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.server-btn {
    padding: 6px 18px; border-radius: 20px; border: 1px solid var(--border);
    background: transparent; color: var(--text-secondary);
    font-size: 12px; cursor: pointer; transition: all .3s; font-weight: 500;
}
.server-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.server-btn.active {
    background: var(--accent); color: #fff; border-color: var(--accent);
    box-shadow: 0 0 15px rgba(255,0,0,0.3);
}

/* ===== PLAYER BOTTOM: CHAT + RELATED ===== */
.player-bottom {
    display: flex; gap: 20px; margin-top: 16px;
}
.live-chat-panel {
    flex: 1; min-width: 0; max-width: 400px;
    background: rgba(30,30,30,0.8); backdrop-filter: blur(12px);
    border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.06);
    display: flex; flex-direction: column; height: 400px;
}
.chat-header {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px; border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.chat-header h3 { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.chat-count {
    margin-left: auto; background: rgba(255,255,255,0.08);
    padding: 2px 10px; border-radius: 10px; font-size: 11px; color: var(--text-muted);
}
.chat-messages {
    flex: 1; overflow-y: auto; padding: 12px 16px;
    display: flex; flex-direction: column; gap: 6px;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.chat-welcome { text-align: center; color: var(--text-muted); font-size: 13px; padding: 20px 0; }
.chat-msg { font-size: 13px; line-height: 1.4; word-break: break-word; }
.chat-msg strong { color: var(--accent); margin-right: 6px; }
.chat-msg.self strong { color: #3498db; }
.chat-input-wrap {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.chat-input-wrap input {
    flex: 1; padding: 8px 12px; border-radius: 20px; border: 1px solid var(--border);
    background: rgba(255,255,255,0.05); color: #fff; font-size: 13px; outline: none;
}
.chat-input-wrap input:focus { border-color: var(--accent); }
.chat-emoji-btn, .chat-send-btn {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    font-size: 18px; padding: 4px; transition: color .2s;
}
.chat-emoji-btn:hover, .chat-send-btn:hover { color: var(--text-primary); }
.chat-send-btn { color: var(--accent); }
.chat-emoji-picker {
    display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px;
    border-top: 1px solid var(--border); flex-shrink: 0;
}
.chat-emoji-picker span { cursor: pointer; font-size: 20px; transition: transform .2s; }
.chat-emoji-picker span:hover { transform: scale(1.3); }

/* Related */
.related-streams {
    width: 300px; flex-shrink: 0;
}
.related-streams h3 { font-size: 14px; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.related-list { display: flex; flex-direction: column; gap: 10px; max-height: 400px; overflow-y: auto; }
.related-item {
    display: flex; gap: 10px; text-decoration: none; color: inherit;
    padding: 8px; border-radius: var(--radius-sm);
    transition: all .2s;
}
.related-item:hover { background: rgba(255,255,255,0.05); }
.related-thumb { width: 120px; height: 68px; flex-shrink: 0; border-radius: 6px; overflow: hidden; position: relative; background: #000; }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-thumb .live-badge { top: 4px; left: 4px; font-size: 9px; padding: 2px 6px; }
.related-info h4 { font-size: 13px; font-weight: 500; margin-bottom: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-info span { font-size: 11px; color: var(--text-muted); }

/* ===== FLOATING LIVE BADGE ===== */
.float-live-badge {
    position: fixed; bottom: 80px; right: 16px; z-index: 998;
    background: var(--accent); color: #fff; padding: 8px 16px;
    border-radius: 20px; font-size: 12px; font-weight: 700;
    display: flex; align-items: center; gap: 6px;
    box-shadow: 0 4px 15px rgba(255,0,0,0.4);
    transform: translateY(100px); opacity: 0;
    transition: all .4s; cursor: pointer;
    text-transform: uppercase; letter-spacing: .5px;
}
.float-live-badge.visible { transform: translateY(0); opacity: 1; }
.float-live-badge i { font-size: 10px; animation: pulse-dot 1.5s infinite; }
.float-live-badge:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(255,0,0,0.5); }

/* ===== SEARCH HEADER ===== */
.live-search-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; gap: 12px;
}
.live-search-header h1 { font-size: 20px; display: flex; align-items: center; gap: 8px; }

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
    .live-hero-content { flex-direction: column; padding: 20px; }
    .live-hero-title { font-size: 22px; }
    .live-hero-score { font-size: 20px; }
    .live-hero-preview { width: 100%; height: auto; aspect-ratio: 16/9; }
    .match-grid { grid-template-columns: 1fr; }
    .player-bottom { flex-direction: column; }
    .live-chat-panel { max-width: 100%; height: 300px; }
    .related-streams { width: 100%; }
    
    .live-player-overlay { padding: 8px; }
    .live-player-header { flex-direction: column; align-items: flex-start; }
    .live-player-title-text h2 { font-size: 15px; }
    .live-player-actions { align-self: flex-end; }
    .float-live-badge { bottom: 70px; right: 8px; font-size: 11px; padding: 6px 12px; }
    .server-switch { padding: 8px 12px; }
    .server-btn { font-size: 11px; padding: 5px 14px; }
}

/* ===== SKELETON LOADER ===== */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton { background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; }
.skeleton-thumb { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-sm); }
.skeleton-text { height: 14px; margin: 8px 0; width: 70%; }
.skeleton-text-sm { height: 10px; width: 40%; }
}

/* ===== APP DOWNLOAD POPUP ===== */
.app-popup-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center; justify-content: center;
}
.app-popup-overlay.open { display: flex; }

.app-popup {
  position: fixed; z-index: 10000;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 32px 24px 24px;
  max-width: 380px; width: 90%;
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.app-popup.open { display: flex; }

.app-popup-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; color: var(--text-secondary); font-size: 20px;
  cursor: pointer; padding: 4px 8px; border-radius: 50%;
  transition: background 0.2s;
}
.app-popup-close:hover { background: var(--bg-hover); }

.app-popup-icon {
  width: 64px; height: 64px;
  background: var(--accent);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #000; margin-bottom: 16px;
}

.app-popup-title {
  font-size: 20px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 6px;
}

.app-popup-desc {
  font-size: 13px; color: var(--text-secondary);
  margin-bottom: 20px; line-height: 1.4;
}

.app-popup-btn {
  width: 100%; padding: 14px;
  background: var(--accent); color: #000;
  border: none; border-radius: 12px;
  font-size: 15px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity 0.2s;
}
.app-popup-btn:hover { opacity: 0.9; }
.app-popup-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.app-popup-hint {
  font-size: 12px; color: var(--text-secondary);
  margin-top: 8px; min-height: 18px;
}

.app-popup-divider {
  width: 100%; height: 1px;
  background: var(--bg-hover); margin: 20px 0;
}

.app-popup-info {
  display: flex; flex-direction: column; gap: 10px; width: 100%;
  margin-bottom: 16px;
}

.app-popup-info-item {
  font-size: 13px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
}
.app-popup-info-item i { color: var(--accent); font-size: 14px; }

.app-popup-ios {
  font-size: 12px; color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 12px 16px; border-radius: 10px;
  width: 100%; line-height: 1.5;
}
.app-popup-ios i { font-size: 13px; }

@media (max-width: 768px) {
  .app-popup {
    bottom: 0; left: 50%; transform: translateX(-50%);
    max-width: 100%; width: 100%; border-radius: 16px 16px 0 0;
    padding: 24px 20px 20px;
    max-height: 90vh; overflow-y: auto;
  }
  .app-popup-overlay.open { align-items: flex-end; }
}

/* ===== DIAGNOSTIC PANEL ===== */
.diag-panel { border: 1px solid rgba(0,188,212,0.2); }
.diag-panel h2 { cursor: pointer; user-select: none; }
.diag-panel:not(.open) .diag-body { display: none; }
.diag-panel:not(.open) .diag-arrow { transform: rotate(0deg); }
.diag-panel.open .diag-arrow { transform: rotate(180deg); }
.diag-badge { margin-left: auto; font-size: 12px; padding: 3px 10px; border-radius: 10px; background: var(--bg-hover); font-weight: 600; }
.diag-arrow { margin-left: 8px; transition: transform .2s; font-size: 14px; }
.diag-body { padding-top: 8px; }
.diag-block { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.diag-block:last-child { border-bottom: none; margin-bottom: 0; }
.diag-block h4 { font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.diag-block-warn { background: rgba(231,76,60,0.05); border-radius: var(--radius-sm); padding: 12px; }
.diag-table { width: 100%; border-collapse: collapse; font-size: 12px; font-family: 'Courier New', monospace; }
.diag-table th { text-align: left; padding: 6px 8px; border-bottom: 2px solid var(--border); color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .3px; }
.diag-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.diag-table tr:hover { background: var(--bg-hover); }
.diag-row-issue { background: rgba(231,76,60,0.08); }
.diag-title { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diag-ip { font-size: 11px; color: var(--text-muted); max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
.diag-status { font-size: 12px; font-weight: 600; }
.diag-status.ok { color: #2ecc71; }
.diag-status.fail { color: #e74c3c; }
.diag-fraud-low { color: #2ecc71; font-weight: 600; }
.diag-fraud-high { color: #e74c3c; font-weight: 700; background: rgba(231,76,60,0.15); padding: 1px 6px; border-radius: 4px; }
.diag-issue { font-size: 11px; color: var(--text-muted); }
.diag-summary { margin-top: 10px; padding: 10px; background: rgba(231,76,60,0.1); border-radius: var(--radius-sm); font-size: 13px; line-height: 1.6; }
.diag-summary-box { background: rgba(52,152,219,0.05); border-radius: var(--radius-sm); padding: 12px; }
.diag-summary-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.diag-summary-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); }
.diag-summary-table tr:last-child td { border-bottom: none; }
.diag-fix-box { margin-top: 12px; padding: 12px; background: rgba(243,156,18,0.12); border: 1px solid rgba(243,156,18,0.3); border-radius: var(--radius-sm); font-size: 13px; line-height: 1.6; }
.diag-fix-box code { display: block; margin-top: 8px; padding: 8px 12px; background: var(--bg-primary); border-radius: 4px; font-size: 12px; color: #e67e22; word-break: break-all; }

/* ===== PUSH NOTIFICATION BANNER ===== */
.notif-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-elevated); border-top: 1px solid var(--border);
  padding: 12px 16px; z-index: 9999;
  transform: translateY(100%); transition: transform .3s ease;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.notif-banner.show { transform: translateY(0); }
.notif-banner-content { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.notif-banner-allow { background: var(--accent); color: #fff; border: none; border-radius: 6px; padding: 8px 16px; font-weight: 600; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.notif-banner-allow:hover { opacity: .85; }
.notif-banner-dismiss { background: transparent; color: var(--text-muted); border: none; font-size: 18px; cursor: pointer; padding: 4px 8px; flex-shrink: 0; }
.notif-banner-dismiss:hover { color: var(--text-primary); }
@media (max-width: 768px) {
  .notif-banner { padding: 12px; bottom: var(--bottom-nav-h, 56px); }
  .notif-banner-content { font-size: 13px; }
}
