* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(120% 120% at 10% 10%, #ffe3ed 0%, #f9d7ff 40%, #e1d7ff 70%, #cde0ff 100%);
    min-height: 100vh;
    color: #3b294b;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: -25%;
    left: -25%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at 20% 30%, rgba(255, 153, 220, 0.45) 0%, transparent 55%), radial-gradient(circle at 80% 20%, rgba(255, 207, 232, 0.4) 0%, transparent 60%), radial-gradient(circle at 50% 80%, rgba(209, 176, 255, 0.35) 0%, transparent 60%);
    filter: blur(70px);
    opacity: 0.85;
    z-index: -3;
    animation: dreamy 14s ease-in-out infinite alternate;
}

body::after {
    content: "";
    position: fixed;
    top: -6%;
    left: -6%;
    width: 112%;
    height: 112%;
    background-image: radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.35) 0 9%, transparent 10%), radial-gradient(circle at 78% 12%, rgba(255, 200, 220, 0.38) 0 8%, transparent 9%), radial-gradient(circle at 52% 74%, rgba(255, 255, 255, 0.33) 0 11%, transparent 12%), radial-gradient(circle at 28% 64%, rgba(247, 167, 210, 0.36) 0 10%, transparent 11%);
    opacity: 0.8;
    z-index: -2;
    animation: floaty 18s ease-in-out infinite alternate;
}

@keyframes dreamy {
    0% {
        transform: scale(1) translate(0, 0);
    }
    100% {
        transform: scale(1.05) translate(2%, -1%);
    }
}

@keyframes floaty {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-2%, 1%, 0);
    }
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 120px;
    position: relative;
    z-index: 1;
}

.section {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 50px 45px;
    margin-bottom: 45px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 35px 70px rgba(142, 111, 191, 0.18);
    position: relative;
    overflow: hidden;
    color: #422642;
}

.section::before {
    content: "";
    position: absolute;
    inset: -1px;
    background: linear-gradient(120deg, rgba(255, 180, 225, 0.35), rgba(179, 167, 255, 0.28), rgba(255, 225, 240, 0.45));
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.section:hover::before {
    opacity: 1;
}

.section:hover {
    transform: translateY(-8px) scale(1.01);
}

.title {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: clamp(2.8rem, 5vw, 4.3rem);
    text-align: center;
    margin-bottom: 16px;
    background: linear-gradient(120deg, #ff6fb7, #ab82ff, #ff9fda);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 2px;
    animation: glow 6s ease-in-out infinite alternate;
}

@keyframes glow {
    0% {
        text-shadow: 0 10px 30px rgba(255, 132, 194, 0.3);
    }
    100% {
        text-shadow: 0 18px 40px rgba(164, 125, 255, 0.4);
    }
}

.subtitle {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 36px;
    color: rgba(85, 54, 110, 0.75);
    letter-spacing: 0.08em;
}

.scene-description {
    max-width: 720px;
    margin: 0 auto 34px;
    padding: 24px 28px;
    border-radius: 24px;
}

.scene-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.scene-tag {
    background: linear-gradient(135deg, rgba(255, 173, 210, 0.85), rgba(192, 155, 255, 0.85));
    color: #362145;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.92rem;
    letter-spacing: 0.07em;
    box-shadow: 0 10px 20px rgba(193, 147, 228, 0.25);
}

.scene-text {
    font-size: 1.05rem;
    text-align: center;
    color: #452557;
    line-height: 1.7;
}

#universeCanvas {
    display: block;
    width: 100%;
    max-width: 780px;
    height: 420px;
    margin: 0 auto;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 60%), rgba(71, 41, 89, 0.35);
    border-radius: 26px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 18px 40px rgba(255, 255, 255, 0.13), 0 25px 60px rgba(103, 73, 151, 0.25);
    cursor: pointer;
}

.section-title {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: clamp(2.1rem, 4vw, 3.1rem);
    text-align: center;
    margin-bottom: 14px;
    color: #512e67;
    letter-spacing: 0.12em;
}

.section-subtitle {
    text-align: center;
    font-size: 1.05rem;
    margin-bottom: 32px;
    color: rgba(82, 54, 108, 0.7);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.playlist-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 820px;
    margin: 0 auto;
}

.loading {
    text-align: center;
    font-size: 1.15rem;
    padding: 48px;
    color: rgba(66, 38, 66, 0.7);
}

.song-item {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    padding: 26px 28px;
    display: flex;
    gap: 22px;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(155, 118, 198, 0.2);
    position: relative;
    overflow: hidden;
}

.song-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 50%, rgba(255, 175, 210, 0.45), transparent 55%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.song-item:hover::after {
    opacity: 1;
}

.song-cover {
    width: 96px;
    height: 96px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 14px 28px rgba(128, 89, 171, 0.3);
}

.song-info {
    flex: 1;
}

.song-name {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: 1.45rem;
    margin-bottom: 6px;
    color: #3d2154;
}

.song-artist {
    font-size: 0.98rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(89, 57, 118, 0.65);
    margin-bottom: 12px;
}

.song-note {
    font-size: 0.95rem;
    font-style: italic;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(120deg, rgba(255, 219, 239, 0.85), rgba(237, 215, 255, 0.8));
    color: #4c315f;
    line-height: 1.6;
    box-shadow: inset 0 10px 18px rgba(255, 255, 255, 0.35);
}

.play-btn {
    background: linear-gradient(135deg, #ff85c1, #c79bff);
    border: none;
    border-radius: 50%;
    width: 58px;
    height: 58px;
    font-size: 1.5em;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 14px 26px rgba(194, 129, 226, 0.4);
    z-index: 1;
}

.play-btn:hover,
.play-btn:focus {
    transform: scale(1.1);
    box-shadow: 0 18px 32px rgba(180, 120, 217, 0.45);
}

.play-btn:focus {
    outline: 2px solid rgba(255, 180, 220, 0.8);
}

.letter-content {
    max-width: 720px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.68);
    padding: 48px;
    border-radius: 28px;
    line-height: 1.9;
    box-shadow: 0 30px 60px rgba(149, 110, 194, 0.22);
    position: relative;
    overflow: hidden;
}

.letter-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 203, 221, 0.45), rgba(215, 191, 255, 0.4));
    opacity: 0.75;
    z-index: -1;
}

.letter-text {
    font-size: 1.2rem;
    margin-bottom: 22px;
    text-align: left;
    color: #3e2455;
}

.signature {
    text-align: right;
    font-size: 1.35rem;
    margin-top: 48px;
    font-family: 'Playfair Display', 'Times New Roman', serif;
    color: #7a3f6c;
    letter-spacing: 0.12em;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 860px) {
    .container {
        padding: 32px 18px 90px;
    }

    .section {
        padding: 36px 26px;
    }

    #universeCanvas {
        height: 340px;
    }

    .scene-description {
        padding: 22px 20px;
    }

    .scene-text {
        font-size: 1rem;
    }

    .song-item {
        flex-direction: column;
        text-align: center;
    }

    .song-cover {
        width: 160px;
        height: 160px;
    }

    .play-btn {
        align-self: center;
    }

    .letter-content {
        padding: 34px 26px;
    }
}

@media (max-width: 540px) {
    .container {
        padding: 28px 16px 70px;
    }

    .section {
        padding: 30px 20px;
        border-radius: 22px;
    }

    #universeCanvas {
        height: 280px;
    }

    .song-cover {
        width: 130px;
        height: 130px;
    }

    .scene-description {
        padding: 20px 18px;
    }

    .song-name {
        font-size: 1.28rem;
    }

    .song-note {
        font-size: 0.92rem;
    }

    .letter-text {
        font-size: 1.1rem;
    }
}
