@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #030712; /* Deep modern dark tone, not flat black */
    --text-color: #f3f4f6; /* Off-white for cleaner readability */
    --text-muted: #9ca3af;
    --primary-color: #00bfff;
    --primary-glow: rgba(0, 191, 255, 0.15);
    --primary-glow-strong: rgba(0, 191, 255, 0.4);
    --sidebar-bg: rgba(10, 15, 30, 0.7);
    --card-bg: rgba(17, 24, 39, 0.45);
    --card-hover-bg: rgba(31, 41, 55, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-border-hover: rgba(0, 191, 255, 0.25);
    --accent-gradient: linear-gradient(135deg, #00bfff 0%, #0077b6 100%);
    --bg-gradient: radial-gradient(circle at top right, rgba(0, 191, 255, 0.08), transparent 45%),
                   radial-gradient(circle at bottom left, rgba(0, 119, 182, 0.05), transparent 40%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-color);
    background-image: var(--bg-gradient);
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar / Vertical Menu */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--glass-border);
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar .logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    margin-bottom: 50px;
    text-align: left;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .logo span {
    color: var(--primary-color);
    text-shadow: 0 0 15px rgba(0, 191, 255, 0.4);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.sidebar nav a ion-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.sidebar nav a:hover {
    background: var(--card-hover-bg);
    color: #fff;
    border-color: var(--glass-border);
}

.sidebar nav a:hover ion-icon {
    transform: translateX(3px);
}

.sidebar nav a.active {
    background: rgba(0, 191, 255, 0.08);
    color: var(--primary-color);
    border-color: rgba(0, 191, 255, 0.15);
    font-weight: 600;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
    min-height: 100vh;
    padding-bottom: 120px; /* Space for sticky player */
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 6px 16px 6px 6px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--glass-border-hover);
}

.user-profile span {
    font-size: 14px;
    font-weight: 500;
}

/* Banner */
.banner {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.15) 0%, rgba(0, 119, 182, 0.05) 100%),
                url('https://images.unsplash.com/photo-1518609878373-06d740f60d8b?auto=format&fit=crop&q=80&w=1200');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 40px;
    margin-bottom: 45px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(3, 7, 18, 0.85) 0%, rgba(3, 7, 18, 0.2) 100%);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
}

.banner h2 {
    color: #fff;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.banner p {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.5;
}

/* Sections & Title */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--accent-gradient);
    border-radius: 4px;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 45px;
}

.category-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(0, 191, 255, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    border-color: var(--glass-border-hover);
    background: var(--card-hover-bg);
    box-shadow: 0 12px 30px rgba(0, 191, 255, 0.08);
}

.category-card:hover::after {
    opacity: 1;
}

.category-icon {
    width: 48px;
    height: 48px;
    background: rgba(0, 191, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 0 15px var(--primary-glow);
}

.category-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
}

.category-card p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Audio Cards Grid */
.audio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.audio-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.audio-card:hover {
    transform: translateY(-8px);
    border-color: var(--glass-border-hover);
    background: var(--card-hover-bg);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 191, 255, 0.05);
}

.audio-thumbnail {
    width: 100%;
    height: 160px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: #0b0f19;
}

.audio-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: all 0.5s ease;
}

.audio-card:hover .audio-thumbnail img {
    transform: scale(1.08);
    opacity: 0.8;
}

.audio-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.audio-card:hover .audio-play-overlay {
    opacity: 1;
}

.audio-play-btn {
    width: 56px;
    height: 56px;
    background: #fff;
    color: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.audio-play-btn:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow-strong);
}

.audio-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(10, 15, 30, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-color);
    border: 1px solid var(--glass-border);
}

.audio-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.audio-info h3 {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

.audio-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Premium Fixed Bottom Player */
.bottom-player {
    position: fixed;
    bottom: 24px;
    left: 324px; /* Sidebar width + gap */
    right: 44px;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 999;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(120%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-player.active {
    transform: translateY(0);
}

.player-track-info {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 25%;
}

.player-thumbnail-container {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-color);
    position: relative;
    border: 1px solid var(--glass-border);
}

.player-thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-track-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.player-track-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-track-category {
    font-size: 12px;
    color: var(--text-muted);
}

/* Audio Wave Visualizer */
.wave-container {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 20px;
    margin-left: 10px;
}

.wave-bar {
    width: 3px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
    animation: bounce 0.8s ease infinite alternate;
    animation-play-state: paused;
}

.bottom-player.playing .wave-bar {
    animation-play-state: running;
}

.wave-bar:nth-child(2) { animation-delay: 0.15s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.45s; }
.wave-bar:nth-child(5) { animation-delay: 0.6s; }

@keyframes bounce {
    0% { height: 4px; }
    100% { height: 20px; }
}

/* Player Center Controls */
.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 50%;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 24px;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    color: #fff;
}

.control-btn.play-pause-toggle {
    width: 44px;
    height: 44px;
    background: #fff;
    color: var(--bg-color);
    border-radius: 50%;
    font-size: 22px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.control-btn.play-pause-toggle:hover {
    transform: scale(1.05);
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 15px var(--primary-glow-strong);
}

.player-progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 480px;
}

.player-time {
    font-size: 11px;
    color: var(--text-muted);
    width: 35px;
}

.player-time.current-time {
    text-align: right;
}

.progress-bar-wrapper {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    border-radius: 2px;
    position: relative;
    transition: width 0.1s linear;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: -4px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.progress-bar-wrapper:hover .progress-bar-fill::after {
    opacity: 1;
}

/* Player Right Utilities */
.player-utilities {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 25%;
    justify-content: flex-end;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 80px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.1);
    height: 4px;
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.volume-slider::-webkit-slider-thumb:hover {
    background: var(--primary-color);
}

.close-player-btn {
    color: var(--text-muted);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-player-btn:hover {
    color: #ef4444;
}

/* Hidden YouTube Iframe Setup */
.hidden-yt-frame {
    position: absolute;
    width: 1px;
    height: 1px;
    left: -9999px;
    bottom: -9999px;
    opacity: 0.01;
    pointer-events: none;
}

/* Forms Layout (Login & Registration Page) */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100vw;
    position: relative;
    padding: 24px;
    background-image: radial-gradient(circle at center, rgba(0, 191, 255, 0.08) 0%, transparent 60%);
}

.login-box {
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    padding: 48px 40px;
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-box h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #fff;
    letter-spacing: -0.5px;
}

.login-box h2 span {
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background-color: rgba(3, 7, 18, 0.6);
    color: var(--text-color);
    outline: none;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.1);
    background-color: rgba(3, 7, 18, 0.8);
}

.btn {
    width: 100%;
    padding: 14px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(0, 191, 255, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.35);
}

.btn:active {
    transform: translateY(0);
}

.alert {
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 24px;
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    text-align: center;
    font-size: 14px;
}

/* Animations */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 10px rgba(0, 191, 255, 0.2); }
    100% { box-shadow: 0 0 25px rgba(0, 191, 255, 0.5); }
}

/* Responsive Upgrades */
@media (max-width: 1024px) {
    .bottom-player {
        left: 24px;
        right: 24px;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        height: 100vh;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translate3d(0,0,0);
    }
    
    .sidebar.active {
        transform: translate3d(280px, 0, 0);
    }
    
    .main-content {
        padding: 24px 20px;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .banner {
        height: auto;
        padding: 30px 20px;
    }
    
    .banner h2 {
        font-size: 28px;
    }
    
    /* Bottom player adaptations */
    .bottom-player {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        bottom: 12px;
    }
    
    .player-track-info {
        width: 100%;
        justify-content: center;
    }
    
    .player-controls {
        width: 100%;
    }
    
    .player-utilities {
        width: 100%;
        justify-content: center;
    }
}
