:root {
    --bg-color: #0f0f13;
    --sidebar-bg: #15151e;
    --card-bg: #1e1e2d;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent-color: #6c5dd3; /* Purple-ish */
    --accent-hover: #5b4cc4;
    --gradient-1: linear-gradient(45deg, #6c5dd3, #3f87f5);
    --border-color: #2d2d3b;
    --glass-bg: rgba(30, 30, 45, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --sidebar-width: 240px;
    --header-height: 70px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; margin-bottom: 0.5rem; }

/* Layout Grid */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    padding: 2rem 1rem;
    overflow-y: auto;
    z-index: 100;
}
.brand {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
}
.nav-menu li { margin-bottom: 0.5rem; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}
.nav-link:hover, .nav-link.active {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 93, 211, 0.3);
}
.nav-item-title {
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 1.5rem 0 0.5rem 1rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

/* Header */
.top-header {
    height: var(--header-height);
    background-color: rgba(15, 15, 19, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}
.search-container {
    background: var(--card-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    width: 400px;
    border: 1px solid transparent;
}
.search-container:focus-within { border-color: var(--accent-color); }
.search-input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 10px;
    width: 100%;
    outline: none;
}
.header-actions { display: flex; align-items: center; gap: 20px; }
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-primary { background: var(--gradient-1); color: #fff; }
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1px solid var(--border-color); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--accent-color); color: var(--accent-color); }

/* User Menu */
.user-menu { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent-color); }

/* Page Content */
.page-content { padding: 2rem; min-height: calc(100vh - var(--header-height) - 60px); }

/* Grid System */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}
.video-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: 0.3s;
    border: var(--glass-border);
}
.video-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.thumb-container { position: relative; padding-top: 56.25%; /* 16:9 */ background: #000; }
.thumb { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.video-info { padding: 15px; }
.video-title { font-size: 1rem; margin-bottom: 5px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-meta { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-secondary); margin-top: 5px; }
.uploader-name { display: flex; align-items: center; gap: 5px; font-size: 0.9rem; color: var(--text-secondary); margin-top: 8px; }

/* Auth Forms */
.auth-container {
    max-width: 450px;
    margin: 40px auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: var(--glass-border);
}
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-secondary); }
.form-control {
    width: 100%;
    padding: 12px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    outline: none;
}
.form-control:focus { border-color: var(--accent-color); }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--card-bg); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-color); }

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: 0.3s; }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .search-container { display: none; } /* Hide on mobile for now */
}
