:root {
    --bg-deep: #080a0f;
    --bg-card: #12151d;
    --bg-sidebar: #0e1117;
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.4);
    --accent: #0ea5e9;
    --accent-glow: rgba(14, 165, 233, 0.3);
    --text-main: #f3f4f6;
    --text-dim: #9ca3af;
    --border: rgba(255, 255, 255, 0.05);
    --glass: rgba(255, 255, 255, 0.02);
    --radius-lg: 1.25rem;
    --radius-md: 0.75rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    display: flex;
    min-height: 100vh;
}

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

/* Sidebar Premium */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.brand {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-menu { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-item i { width: 20px; }

.nav-item:hover {
    background: var(--glass);
    color: var(--text-main);
    transform: translateX(5px);
}

.nav-item.active {
    background: linear-gradient(90deg, var(--primary-glow), transparent);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

/* Main Layout */
.app-container {
    flex: 1;
    margin-left: 280px;
    padding: 2.5rem;
    max-width: calc(100% - 280px);
}

header.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.page-title h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.page-title p { color: var(--text-dim); margin-top: 0.25rem; }

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.card-elite {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-elite:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
    border-color: rgba(139, 92, 246, 0.2);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--glass);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--primary);
}

.card-value { font-size: 2rem; font-weight: 800; margin-bottom: 0.25rem; }
.card-label { color: var(--text-dim); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* Video Gallery Elite */
.video-grid-elite {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.v-card-elite {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
}

.v-card-elite:hover {
    transform: scale(1.02);
    border-color: var(--primary);
}

.v-thumb-elite {
    height: 190px;
    background: #000;
    position: relative;
}

.v-thumb-elite video { width: 100%; height: 100%; object-fit: cover; }

.v-info-elite { padding: 1.5rem; }

.v-title-elite {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.v-tags { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.v-tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    background: var(--glass);
    color: var(--accent);
    text-transform: uppercase;
}

.v-actions { display: flex; gap: 0.5rem; }

/* Buttons */
.btn-elite {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: white;
    box-shadow: 0 10px 20px -5px var(--primary-glow);
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-2px); }

.btn-ghost {
    background: var(--glass);
    color: var(--text-main);
    border: 1px solid var(--border);
}

/* Progress Bars Premium */
.progress-ring {
    width: 100%;
    height: 8px;
    background: var(--glass);
    border-radius: 10px;
    margin-top: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.03);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    box-shadow: 0 0 15px var(--primary-glow);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Video Protection */
video {
    pointer-events: none; /* Evita click derecho básico */
}

.v-thumb-elite {
    position: relative;
}

.v-thumb-elite::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 5;
}

.plyr--full-ui.plyr--video .plyr__control--overlaid {
    z-index: 10;
    pointer-events: auto;
}

.plyr__controls {
    pointer-events: auto;
    z-index: 10;
}

/* Dashboard Enhancements */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}
.status-online { background: #10b981; box-shadow: 0 0 10px #10b981; }

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease-out;
    min-width: 250px;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-success i { color: #10b981; }

/* Modal Styles */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
}


