body {
    background-color: #f0f8ff;
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

#game-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 4px solid #4a90e2;
}

.title-animation {
    color: #4a90e2;
    font-size: 2.5em;
    text-shadow: 2px 2px 0 #fff, 4px 4px 0 rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.setup-box {
    background: #eef7ff;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 15px;
    font-size: 1.2em;
    text-align: left;
}

.input-group input[type="text"], .input-group select {
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #ccc;
    font-size: 1em;
    width: 60%;
}

/* Radio Group Styles */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    border: 2px solid #ddd;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.radio-group label:hover {
    border-color: #4a90e2;
}

.radio-group input[type="radio"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.radio-group input[type="radio"]:checked + span {
    font-weight: bold;
    color: #4a90e2;
}

/* Selected state styling could be improved but basic check is fine */
.radio-group label:has(input:checked) {
    border-color: #4a90e2;
    background-color: #f0f8ff;
}

.big-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.5em;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 0 #d64545;
    transition: all 0.1s;
}

.big-btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #d64545;
}

/* Battle Screen */
.battle-hud {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.hp-bar-bg {
    width: 200px;
    height: 20px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #333;
}

#hp-bar-fill {
    height: 100%;
    background: #ff4757;
    transition: width 0.3s ease;
}

.timer-area {
    font-size: 1.5em;
    font-weight: bold;
}

.battle-stage {
    height: 150px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 80px;
    background: #f9f9f9;
    border-radius: 15px;
    margin-bottom: 20px;
}

.monster-float {
    animation: float 2s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

#damage-text {
    position: absolute;
    color: #ff4757;
    font-weight: bold;
    font-size: 40px;
    pointer-events: none;
    opacity: 0;
}

.animate-damage {
    animation: damageUp 0.8s ease-out;
}

@keyframes damageUp {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-50px); }
}

.question-area {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

#answer-input-display {
    color: #4a90e2;
    min-width: 100px;
    border-bottom: 5px solid #4a90e2;
}

.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 300px;
    margin: 0 auto;
}

.num-btn {
    padding: 20px;
    font-size: 1.5em;
    border-radius: 12px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 4px 0 #eee;
}

.num-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #eee;
}

#ok-btn {
    background: #2ed573;
    color: white;
    box-shadow: 0 4px 0 #26af5f;
}

#ai-cheer {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

#ai-cheer img {
    width: 60px;
    height: 60px;
}

.chat-bubble {
    background: #fff;
    border: 2px solid #ccc;
    padding: 10px 15px;
    border-radius: 20px;
    position: relative;
}

/* Result */
.result-stats {
    font-size: 2em;
    margin: 30px 0;
}

#level-up-msg {
    color: #ffa502;
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 20px;
}

.link-btn {
    display: inline-block;
    margin-top: 20px;
    color: #4a90e2;
    text-decoration: underline;
}