:root {
    --primary-glow: #ffffff;
    --secondary-glow: #aaaaaa;
    --bg-dark: #000000;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    font-family: 'Noto Sans JP', sans-serif;
    overflow: hidden;
    color: #fff;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#canvas-container canvas {
    display: block;
}

#ui-container {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    pointer-events: none; /* Let canvas capture events if needed, except for UI */
}

/* Header */
#sprint-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    font-family: 'Josefin Sans', sans-serif;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: #fff;
    text-transform: uppercase;
}

.logo span {
    color: var(--secondary-glow);
    font-weight: 400;
}

.timer {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    font-variant-numeric: tabular-nums;
}

.timer.danger {
    color: #aaaaaa;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    animation: heartbeat 0.5s infinite;
}

.score {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

/* Idea Space */
#idea-space {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Individual Idea Bubble */
.idea-node {
    position: absolute;
    padding: 15px 25px;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: 400;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    opacity: 0;
    transform: scale(0.5);
    transition: transform 0.1s;
    backdrop-filter: blur(4px);
    color: #ccc;
}

.idea-node.user-input {
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

/* Input Area */
#input-container {
    padding: 30px;
    display: flex;
    justify-content: center;
    position: relative;
    pointer-events: auto;
}

#sprint-input {
    padding: 20px 30px;
    font-size: 1.5rem;
    font-weight: 400;
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #555;
    border-radius: 4px;
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.2s;
    font-family: 'Noto Sans JP', sans-serif;
}

#sprint-input:focus {
    border-color: #fff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
    background: rgba(10, 10, 10, 0.9);
}

/* Modal */
.modal-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 5, 16, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: auto;
}

.modal-content {
    text-align: center;
    background: #000;
    border: 1px solid #333;
    padding: 60px;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.modal-content h1 {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.modal-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 40px;
    color: #ccc;
}

#btn-start {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 15px 50px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.4);
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes flyIn {
    0% {
        opacity: 0;
        transform: translateZ(-1000px) scale(0.1);
    }
    100% {
        opacity: 1;
        transform: translateZ(0) scale(1);
    }
}
