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

:root {
    --bg-gradient-top: #2c2c2e;
    --bg-gradient-bottom: #1c1c1e;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.55);
    --accent: #ff375f;
    --control-bg: rgba(255, 255, 255, 0.08);
    --progress-bg: rgba(255, 255, 255, 0.15);
    --progress-fill: rgba(255, 255, 255, 0.5);
    --knob-color: #ffffff;
}

html, body {
    background-image: linear-gradient(to right top, #370505, #7a0000, #930000, #9e0a0a, #750404);
    height: 100%;
    font-family: 'Comfortaa', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
    -webkit-user-select: none;
}

.player-container {
    position: relative;
    max-width: 420px;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 60px 28px 40px;
    transition: background 0.8s ease;
}

/* Album Art */
.album-art-wrapper {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    padding: 10px 0 20px;
}

.album-art {
    width: 100%;
    max-width: 340px;
    max-height: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.album-art:hover {
    transform: scale(1.03);
}

.album-art:active {
    transform: scale(0.98);
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.album-art-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
}

/* Track Info */
.track-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 16px;
}

.track-details {
    flex: 1;
    min-width: 0;
}

.track-name {
    font-size: 1em;
    font-weight: 700;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.artist-name {
    font-size: 1em;
    font-weight: 400;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.favorite-btn,
.more-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.favorite-btn:hover,
.more-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.favorite-btn.active {
    color: var(--accent);
}

.favorite-btn.active svg {
    fill: var(--accent);
    stroke: var(--accent);
}

/* Progress Bar */
.progress-section {
    padding: 4px 0;
}

.progress-bar-container {
    position: relative;
    height: 28px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
}

.progress-bar-bg {
    width: 100%;
    height: 4px;
    background: var(--progress-bg);
    border-radius: 2px;
    overflow: hidden;
}

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

.progress-knob {
    position: absolute;
    left: 0%;
    width: 12px;
    height: 12px;
    background: var(--knob-color);
    border-radius: 50%;
    transform: translate(-50%, 0);
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.progress-bar-container:hover .progress-knob,
.progress-bar-container.dragging .progress-knob {
    opacity: 1;
}

.progress-bar-container:hover .progress-bar-bg {
    height: 6px;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 1em;
    font-weight: 500;
    color: var(--text-secondary);
    padding-top: 4px;
    font-variant-numeric: tabular-nums;
}

/* Playback Controls */
.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    padding: 12px 0 16px;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s, transform 0.15s;
    padding: 0;
}

.control-btn:hover {
    opacity: 0.7;
}

.control-btn:active {
    transform: scale(0.9);
}

.play-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: none;
}

.skip-btn {
    opacity: 0.9;
}

/* Volume Section */
.volume-section {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0 20px;
}

.volume-icon {
    flex-shrink: 0;
}

.volume-bar-container {
    flex: 1;
    position: relative;
    height: 28px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
}

.volume-bar-bg {
    width: 100%;
    height: 4px;
    background: var(--progress-bg);
    border-radius: 2px;
    overflow: hidden;
}

.volume-bar-fill {
    height: 100%;
    width: 50%;
    background: var(--progress-fill);
    border-radius: 2px;
}

.volume-knob {
    position: absolute;
    left: 50%;
    width: 12px;
    height: 12px;
    background: var(--knob-color);
    border-radius: 50%;
    transform: translate(-50%, 0);
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.volume-bar-container:hover .volume-knob,
.volume-bar-container.dragging .volume-knob {
    opacity: 1;
}

.volume-bar-container:hover .volume-bar-bg {
    height: 6px;
}

/* Bottom Controls */
.bottom-controls {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 12px 8px 0;
}

.bottom-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.bottom-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.bottom-btn.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Drop Zone */
.drop-zone {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 0;
}

.drop-zone.visible {
    display: flex;
}

.drop-zone-content {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.drop-zone-content p {
    margin-top: 16px;
    font-size: 1em;
    font-weight: 500;
}

/* Animation for playing state */
@keyframes pulse {

}

.album-art.playing {
    animation: pulse 3s ease-in-out infinite;
}

/* Responsive */
@media (max-height: 700px) {
    .player-container {
        padding: 30px 24px 20px;
    }

    .album-art-wrapper {
        padding: 5px 0 10px;
    }

    .controls {
        gap: 40px;
        padding: 8px 0 12px;
    }

    .volume-section {
        padding: 2px 0 12px;
    }
}

@media (max-height: 580px) {
    .player-container {
        padding: 15px 24px 10px;
    }

    .album-art-wrapper {
        padding: 0;
    }

    .bottom-controls {
        padding: 4px 8px 0;
    }
}
