:root {
    --bg-color: #111;
    --text-color: #eee;
    --accent-color: #ec4899;
    /* Pink/Reddish */
    --accent-glow: rgba(236, 72, 153, 0.4);
    --font-main: 'Space Grotesk', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.content-wrapper {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 600;
    text-shadow: 0 0 30px var(--accent-glow);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.7;
    max-width: 600px;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
}

.back-btn:hover {
    color: white;
    background: rgba(236, 72, 153, 0.5);
    /* Matching accent */
    transform: translateX(-2px);
}

.input-area {
    width: 100%;
    position: relative;
    margin-top: 2rem;
}

textarea {
    width: 100%;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    color: #fff;
    font-family: inherit;
    font-size: 1.5rem;
    line-height: 1.6;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 30px var(--accent-glow);
    background: rgba(255, 255, 255, 0.08);
}

.music-visual {
    position: absolute;
    top: -40px;
    right: 20px;
    font-size: 4rem;
    color: var(--accent-color);
    opacity: 0.2;
    /* Default faint visibility for metronome */
    transition: transform 0.1s, opacity 0.1s;
    pointer-events: none;
}

.music-visual.pop {
    animation: popNote 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 1 !important;
}

@keyframes popNote {
    0% {
        transform: scale(0.8) rotate(-10deg);
    }

    50% {
        transform: scale(1.3) rotate(10deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-family: inherit;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--accent-glow);
}

/* Overlay for interaction start */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.4s;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-content {
    background: #1a1a1a;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.overlay-content h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

.overlay-content p {
    margin-bottom: 2rem;
    opacity: 0.8;
}

#start-btn {
    display: none;
    /* Only need overlay button ideally */
}