@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&display=swap');

body {
    font-family: 'Noto Sans TC', sans-serif;
    background: linear-gradient(135deg, #1a1b26 0%, #24283b 100%);
    overflow: hidden;
    /* Prevent scrollbars from falling characters */
    height: 100vh;
    margin: 0;
    padding: 0;
    color: #c0caf5;
}

.falling-character {
    position: absolute;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
    user-select: none;
    display: flex;
    flex-direction: column;
    /* 讓字和注音垂直排列 */
    align-items: center;
    justify-content: center;
    width: 80px;
    /* 加寬以容納按鍵提示 */
    height: 80px;
    border-radius: 50%;
    background: rgba(36, 40, 59, 0.7);
    border: 1px solid rgba(122, 162, 247, 0.3);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    transition: transform 0.2s, opacity 0.2s;
    padding: 5px;
    text-align: center;
}

.falling-character.hit {
    transform: scale(1.5);
    opacity: 0;
    background: rgba(122, 162, 247, 0.8);
}

@keyframes fall {
    from {
        transform: translateY(-80px);
        /* Start above screen */
    }

    to {
        transform: translateY(100vh);
        /* Fall to bottom of screen */
    }
}

.input-area {
    backdrop-filter: blur(10px);
    background: rgba(26, 27, 38, 0.6);
    border-top: 1px solid rgba(122, 162, 247, 0.3);
}

#input-field {
    color: #c0caf5;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    caret-color: #bb9af7;
}

#input-field::placeholder {
    color: rgba(192, 202, 245, 0.5);
}

.game-over-overlay {
    background: rgba(26, 27, 38, 0.9);
    backdrop-filter: blur(5px);
}

@media (max-width: 768px) {
    .falling-character {
        width: 70px;
        height: 70px;
    }
}


@media (max-width: 640px) {
    .falling-character {
        width: 65px;
        height: 65px;
    }
}