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

:root {
    --midnight: #020817;
    --navy: #06142b;
    --navy-light: #0a1d3b;
    --blue: #178cff;
    --blue-light: #58b7ff;
    --blue-glow: rgba(23, 140, 255, 0.45);
    --red: #ff174f;
    --red-dark: #9d1235;
    --white: #f7faff;
    --muted: #8fa2bd;
    --border: rgba(117, 169, 225, 0.14);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--white);
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at 50% 20%, rgba(18, 61, 113, 0.32), transparent 35%),
        radial-gradient(circle at 80% 80%, rgba(14, 45, 88, 0.25), transparent 35%),
        linear-gradient(135deg, #010713, #031127 48%, #010611);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.32;
    background-image:
        linear-gradient(rgba(56, 139, 221, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 139, 221, 0.06) 1px, transparent 1px);
    background-size: 55px 55px;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 15% 25%, rgba(23, 140, 255, 0.08), transparent 2px),
        radial-gradient(circle at 70% 15%, rgba(23, 140, 255, 0.08), transparent 2px),
        radial-gradient(circle at 85% 70%, rgba(23, 140, 255, 0.06), transparent 2px);
}

.hearts-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.heart-particle {
    position: absolute;
    bottom: -50px;
    color: #ff174f;
    line-height: 1;
    opacity: 0;
    text-shadow:
        0 0 5px rgba(255, 23, 79, 0.9),
        0 0 12px rgba(255, 23, 79, 0.75),
        0 0 25px rgba(255, 23, 79, 0.5);
    animation: heartFloat linear forwards;
}

@keyframes heartFloat {
    0% {
        transform: translate3d(0, 0, 0) scale(0.35) rotate(-10deg);
        opacity: 0;
    }

    12% {
        opacity: 0.85;
    }

    40% {
        transform: translate3d(25px, -35vh, 0) scale(1) rotate(8deg);
        opacity: 0.7;
    }

    70% {
        transform: translate3d(-25px, -70vh, 0) scale(0.85) rotate(-8deg);
        opacity: 0.5;
    }

    100% {
        transform: translate3d(15px, -115vh, 0) scale(0.3) rotate(5deg);
        opacity: 0;
    }
}

.rain-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
    opacity: 0.22;
}

.rain-drop {
    position: absolute;
    top: -30px;
    width: 1px;
    height: 55px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(112, 183, 255, 0.45)
    );
    transform: rotate(12deg);
    animation: rainFall linear infinite;
}

@keyframes rainFall {
    from {
        transform: translateY(-80px) rotate(12deg);
    }

    to {
        transform: translateY(110vh) rotate(12deg);
    }
}

.music-app {
    position: relative;
    z-index: 2;
    width: min(1380px, 94%);
    margin: 0 auto;
    padding: 55px 0 35px;
}

.app-header {
    text-align: center;
    padding: 10px 20px 48px;
}

.brand-label {
    display: inline-block;
    margin-bottom: 12px;
    color: #b8c9dd;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
}

.brand h1 {
    color: #f8fbff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 6vw, 82px);
    font-weight: 500;
    line-height: 0.95;
    letter-spacing: -2px;
    text-shadow: 0 0 30px rgba(105, 180, 255, 0.2);
}

.brand p {
    margin-top: 18px;
    color: var(--muted);
    font-size: 15px;
    letter-spacing: 0.5px;
}

.player-section {
    display: grid;
    grid-template-columns: minmax(360px, 0.95fr) minmax(380px, 1fr);
    align-items: center;
    gap: 80px;
    min-height: 510px;
    padding: 50px 65px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background:
        linear-gradient(
            135deg,
            rgba(9, 30, 59, 0.86),
            rgba(2, 12, 29, 0.94)
        );
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.45),
        inset 0 1px rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
}

.album-area {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 430px;
}

.vinyl {
    position: relative;
    width: min(390px, 90%);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vinyl-disc {
    position: absolute;
    width: 91%;
    height: 91%;
    right: -7%;
    border-radius: 50%;
    background:
        repeating-radial-gradient(
            circle,
            #05070d 0px,
            #080b12 2px,
            #151922 3px,
            #05070d 5px
        );
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.5),
        0 0 35px rgba(0, 0, 0, 0.8);
}

.vinyl-disc::before {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.vinyl-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: #111722;
    border: 4px solid #2d3441;
    z-index: 2;
}

#albumArt {
    position: relative;
    z-index: 3;
    width: 76%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow:
        0 0 0 5px rgba(7, 25, 51, 0.85),
        0 0 35px rgba(20, 126, 255, 0.22),
        0 25px 55px rgba(0, 0, 0, 0.6);
    transition:
        transform 0.5s ease,
        box-shadow 0.5s ease;
}

#albumArt:hover {
    transform: scale(1.025);
}

#albumArt.playing {
    box-shadow:
        0 0 0 5px rgba(7, 25, 51, 0.85),
        0 0 45px rgba(23, 140, 255, 0.4),
        0 25px 55px rgba(0, 0, 0, 0.65);
}

.player-content {
    width: 100%;
    max-width: 590px;
}

.now-playing-label {
    color: var(--blue-light);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 4px;
    margin-bottom: 12px;
}

.song-info h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(32px, 4vw, 54px);
    font-weight: 500;
    line-height: 1.05;
    color: #f8fbff;
}

.song-info p {
    margin-top: 9px;
    color: #8fa6c2;
    font-size: 15px;
}

.music-visualizer {
    display: flex;
    align-items: end;
    justify-content: flex-start;
    gap: 5px;
    height: 34px;
    margin: 30px 0 18px;
}

.music-visualizer span {
    width: 4px;
    height: 9px;
    border-radius: 10px;
    background: var(--blue);
    box-shadow: 0 0 10px rgba(23, 140, 255, 0.8);
}

.music-visualizer.playing span:nth-child(1) {
    animation: bars 0.65s infinite alternate;
}

.music-visualizer.playing span:nth-child(2) {
    animation: bars 0.85s 0.1s infinite alternate;
}

.music-visualizer.playing span:nth-child(3) {
    animation: bars 0.55s 0.2s infinite alternate;
}

.music-visualizer.playing span:nth-child(4) {
    animation: bars 0.75s 0.05s infinite alternate;
}

.music-visualizer.playing span:nth-child(5) {
    animation: bars 0.5s 0.15s infinite alternate;
}

.music-visualizer.playing span:nth-child(6) {
    animation: bars 0.8s 0.25s infinite alternate;
}

.music-visualizer.playing span:nth-child(7) {
    animation: bars 0.6s 0.12s infinite alternate;
}

@keyframes bars {
    from {
        height: 7px;
    }

    to {
        height: 30px;
    }
}

.time-row {
    display: flex;
    justify-content: space-between;
    color: #7187a2;
    font-size: 12px;
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    appearance: none;
    border-radius: 10px;
    background: #1a304e;
    cursor: pointer;
    outline: none;
}

.progress-bar::-webkit-slider-thumb {
    appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 12px rgba(23, 140, 255, 0.9);
}

.progress-bar::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border: none;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 12px rgba(23, 140, 255, 0.9);
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 42px;
    margin: 30px 0;
}

.control-btn,
.play-btn,
.secondary-btn {
    border: none;
    color: #dcecff;
    background: transparent;
    cursor: pointer;
    transition:
        transform 0.25s ease,
        color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.control-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 21px;
}

.control-btn:hover {
    color: var(--blue-light);
    transform: scale(1.12);
}

.play-btn {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    color: #021022;
    background: #f8fbff;
    font-size: 25px;
    padding-left: 4px;
    box-shadow:
        0 0 0 7px rgba(23, 140, 255, 0.08),
        0 0 35px rgba(23, 140, 255, 0.55);
}

.play-btn:hover {
    transform: scale(1.08);
    box-shadow:
        0 0 0 9px rgba(23, 140, 255, 0.09),
        0 0 50px rgba(23, 140, 255, 0.75);
}

.secondary-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.secondary-btn {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(113, 157, 203, 0.13);
    border-radius: 50%;
    background: rgba(9, 30, 58, 0.65);
    font-size: 16px;
}

.secondary-btn:hover {
    color: var(--blue-light);
    border-color: rgba(23, 140, 255, 0.4);
    background: rgba(23, 140, 255, 0.08);
    transform: translateY(-2px);
}

.secondary-btn.active {
    color: var(--blue-light);
    border-color: rgba(23, 140, 255, 0.55);
    background: rgba(23, 140, 255, 0.12);
    box-shadow: 0 0 18px rgba(23, 140, 255, 0.18);
}

.favorite-btn.active {
    color: var(--red);
    border-color: rgba(255, 23, 79, 0.45);
    background: rgba(255, 23, 79, 0.1);
    text-shadow: 0 0 12px rgba(255, 23, 79, 0.8);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: auto;
}

.volume-icon {
    font-size: 15px;
    opacity: 0.75;
}

#volumeBar {
    width: 100px;
    height: 4px;
    appearance: none;
    background: #1a304e;
    border-radius: 10px;
    cursor: pointer;
}

#volumeBar::-webkit-slider-thumb {
    appearance: none;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 10px rgba(23, 140, 255, 0.8);
}

#volumeBar::-moz-range-thumb {
    width: 11px;
    height: 11px;
    border: none;
    border-radius: 50%;
    background: var(--blue);
}

.playlist-section {
    margin-top: 70px;
    padding: 35px 45px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: rgba(3, 15, 32, 0.76);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(16px);
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 25px;
}

.section-label {
    color: var(--blue-light);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 4px;
}

.playlist-header h2 {
    margin-top: 7px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    font-weight: 500;
}

.song-count {
    color: var(--muted);
    font-size: 13px;
}

.playlist {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.playlist-item {
    position: relative;
    display: grid;
    grid-template-columns: 35px 55px 1fr 35px;
    align-items: center;
    gap: 16px;
    min-height: 74px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: rgba(6, 22, 44, 0.55);
    cursor: pointer;
    transition:
        background 0.25s ease,
        border 0.25s ease,
        transform 0.25s ease;
}

.playlist-item:hover {
    transform: translateX(5px);
    background: rgba(12, 40, 76, 0.72);
    border-color: rgba(50, 145, 231, 0.16);
}

.playlist-item.active {
    background:
        linear-gradient(
            90deg,
            rgba(23, 140, 255, 0.14),
            rgba(5, 26, 52, 0.72)
        );
    border-color: rgba(23, 140, 255, 0.18);
}

.playlist-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 5px;
    background: var(--blue);
    box-shadow: 0 0 12px rgba(23, 140, 255, 0.8);
}

.track-number {
    color: #627a99;
    font-size: 12px;
    text-align: center;
}

.playlist-item.active .track-number {
    color: var(--blue-light);
}

.playlist-item img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 9px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

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

.track-details h3 {
    color: #eaf3ff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-details p {
    margin-top: 5px;
    color: #7289a4;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-duration {
    color: #748aa4;
    font-size: 18px;
    text-align: center;
}

.playlist-item:hover .track-duration {
    color: var(--red);
}

.app-footer {
    padding: 35px 0 10px;
    text-align: center;
    color: #637993;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.app-footer span {
    color: var(--red);
    text-shadow: 0 0 10px rgba(255, 23, 79, 0.7);
}

button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--blue-light);
    outline-offset: 3px;
}

@media (max-width: 1000px) {
    .music-app {
        width: 94%;
        padding-top: 35px;
    }

    .player-section {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 45px;
    }

    .album-area {
        min-height: auto;
    }

    .player-content {
        max-width: 700px;
        margin: 0 auto;
    }

    .song-info {
        text-align: center;
    }

    .now-playing-label {
        text-align: center;
    }

    .music-visualizer {
        justify-content: center;
    }

    .time-row {
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }

    .progress-bar {
        display: block;
        max-width: 700px;
        margin: auto;
    }

    .controls {
        margin-top: 30px;
    }

    .secondary-controls {
        justify-content: center;
    }

    .volume-control {
        margin-left: 5px;
    }
}

@media (max-width: 650px) {
    body {
        background:
            radial-gradient(
                circle at 50% 10%,
                rgba(18, 61, 113, 0.25),
                transparent 35%
            ),
            #020817;
    }

    body::before {
        background-size: 38px 38px;
        opacity: 0.22;
    }

    .music-app {
        width: 100%;
        padding: 22px 13px 30px;
    }

    .app-header {
        padding: 8px 8px 25px;
    }

    .brand-label {
        font-size: 8px;
        letter-spacing: 3px;
    }

    .brand h1 {
        font-size: 43px;
        letter-spacing: -1px;
    }

    .brand p {
        max-width: 300px;
        margin: 12px auto 0;
        font-size: 12px;
        line-height: 1.5;
    }

    .player-section {
        display: block;
        min-height: auto;
        padding: 25px 18px 22px;
        border-radius: 25px;
    }

    .album-area {
        min-height: auto;
        margin-bottom: 30px;
    }

    .vinyl {
        width: min(310px, 88vw);
    }

    .vinyl-disc {
        right: -4%;
    }

    #albumArt {
        width: 79%;
        border-radius: 14px;
    }

    .now-playing-label {
        font-size: 8px;
        letter-spacing: 3px;
    }

    .song-info h2 {
        font-size: 29px;
        line-height: 1.1;
    }

    .song-info p {
        font-size: 12px;
    }

    .music-visualizer {
        height: 25px;
        margin: 20px 0 12px;
    }

    .controls {
        gap: 25px;
        margin: 24px 0;
    }

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

    .play-btn {
        width: 67px;
        height: 67px;
        font-size: 22px;
    }

    .secondary-controls {
        gap: 9px;
        flex-wrap: wrap;
    }

    .secondary-btn {
        width: 38px;
        height: 38px;
    }

    .volume-control {
        width: 100%;
        justify-content: center;
        margin: 7px 0 0;
    }

    #volumeBar {
        width: 120px;
    }

    .playlist-section {
        margin-top: 28px;
        padding: 23px 12px;
        border-radius: 22px;
    }

    .playlist-header {
        align-items: center;
        margin-bottom: 16px;
    }

    .playlist-header h2 {
        font-size: 25px;
    }

    .section-label {
        font-size: 7px;
        letter-spacing: 2.5px;
    }

    .song-count {
        font-size: 10px;
    }

    .playlist {
        gap: 5px;
    }

    .playlist-item {
        grid-template-columns: 23px 48px 1fr 24px;
        gap: 10px;
        min-height: 65px;
        padding: 7px 8px;
        border-radius: 11px;
    }

    .playlist-item img {
        width: 48px;
        height: 48px;
        border-radius: 7px;
    }

    .track-number {
        font-size: 9px;
    }

    .track-details h3 {
        font-size: 12px;
    }

    .track-details p {
        font-size: 9px;
        margin-top: 3px;
    }

    .track-duration {
        font-size: 15px;
    }

    .app-footer {
        font-size: 9px;
        padding-top: 25px;
    }
}

@media (max-width: 380px) {
    .brand h1 {
        font-size: 37px;
    }

    .player-section {
        padding: 20px 13px;
    }

    .vinyl {
        width: 270px;
    }

    .song-info h2 {
        font-size: 25px;
    }

    .controls {
        gap: 17px;
    }

    .playlist-item {
        grid-template-columns: 20px 44px 1fr 20px;
        gap: 7px;
    }

    .playlist-item img {
        width: 44px;
        height: 44px;
    }

    .track-details h3 {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .hearts-container,
    .rain-container {
        display: none;
    }
}