* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Clover animation */
.clover {
    position: fixed;
    width: 60px;
    height: 60px;
    left: 50%;
    top: -100px;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.clover.falling {
    animation: cloverFall 3s ease-in forwards;
}

@keyframes cloverFall {
    0% {
        top: -100px;
        opacity: 1;
        transform: translateX(-50%) rotate(0deg);
    }
    100% {
        top: 100vh;
        opacity: 0;
        transform: translateX(-50%) rotate(360deg);
    }
}

/* Animated starfield background */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
}

.star-bg {
    position: absolute;
    background: white;
    border-radius: 50%;
    transition: opacity 0.1s ease-out;
}

/* Constellation SVG */
.constellation-container {
    position: relative;
    z-index: 2;
    width: 80%;
    max-width: 1000px;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#constellation {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

.star {
    fill: #fff;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
    opacity: 0;
    animation: starAppear 1s ease-in forwards;
}

.vega {
    fill: #e8f4ff;
    animation-delay: 0.5s;
}

@keyframes starAppear {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.constellation-line {
    stroke: rgba(255, 255, 255, 0.6);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
    cursor: pointer;
    transition: stroke 0.3s ease;
    stroke-linecap: round;
    stroke-linejoin: round;
    /* Increase hit area without changing visual appearance */
    paint-order: stroke;
}

.constellation-line:hover {
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 3;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.constellation-line.plucked {
    stroke: rgba(135, 206, 250, 1);
    filter: drop-shadow(0 0 15px rgba(135, 206, 250, 0.8));
}

.constellation-hitbox {
    stroke: transparent;
    stroke-width: 10;
    fill: none;
    cursor: pointer;
    pointer-events: stroke;
}
/* Heart constellation */
.heart-constellation {
    transition: opacity 1s ease-in-out;
}

.heart-constellation.visible {
    opacity: 1 !important;
}

.heart-star {
    fill: rgba(255, 182, 193, 0.9);
    filter: drop-shadow(0 0 8px rgba(255, 182, 193, 0.8));
    opacity: 0;
}

.heart-star.appear {
    animation: heartStarAppear 0.8s ease-in forwards;
}

@keyframes heartStarAppear {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.heart-line {
    stroke: rgba(255, 105, 180, 0.7);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    filter: drop-shadow(0 0 6px rgba(255, 105, 180, 0.6));
}

.heart-line.traced {
    animation: traceHeartLine 0.6s ease-in-out forwards;
}

@keyframes traceHeartLine {
    to {
        stroke-dashoffset: 0;
    }
}
.constellation-line.traced {
    animation: traceLine 2s ease-in-out forwards;
}

@keyframes traceLine {
    to {
        stroke-dashoffset: 0;
    }
}

.star-label {
    fill: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    font-family: 'Segoe UI', sans-serif;
    opacity: 0;
    transition: opacity 0.5s;
}

.star-label.visible {
    opacity: 1;
}

/* Controls */
.controls-container {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.play-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.play-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.play-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.play-button.circle-glow {
    animation: circleTrace 2s ease-in-out;
}

@keyframes circleTrace {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
    25% {
        box-shadow: 0 0 20px 4px rgba(135, 206, 250, 0.8),
                    0 0 40px 8px rgba(135, 206, 250, 0.4);
    }
    50% {
        box-shadow: 0 0 30px 6px rgba(255, 255, 255, 0.9),
                    0 0 60px 12px rgba(135, 206, 250, 0.5);
    }
    75% {
        box-shadow: 0 0 20px 4px rgba(135, 206, 250, 0.8),
                    0 0 40px 8px rgba(135, 206, 250, 0.4);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.audio-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input[type="file"] {
    display: none;
}

.upload-label {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 14px;
}

.upload-label:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Lyrics */
.lyrics-container {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 30px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lyric-line {
    font-size: 24px;
    line-height: 1.6;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    max-width: 800px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

.lyric-line.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

.lyric-line.fade-in {
    opacity: 0;
    transform: translateY(20px);
}

/* Responsive design */
@media (max-width: 768px) {
    .constellation-container {
        width: 95%;
        height: 50vh;
    }
    
    .lyric-line {
        font-size: 18px;
    }
    
    .star-label {
        font-size: 12px;
    }
}
