body {
    margin: 0;
    padding: 0;
    background-color: #0d1117;
    background-image: 
        radial-gradient(circle at center, rgba(74, 246, 38, 0.05) 0%, transparent 70%),
        linear-gradient(rgba(74, 246, 38, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 246, 38, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 30px 30px, 30px 30px;
    color: #4af626;
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.1)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 9999;
}

#game-container {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 20px;
    box-sizing: border-box;
}

header {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 0 0 5px #4af626;
    z-index: 10;
}

.letter-display {
    font-size: 8rem;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(74, 246, 38, 0.5), 0 0 20px rgba(74, 246, 38, 0.3);
    height: 120px;
    line-height: 120px;
    font-weight: bold;
    letter-spacing: 10px;
}

.timeline-container {
    position: relative;
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(74, 246, 38, 0.05) 0%, transparent 100%);
    border-top: 1px solid rgba(74, 246, 38, 0.2);
    border-bottom: 1px solid rgba(74, 246, 38, 0.2);
}

.timeline-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: rgba(74, 246, 38, 0.5);
    top: 50%;
    transform: translateY(-50%);
}

.target-zone {
    position: absolute;
    left: 5%;
    width: 40%;
    max-width: 250px;
    height: 80px;
    border: 2px solid rgba(255, 191, 0, 0.5);
    border-radius: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 191, 0, 0.05);
    border-right: 2px dashed rgba(255, 191, 0, 0.8);
    box-sizing: border-box;
    pointer-events: none;
    transition: all 0.1s ease;
}

.target-zone::after {
    content: 'TARGET ZONE';
    position: absolute;
    top: -20px;
    left: 5px;
    font-size: 0.7rem;
    color: #ffbf00;
    opacity: 0.7;
}

#symbols-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.symbol {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #4af626;
    box-shadow: 0 0 10px #4af626, 0 0 20px #4af626;
}

.symbol.dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.symbol.dash {
    width: 48px;
    height: 16px;
    border-radius: 8px;
}

.input-feedback {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 60px;
}

.feedback-bar-container {
    width: 80%;
    max-width: 300px;
    height: 24px;
    border: 2px solid #4af626;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
    position: relative;
    box-shadow: 0 0 10px rgba(74, 246, 38, 0.5);
    transition: border-color 0.1s, box-shadow 0.1s;
}

.feedback-bar {
    width: 0%;
    height: 100%;
    background: #4af626;
    transition: background-color 0.1s;
}

.feedback-text {
    margin-top: 10px;
    font-size: 1.2rem;
    height: 1.5em;
    font-weight: bold;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.overlay.hidden {
    display: none;
}

.overlay h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-align: center;
}

.overlay p {
    font-size: 1.5rem;
    margin: 10px 0;
    text-align: center;
}

.blink {
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

@media (min-width: 768px) {
    header {
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
    .letter-display {
        font-size: 6rem;
        height: 80px;
        line-height: 80px;
        margin-bottom: 40px;
    }
    
    .timeline-container {
        height: 80px;
    }
    
    .target-zone {
        height: 60px;
    }
    
    .symbol.dot {
        width: 14px;
        height: 14px;
    }
    
    .symbol.dash {
        width: 40px;
        height: 14px;
    }
    
    .feedback-bar-container {
        width: 90%;
    }
    
    .overlay h1 {
        font-size: 2.2rem;
    }
}
