:root {
    --primary: #2c3e50;
    --accent: #3498db;
    --bg: #f4f6f8;
    --card-bg: #fff;
    --text: #333;
}
body { font-family: 'Segoe UI', sans-serif; background: var(--bg); margin: 0; color: var(--text); }

/* Nav */
nav { background: var(--primary); padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.nav-links a { color: rgba(255,255,255,0.7); text-decoration: none; margin-right: 20px; font-weight: bold; }
.nav-links a.active, .nav-links a:hover { color: #fff; }
.btn-logout { color: #fff; text-decoration: none; font-size: 0.9rem; opacity: 0.6; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.header-section { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
#searchInput { padding: 10px; border: 1px solid #ddd; border-radius: 4px; width: 250px; }

/* Grids */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.video-card, .folder-card { background: var(--card-bg); border-radius: 8px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: 0.2s; display: block; }
.video-card:hover, .folder-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

.thumbnail { aspect-ratio: 16/9; background: #eee; overflow: hidden; }
.thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.info { padding: 1rem; }
.info h3 { margin: 0; font-size: 1rem; font-weight: 500; }

.folder-card { text-align: center; padding: 2rem; }
.folder-icon { font-size: 3rem; margin-bottom: 1rem; }

/* Item type labels */
.item-type-label { 
    display: inline-block; 
    font-size: 0.75rem; 
    color: #666; 
    background: #f0f0f0; 
    padding: 2px 8px; 
    border-radius: 10px; 
    margin-top: 0.5rem; 
}
.nested-label { 
    background: #e8f4fd; 
    color: var(--accent); 
}

/* No thumbnail fallback */
.no-thumb { 
    width: 100%; 
    height: 100%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 3rem; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
}

/* Playlist Player */
.playlist-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.player-wrapper { background: #000; padding: 0; border-radius: 8px; overflow: hidden; margin-bottom: 2rem; }
video { display: block; }
.current-track-info { background: #fff; padding: 1rem; display: flex; justify-content: space-between; align-items: center; }
.btn-zip { background: #27ae60; color: white; padding: 10px 20px; border-radius: 4px; text-decoration: none; }
.btn-download, .btn-download-small { background: var(--accent); color: white; padding: 8px 15px; border-radius: 4px; text-decoration: none; font-size: 0.9rem; }

.playlist-queue { background: white; padding: 1rem; border-radius: 8px; }
.playlist-queue ul { list-style: none; padding: 0; max-height: 300px; overflow-y: auto; }
.playlist-queue li { padding: 10px; border-bottom: 1px solid #eee; cursor: pointer; }
.playlist-queue li:hover { background: #f9f9f9; }
.playlist-queue li.active-track { background: #e3f2fd; color: var(--accent); font-weight: bold; border-left: 4px solid var(--accent); }

/* Login */
.login-body { display: flex; justify-content: center; align-items: center; height: 100vh; background: var(--primary); }
.login-container { background: white; padding: 2rem; border-radius: 8px; width: 300px; text-align: center; }
.login-container input { width: 100%; padding: 10px; margin: 10px 0; box-sizing: border-box; }
.login-container button { width: 100%; padding: 10px; background: var(--accent); color: white; border: none; cursor: pointer; }
.error { color: red; margin-bottom: 10px; }