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

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

        
    /* For Chrome, Edge, Safari */
    ::-webkit-scrollbar {
        width: 10px;
        background: transparent;
    }
    ::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, #ff1e56 0%, #ff4b2b 100%);
        border-radius: 8px;
        box-shadow: 0 0 8px 2px #ff1e56, 0 0 2px 0 #ff4b2b;
    }
    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, #ff4b2b 0%, #ff1e56 100%);
        box-shadow: 0 0 12px 4px #ff1e56, 0 0 4px 0 #ff4b2b;
    }

    /* For Firefox */
    * {
        scrollbar-width: thin;
        scrollbar-color: #ff1e56 #18181b;
    }
        .hidden { display: none; }
        :root {
            --neon-red: #ff0040;
            --dark-red: #cc0033;
            --glass-bg: rgba(255, 255, 255, 0.05);
            --glass-border: rgba(255, 255, 255, 0.1);
        }

body {
    font-family: 'Rajdhani', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0505 25%, #0f0f0f 50%, #1a0a0a 75%, #050505 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: #ffffff;
    position: relative;
}

/* Background grid - static for performance */
.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 0, 64, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 64, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
}

/* Main container */
.dashboard {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 300px 1fr 280px;
    grid-template-rows: 80px 1fr;
    gap: 20px;
    padding: 20px;
}

/* Top navbar */
.navbar {
    grid-column: 1 / -1;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 0, 64, 0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.logo {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 0, 64, 0.8);
}

.search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 40px;
    position: relative;
}

.search-bar {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 0, 64, 0.3);
    border-radius: 25px;
    padding: 12px 50px 12px 20px;
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
}

.search-bar:focus {
    border-color: rgba(255, 0, 64, 0.6);
    box-shadow: 0 0 20px rgba(255, 0, 64, 0.3);
}

.search-bar::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff4080;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 0, 64, 0.1);
    border: 1px solid rgba(255, 0, 64, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ff4080;
}

.nav-icon:hover {
    background: rgba(255, 0, 64, 0.2);
    border-color: rgba(255, 0, 64, 0.5);
    transform: scale(1.1);
}

/* Left sidebar */
.left-sidebar {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 0, 64, 0.2);
    border-radius: 15px;
    padding: 25px;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ff4080;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.playlist-item,
.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.playlist-item:hover,
.recent-item:hover {
    background: rgba(255, 0, 64, 0.1);
    transform: translateX(5px);
}

.playlist-icon,
.recent-icon {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #ff0040, #cc0033);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.playlist-name,
.recent-name {
    font-size: 14px;
    font-weight: 500;
}

.recent-artist {
    font-size: 12px;
    color: #888;
}

/* Main content area */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Music discovery sections */
.discovery-sections {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 20px;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff4080;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 0, 64, 0.5);
}

.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.song-card {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 0, 64, 0.2);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.song-card:hover {
    border-color: rgba(255, 0, 64, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 0, 64, 0.2);
}

.song-artwork {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.song-info {
    flex: 1;
    min-width: 0;
}

.song-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    font-size: 14px;
    color: #ff4080;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-album {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-duration {
    font-size: 12px;
    color: #aaa;
    flex-shrink: 0;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 0, 64, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

/* Music player */
.music-player {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 0, 64, 0.2);
    border-radius: 20px;
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.music-player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 0, 64, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.current-track {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.album-art {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #ff0040, #cc0033);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(255, 0, 64, 0.4);
}

.track-info h2 {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 0 15px rgba(255, 0, 64, 0.6);
}

.track-info p {
    font-size: 1.2rem;
    color: #ff4080;
    margin-bottom: 5px;
}

.track-info span {
    font-size: 1rem;
    color: #888;
}

/* Waveform visualizer - optimized */
.waveform {
    height: 80px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    margin: 30px 0;
    position: relative;
    z-index: 2;
}

.wave-bar {
    width: 4px;
    background: linear-gradient(to top, #ff0040, #ff4080);
    border-radius: 2px;
    will-change: transform;
    animation: waveAnimation 2s ease-in-out infinite;
    animation-play-state: paused;
}

.wave-bar:nth-child(1) {
    height: 20px;
    animation-delay: 0s;
}

.wave-bar:nth-child(2) {
    height: 35px;
    animation-delay: 0.1s;
}

.wave-bar:nth-child(3) {
    height: 50px;
    animation-delay: 0.2s;
}

.wave-bar:nth-child(4) {
    height: 65px;
    animation-delay: 0.3s;
}

.wave-bar:nth-child(5) {
    height: 45px;
    animation-delay: 0.4s;
}

.wave-bar:nth-child(6) {
    height: 70px;
    animation-delay: 0.5s;
}

.wave-bar:nth-child(7) {
    height: 30px;
    animation-delay: 0.6s;
}

.wave-bar:nth-child(8) {
    height: 55px;
    animation-delay: 0.7s;
}

.wave-bar:nth-child(9) {
    height: 40px;
    animation-delay: 0.8s;
}

.wave-bar:nth-child(10) {
    height: 60px;
    animation-delay: 0.9s;
}

@keyframes waveAnimation {

    0%,
    100% {
        transform: scaleY(0.3);
    }

    50% {
        transform: scaleY(1);
    }
}

/* Progress bar */
.progress-container {
    margin: 20px 0;
    position: relative;
    z-index: 2;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0040, #ff4080);
    border-radius: 3px;
    width: 35%;
    box-shadow: 0 0 10px rgba(255, 0, 64, 0.5);
    transition: width 0.3s ease;
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #888;
}

/* Player controls */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.control-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 0, 64, 0.1);
    border: 2px solid rgba(255, 0, 64, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ff4080;
}

.control-btn.play {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #ff0040, #cc0033);
    border-color: #ff0040;
    color: white;
    box-shadow: 0 0 20px rgba(255, 0, 64, 0.4);
}

.control-btn:hover {
    transform: scale(1.05);
    border-color: rgba(255, 0, 64, 0.6);
    box-shadow: 0 0 15px rgba(255, 0, 64, 0.4);
}

/* Right sidebar */
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-widget,
.recommendations {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 0, 64, 0.2);
    border-radius: 15px;
    padding: 20px;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ff4080;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 0, 64, 0.1);
}

.stat-label {
    font-size: 14px;
    color: #ccc;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #ff4080;
}

.mood-chip {
    display: inline-block;
    background: rgba(255, 0, 64, 0.1);
    border: 1px solid rgba(255, 0, 64, 0.3);
    border-radius: 20px;
    padding: 8px 15px;
    margin: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mood-chip:hover {
    background: rgba(255, 0, 64, 0.2);
    transform: translateY(-2px);
}

/* Responsive design */
@media (max-width: 1400px) {
    .dashboard {
        grid-template-columns: 280px 1fr 260px;
        gap: 15px;
        padding: 15px;
    }
}

@media (max-width: 1200px) {
    .dashboard {
        grid-template-columns: 250px 1fr 240px;
        gap: 12px;
        padding: 12px;
    }

    .navbar {
        padding: 0 20px;
    }

    .search-container {
        margin: 0 20px;
    }
}

@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr 280px;
        grid-template-rows: 70px 1fr auto;
    }

    .left-sidebar {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .sidebar-section {
        margin-bottom: 20px;
    }

    .playlist-item,
    .recent-item {
        display: inline-flex;
        margin-right: 10px;
        margin-bottom: 10px;
        min-width: 150px;
    }

    .navbar {
        font-size: 14px;
    }

    .logo {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
        grid-template-rows: 70px 1fr auto auto;
        gap: 10px;
        padding: 10px;
    }

    .songs-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .section-title {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .song-card {
        padding: 12px;
        gap: 12px;
    }

    .song-artwork {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .song-title {
        font-size: 14px;
    }

    .song-artist {
        font-size: 13px;
    }

    .song-album {
        font-size: 11px;
    }

    .navbar {
        padding: 0 15px;
        height: 70px;
    }

    .search-container {
        margin: 0 15px;
        max-width: 300px;
    }

    .search-bar {
        padding: 10px 40px 10px 15px;
        font-size: 14px;
    }

    .nav-icons {
        gap: 10px;
    }

    .nav-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .logo {
        font-size: 1.3rem;
    }

    .left-sidebar,
    .right-sidebar {
        order: 3;
    }

    .music-player {
        padding: 20px;
        min-height: 400px;
    }

    .current-track {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        margin-bottom: 20px;
    }

    .album-art {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }

    .track-info h2 {
        font-size: 1.5rem;
    }

    .track-info p {
        font-size: 1rem;
    }

    .waveform {
        height: 60px;
        margin: 20px 0;
    }

    .wave-bar {
        width: 3px;
    }

    .player-controls {
        gap: 15px;
    }

    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }

    .control-btn.play {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }

    .stats-widget,
    .recommendations {
        padding: 15px;
    }

    .sidebar-section {
        margin-bottom: 15px;
    }

    .playlist-item,
    .recent-item {
        min-width: 120px;
        padding: 8px;
        font-size: 13px;
    }

    .playlist-icon,
    .recent-icon {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .dashboard {
        padding: 8px;
        gap: 8px;
    }

    .navbar {
        padding: 0 10px;
        height: 60px;
        flex-wrap: wrap;
    }

    .logo {
        font-size: 1.1rem;
    }

    .search-container {
        margin: 0 10px;
        max-width: 200px;
        order: 3;
        flex-basis: 100%;
        margin-top: 10px;
    }

    .search-bar {
        padding: 8px 35px 8px 12px;
        font-size: 13px;
    }

    .nav-icons {
        gap: 8px;
    }

    .nav-icon {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .music-player {
        padding: 15px;
        min-height: 350px;
    }

    .album-art {
        width: 80px;
        height: 80px;
    }

    .track-info h2 {
        font-size: 1.2rem;
    }

    .track-info p {
        font-size: 0.9rem;
    }

    .track-info span {
        font-size: 0.8rem;
    }

    .waveform {
        height: 50px;
        gap: 2px;
    }

    .wave-bar {
        width: 2px;
    }

    .player-controls {
        gap: 12px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .control-btn.play {
        width: 55px;
        height: 55px;
        font-size: 18px;
    }

    .progress-bar {
        height: 4px;
    }

    .time-info {
        font-size: 12px;
    }

    .left-sidebar,
    .right-sidebar {
        padding: 12px;
    }

    .sidebar-title {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .widget-title {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .playlist-item,
    .recent-item {
        min-width: 100px;
        padding: 6px;
        font-size: 12px;
        gap: 8px;
    }

    .playlist-icon,
    .recent-icon {
        width: 25px;
        height: 25px;
        font-size: 10px;
    }

    .stat-item {
        margin-bottom: 8px;
        padding: 6px 0;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-value {
        font-size: 14px;
    }

    .mood-chip {
        padding: 6px 12px;
        font-size: 11px;
        margin: 3px;
    }
}

@media (max-width: 360px) {
    .dashboard {
        padding: 5px;
        gap: 5px;
    }

    .navbar {
        height: 55px;
        padding: 0 8px;
    }

    .logo {
        font-size: 1rem;
    }

    .search-container {
        max-width: 150px;
        margin: 0 5px;
    }

    .music-player {
        padding: 12px;
        min-height: 320px;
    }

    .album-art {
        width: 70px;
        height: 70px;
    }

    .track-info h2 {
        font-size: 1.1rem;
    }

    .current-track {
        gap: 10px;
        margin-bottom: 15px;
    }

    .waveform {
        height: 40px;
        margin: 15px 0;
    }

    .player-controls {
        gap: 10px;
    }

    .control-btn {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }

    .control-btn.play {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {

    .control-btn,
    .nav-icon,
    .playlist-item,
    .recent-item,
    .mood-chip {
        min-height: 44px;
        min-width: 44px;
    }

    .playlist-item,
    .recent-item {
        padding: 12px;
    }

    .mood-chip {
        padding: 10px 15px;
        margin: 5px;
    }
}