/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #121212;
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 50% 50%, transparent 1.5px, #121212 0 8px, transparent 8px),
        radial-gradient(circle at 50% 50%, transparent 1.5px, #121212 0 8px, transparent 8px),
        radial-gradient(circle at 50% 50%, #734E9E, transparent 60%),
        radial-gradient(circle at 50% 50%, #B8A0D3, transparent 60%),
        radial-gradient(circle at 50% 50%, #ffffff, transparent 60%),
        radial-gradient(ellipse at 50% 50%, #734E9E, transparent 60%);
    background-size:
        10px 17.32px,
        10px 17.32px,
        200% 200%,
        200% 200%,
        200% 200%,
        200% 17.32px;
    background-position:
        0px 0px, 5px 8.66px,
        0% 0%,
        0% 0%,
        0% 0%,
        0% 0%;
    animation: gradientDots 30s linear infinite, colorCycle 6s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes gradientDots {
    0% {
        background-position:
            0px 0px, 5px 8.66px,
            800% 400%,
            1000% -400%,
            -1200% -600%,
            400% 17.32px;
    }
    100% {
        background-position:
            0px 0px, 5px 8.66px,
            0% 0%,
            0% 0%,
            0% 0%,
            0% 0%;
    }
}

@keyframes colorCycle {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Container */
.container {
    display: flex;
    min-height: 100vh;
}

/* Main Content */
.main-content {
    flex: 1;
    min-height: 100vh;
    padding-bottom: 50px;
}

.main-header {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 24px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 24px;
    font-weight: bold;
}

.melody {
    font-family: 'SF Pro Display', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 24px;
    font-weight: 400;
    color: #B8A0D3;
}

.waves {
    font-family: 'SF Pro Display', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 24px;
    font-weight: 1000;
    color: #734E9E;
}

.main-header h1 {
    font-size: 32px;
    font-weight: bold;
    margin: 0;
    margin-bottom: 8px;
}

.greeting p {
    color: #b3b3b3;
    font-size: 1px;
    margin: 0;
}

.main-header {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    position: relative;
}

.main-header h1 {
    font-size: 32px;
    font-weight: bold;
    margin: 0;
    margin-bottom: 8px;
}

.greeting p {
    color: #b3b3b3;
    font-size: 12px;
    margin-left: 3px;
}

.content {
    padding: 24px;
}

.section {
    margin-bottom: 25px;
}

.section h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 200px;
    color: #ffffff;
}

.playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
    margin-bottom: 200px;
}

.playlist-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 30px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.playlist-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.playlist-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 16px;
}

.playlist-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffffff;
}

.playlist-card p {
    font-size: 14px;
    color: #b3b3b3;
    margin: 0;
}

.track-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.track-list .track-item:last-child {
    margin-bottom: 100px;
}

.track-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(160, 0, 235, 0.05);
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
}

.track-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.track-image-container {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.track-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 4px;
}

.track-item:hover .play-overlay {
    opacity: 1;
}

.play-icon-small {
    fill: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.track-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.track-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.track-info p {
    color: #b3b3b3;
    font-size: 12px;
    margin: 0;
}

.track-duration {
    color: #b3b3b3;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
}

/* Now Playing Bar */
.now-playing {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.left-section {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.track-info {
    display: flex;
    align-items: center;
    margin-right: 24px;
}

.track-info img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.track-details {
    min-width: 0;
    flex: 1;
}

.track-details h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ffffff;
}

.track-details p {
    color: #b3b3b3;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.player-controls button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.player-controls button:hover::before {
    width: 120%;
    height: 120%;
}

.player-controls button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.player-controls button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.player-controls button svg {
    z-index: 1;
    position: relative;
    transition: all 0.2s ease;
}

.player-controls button:hover svg {
    transform: scale(1.1);
}

.center-section {
    flex: 1;
    max-width: 600px;
    margin: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 500px;
}

.progress-container span {
    font-size: 12px;
    color: #b3b3b3;
    min-width: 35px;
    text-align: center;
}

#progress-bar {
    flex: 1;
    height: 6px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

#progress-bar::-webkit-slider-track {
    background: rgba(255, 255, 255, 0.2);
    height: 6px;
    border-radius: 3px;
    border: none;
    position: relative;
}

#progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

#progress-bar::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
}

#progress-bar::-webkit-slider-thumb:active {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.right-section {
    flex: 1;
    max-width: 200px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: static;
        height: auto;
        z-index: 50;
    }

    .main-content {
        margin-left: 0;
    }

    .container {
        flex-direction: column;
    }

    .main-header {
        padding: 16px;
    }

    .main-header h1 {
        font-size: 25px;
    }

    .content {
        padding: 16px;
    }

    .playlist-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }

    .track-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .track-list .track-item:last-child {
        margin-bottom: 250px;
    }

    .now-playing {
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 12px;
    }

    .left-section {
        flex-basis: 100%;
        order: 1;
    }

    .center-section {
        flex-basis: 100%;
        order: 2;
        margin: 20;
    }

    .right-section {
        flex-basis: 100%;
        order: 3;
    }

    .player-controls {
        justify-content: center;
        gap: 24px;
    }

    .track-info {
        margin-right: 0;
        justify-content: center;
    }

    .progress-container {
        justify-content: center;
    }
}

/* Icon placeholders (using CSS for simplicity) */
.icon-home::before { content: "🏠"; }
.icon-search::before { content: "🔍"; }
.icon-library::before { content: "📚"; }
.icon-prev::before { content: "⏮"; }
.icon-play::before { content: "▶"; }
.icon-pause::before { content: "⏸"; }
.icon-next::before { content: "⏭"; }

/* Loading animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
