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

body {
    background-color: #050b14;
    color: #e2e8f0;
    font-family: 'Montserrat', sans-serif;
    overflow: hidden; /* Prevent scroll on night sky */
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Canvas Background */
#star-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

/* Floating Messages */
#floating-msgs-container {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 2;
}

.floating-msg {
    position: absolute;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-style: italic;
    white-space: nowrap;
    animation: floatMsg linear forwards;
}

@keyframes floatMsg {
    0% { transform: translateY(100vh) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) translateX(50px); opacity: 0; }
}

/* Center Content */
.center-content {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

header {
    text-align: center;
}

.hidden-title {
    font-size: 3rem;
    letter-spacing: 15px;
    color: rgba(255, 255, 255, 0); /* Hidden, canvas will draw it */
    margin-bottom: 10px;
}

.subtitle {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.2rem;
    color: #a0aec0;
    opacity: 0;
    animation: fadeIn 3s ease 2s forwards; /* Fade in after canvas starts */
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Voice Player UI */
.voice-player-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    width: 350px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 1s ease 1s forwards; /* Entrance animation */
}

@keyframes slideUpFade {
    to { opacity: 1; transform: translateY(0); }
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.player-title {
    font-weight: 600;
}

.waveform-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    gap: 3px;
}

.waveform-container .bar {
    width: 4px;
    background: #4a5568;
    border-radius: 2px;
    transition: background 0.3s ease, height 0.2s ease;
}

/* Add varying heights to bars */
.waveform-container .bar:nth-child(even) { height: 100%; }
.waveform-container .bar:nth-child(odd) { height: 40%; }
.waveform-container .bar:nth-child(3n) { height: 70%; }

.waveform-container.playing .bar {
    background: #63b3ed;
    animation: waveBounce 1s infinite alternate ease-in-out;
}
.waveform-container.playing .bar:nth-child(odd) { animation-delay: 0.2s; }
.waveform-container.playing .bar:nth-child(even) { animation-delay: 0.4s; }
.waveform-container.playing .bar:nth-child(3n) { animation-delay: 0.1s; }

@keyframes waveBounce {
    from { height: 30%; }
    to { height: 100%; }
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #63b3ed;
    color: #050b14;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s ease, background 0.3s ease;
}

.play-btn:hover {
    transform: scale(1.1);
    background: #90cdf4;
}

.play-btn .play-icon {
    margin-left: 2px; /* Visual center for triangle */
}
.play-btn.is-playing .play-icon {
    margin-left: 0;
}

.progress-bar-bg {
    flex-grow: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: #63b3ed;
    border-radius: 3px;
    transition: width 0.1s linear;
}
