/* ==========================================================================
   AUTOTUBE CORE - CYBERPUNK STYLESHEET
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --bg-deep: #050508;
    --glass-bg: rgba(15, 20, 30, 0.65);
    --glass-border: rgba(0, 243, 255, 0.15);
    --cyan: #00f3ff;
    --cyan-glow: rgba(0, 243, 255, 0.4);
    --purple: #bc13fe;
    --purple-glow: rgba(188, 19, 254, 0.4);
    --success: #00ff88;
    --warning: #ffaa00;
    --danger: #ff3366;
    --text-main: #e0e0e0;
    --text-muted: #888899;
}

/* TÙY CHỈNH THANH CUỘN (SCROLLBAR) CHUẨN SCI-FI */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 243, 255, 0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); box-shadow: 0 0 10px var(--cyan-glow); }

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    background-color: var(--bg-deep); 
    color: var(--text-main); 
    font-family: 'Inter', sans-serif;
    height: 100vh; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    padding: 20px;
    position: relative;
}

h1, h2, h3, .cyber-font { font-family: 'Orbitron', sans-serif; }

/* HIỆU ỨNG ÁNH SÁNG NỀN VŨ TRỤ */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
}
.glow-1 { top: -10%; left: -10%; width: 40vw; height: 40vw; background: radial-gradient(circle, var(--cyan-glow), transparent 70%); }
.glow-2 { bottom: -10%; right: -10%; width: 50vw; height: 50vw; background: radial-gradient(circle, var(--purple-glow), transparent 70%); }

/* LỚP KÍNH MỜ (GLASSMORPHISM) CHỦ ĐẠO */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* HEADER */
.header { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 15px 30px; margin-bottom: 25px;
    flex-shrink: 0;
}
.header-brand { display: flex; align-items: center; gap: 15px; }
.logo-icon { font-size: 24px; color: var(--cyan); text-shadow: 0 0 15px var(--cyan-glow); }
.header h1 { font-size: 22px; color: #fff; letter-spacing: 2px; display: flex; align-items: center; gap: 10px; margin: 0; }
.pulse-badge { font-size: 10px; background: rgba(188, 19, 254, 0.2); color: var(--purple); padding: 4px 8px; border-radius: 4px; border: 1px solid var(--purple); animation: pulse 2s infinite; font-family: 'Inter', sans-serif; }
.stats-box { padding: 8px 16px; font-size: 14px; color: var(--text-muted); border-radius: 30px; display: flex; align-items: center; gap: 8px; }
.stats-box .highlight { color: var(--cyan); font-size: 16px; text-shadow: 0 0 8px var(--cyan-glow); }

/* BỐ CỤC 2 CỘT */
.app-container { 
    display: flex; 
    gap: 25px; 
    flex: 1; 
    overflow: hidden; 
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}
.left-panel, .right-panel { display: flex; flex-direction: column; gap: 20px; height: 100%; }
.left-panel { width: 45%; }
.right-panel { width: 55%; }

/* Ô TÌM KIẾM */
.search-box { display: flex; gap: 15px; padding: 20px; border-radius: 16px; }
.search-input-wrapper { flex-grow: 1; position: relative; }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--cyan); }
.search-box input { 
    width: 100%; padding: 12px 15px 12px 45px; border-radius: 10px; 
    border: 1px solid rgba(0, 243, 255, 0.3); background: rgba(0, 0, 0, 0.4); 
    color: white; outline: none; transition: 0.3s; font-size: 14px;
}
.search-box input:focus { border-color: var(--cyan); box-shadow: 0 0 15px var(--cyan-glow); }

/* NÚT BẤM CYBERPUNK */
.cyber-btn { 
    background: rgba(0, 243, 255, 0.1); color: var(--cyan); border: 1px solid var(--cyan); 
    padding: 10px 25px; border-radius: 10px; font-family: 'Orbitron', sans-serif; font-weight: 600; 
    cursor: pointer; transition: all 0.3s; display: flex; align-items: center; gap: 8px; justify-content: center;
}
.cyber-btn:hover { background: var(--cyan); color: #000; box-shadow: 0 0 20px var(--cyan-glow); transform: translateY(-2px); }
.btn-success { color: var(--success); border-color: var(--success); background: rgba(0, 255, 136, 0.1); }
.btn-success:hover { background: var(--success); box-shadow: 0 0 20px rgba(0, 255, 136, 0.4); }
.btn-warning { color: var(--warning); border-color: var(--warning); background: rgba(255, 170, 0, 0.1); width: 100%; }
.btn-warning:hover { background: var(--warning); box-shadow: 0 0 20px rgba(255, 170, 0, 0.4); }

/* DANH SÁCH VIDEO TỪ JS */
.list-header { display: flex; justify-content: space-between; align-items: center; padding: 0 5px; }
.list-header h3 { font-size: 16px; color: var(--text-main); margin: 0; }
.counter { color: var(--cyan); }

.video-list { 
    flex-grow: 1; background: rgba(0, 0, 0, 0.3); border-radius: 16px; 
    border: 1px dashed rgba(255,255,255,0.1); overflow-y: auto; padding: 15px; 
    position: relative; display: flex; flex-direction: column; gap: 12px;
}

/* THẺ VIDEO ĐƯỢC TẠO RA BỞI SCRIPT.JS */
.video-item { 
    padding: 15px; border-radius: 12px; background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05); cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; justify-content: space-between; align-items: center; gap: 12px; 
}
.video-item:hover { 
    background: rgba(30, 41, 59, 0.9); transform: translateY(-3px); 
    border-color: rgba(0, 243, 255, 0.3); box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}
.video-item.active { 
    background: linear-gradient(90deg, rgba(0, 243, 255, 0.15), rgba(0, 0, 0, 0.4)); 
    border-color: var(--cyan); border-left: 4px solid var(--cyan);
    box-shadow: 0 0 15px var(--cyan-glow);
}

.video-item-info { flex: 1; overflow: hidden; }
.video-item-title { font-weight: 500; font-size: 14px; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; color: #fff; }
.video-item-meta { font-size: 12px; color: var(--cyan); font-family: 'Orbitron', monospace; background: rgba(0, 243, 255, 0.1); padding: 3px 8px; border-radius: 4px; display: inline-block; border: 1px solid rgba(0, 243, 255, 0.2); }

.btn-delete { background: transparent; color: var(--text-muted); padding: 10px; border-radius: 8px; transition: 0.3s; border: none; cursor: pointer; }
.btn-delete:hover { background: rgba(255, 51, 102, 0.15); color: var(--danger); transform: scale(1.1); }

/* KHU VỰC PREVIEW (MÀN HÌNH GIÁM SÁT) */
.preview-area { display: flex; flex-direction: column; height: 100%; padding: 25px; }
.preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--glass-border); }
.preview-header h3 { font-size: 18px; margin: 0; }

.recording-dot { font-family: 'Orbitron', sans-serif; font-size: 12px; color: var(--danger); display: flex; align-items: center; gap: 6px; }
.recording-dot::before { content: ''; width: 10px; height: 10px; background: var(--danger); border-radius: 50%; animation: pulse-danger 1s infinite; }

.video-wrapper { 
    flex-grow: 1; background: #000; border-radius: 12px; overflow: hidden; 
    display: flex; justify-content: center; align-items: center; 
    border: 1px solid rgba(255,255,255,0.05); margin-bottom: 20px; min-height: 300px;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.8);
}
video { max-width: 100%; max-height: 100%; outline: none; border-radius: 12px; }

/* BOX CHỈNH SỬA TIÊU ĐỀ */
.edit-box { background: rgba(0, 0, 0, 0.4); padding: 20px; border-radius: 12px; border: 1px solid var(--glass-border); }
.edit-box label { display: block; margin-bottom: 10px; color: var(--cyan); font-size: 14px; font-weight: 600; }
.edit-box textarea { 
    width: 100%; background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 8px; padding: 12px; color: #fff; font-family: 'Inter', sans-serif; 
    resize: none; margin-bottom: 15px; font-size: 14px; transition: 0.3s;
}
.edit-box textarea:focus { border-color: var(--warning); outline: none; box-shadow: 0 0 10px rgba(255, 170, 0, 0.2); }

/* THANH TIẾN TRÌNH TẢI XUỐNG */
.progress-container { padding: 15px; border-color: var(--success); }
.progress-header { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.progress-text { color: var(--success); font-weight: 600; letter-spacing: 0.5px; }
.progress-bar { width: 100%; height: 8px; background: rgba(0,0,0,0.5); border-radius: 4px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.5); }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #00ff88, #00b35f); transition: width 0.3s ease; box-shadow: 0 0 10px var(--success); }

/* TRẠNG THÁI TRỐNG */
.empty-state { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; color: var(--text-muted); width: 80%; }
.radar-scan, .hologram-icon { font-size: 45px; color: rgba(255,255,255,0.1); margin-bottom: 15px; }
.center-state { position: static; transform: none; display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; border: 2px dashed rgba(255,255,255,0.05); border-radius: 16px; }

/* TIỆN ÍCH */
.hidden { display: none !important; }

/* ANIMATIONS */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(188, 19, 254, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(188, 19, 254, 0); }
    100% { box-shadow: 0 0 0 0 rgba(188, 19, 254, 0); }
}
@keyframes pulse-danger {
    0% { box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(255, 51, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 51, 102, 0); }
}