body {
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    font-family: "Hiragino Maru Gothic ProN", "YuGothic", "Yu Gothic", "メイリオ", sans-serif;
    background-size: cover;
    background-position: center;
    color: #2c3e50;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header.hidden {
    display: none;
}

.problem {
    font-size: 24px;
    text-align: center;
    font-weight: bold;
    min-height: 40px;
}

.answer {
    font-size: 28px;
    text-align: center;
    min-height: 30px;
    max-height: 30px;
    overflow: hidden;
    line-height: 30px;
}

.answer.empty {
    font-size: 20px;
    color: #999;
    font-style: italic;
}

.level {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.timer {
    font-size: 20px;
    color: #34495e;
    font-style: italic;
}

/* MathJax関連 */
.MathJax_Display {
    text-align: center !important;
    margin: 0 !important;
    font-family: inherit !important;
    font-size: inherit !important;
}

.MathJax {
    font-family: inherit !important;
    font-size: inherit !important;
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 0 10px;
    }

    .problem {
        font-size: 20px;
    }
}
