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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background with user's image */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    z-index: -1;
}

.overlay {
    display: none;
}

.content-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
}

/* Sidebar - Like Spotify/YouTube */
.library-sidebar {
    width: 280px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header {
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.logo h1 {
    font-size: 1.5rem;
    background: linear-gradient(90deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    flex: 1;
}

.nav-section h3 {
    color: #a0a0a0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #b3b3b3;
    text-decoration: none;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    color: #ffffff;
    background: rgba(233, 69, 96, 0.2);
}

.sidebar-footer {
    padding: 1rem 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
}

.back-link {
    color: #b3b3b3;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: #e94560;
}

/* Main Content */
.library-main {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    overflow-y: auto;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.6rem 1.2rem;
    flex: 1;
    max-width: 400px;
}

.search-icon {
    width: 20px;
    height: 20px;
    stroke: #b3b3b3;
    margin-right: 0.8rem;
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.95rem;
    flex: 1;
}

.search-bar input::placeholder {
    color: #b3b3b3;
}

.user-actions {
    display: flex;
    gap: 1rem;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Library Header */
.library-header {
    margin-bottom: 2rem;
}

.library-header h1 {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.library-header p {
    color: #b3b3b3;
    font-size: 1.1rem;
}

/* Quick Access */
.quick-access {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.quick-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.quick-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.quick-item span {
    color: #b3b3b3;
    font-size: 0.9rem;
}

/* Sections */
.section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    color: #ffffff;
    font-size: 1.5rem;
}

.see-all {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #b3b3b3;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.see-all:hover {
    border-color: #e94560;
    color: #e94560;
}

/* Video List (List View) */
.video-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.video-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    border-radius: 8px;
    transition: background 0.3s;
    cursor: pointer;
}

.video-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.video-thumb {
    width: 120px;
    height: 68px;
    border-radius: 8px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.thumb-placeholder {
    font-size: 2rem;
    color: #ffffff;
}

.video-thumb::after {
    content: '▶';
    position: absolute;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.video-details {
    flex: 1;
}

.video-details h4 {
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.video-details p {
    color: #b3b3b3;
    font-size: 0.85rem;
}

.video-duration {
    color: #b3b3b3;
    font-size: 0.85rem;
}

/* Video Grid (Grid View) */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.video-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.video-thumbnail {
    height: 140px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.thumb-placeholder-large {
    font-size: 3rem;
    color: #ffffff;
}

.video-thumbnail::after {
    content: '▶';
    position: absolute;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.video-info {
    padding: 1rem;
}

.video-info h4 {
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.video-info p {
    color: #b3b3b3;
    font-size: 0.85rem;
}

/* Genre Grid */
.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.genre-card {
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.2), rgba(233, 69, 96, 0.1));
    border: 1px solid rgba(233, 69, 96, 0.3);
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.genre-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.3);
}

.genre-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.genre-card h4 {
    color: #ffffff;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .library-sidebar {
        width: 240px;
    }
    
    .library-main {
        margin-left: 240px;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .library-sidebar {
        width: 100%;
        position: relative;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .library-main {
        margin-left: 0;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-bar {
        max-width: 100%;
    }
    
    .video-list {
        display: none;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .genre-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Scrollbar styling */
.library-sidebar::-webkit-scrollbar,
.library-main::-webkit-scrollbar {
    width: 8px;
}

.library-sidebar::-webkit-scrollbar-track,
.library-main::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.library-sidebar::-webkit-scrollbar-thumb,
.library-main::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.library-sidebar::-webkit-scrollbar-thumb:hover,
.library-main::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
