/* 基本スタイル */
body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

/* ヘッダー */
header h1 {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* ナビゲーション */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

nav li {
    margin: 0;
}

nav a {
    color: #87ceeb; /* 水色に変更 */
    text-decoration: none;
    font-size: 1.5rem;
    padding: 0.8rem 1.5rem;
    border: 1px solid #87ceeb; /* 水色に変更 */
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 300px; /* ボタンの幅を統一 */
}

nav a i {
    margin-right: 0.8rem; /* ア��コンとテキストの間の余白 */
}

nav a:hover,
nav a:focus {
    background-color: #87ceeb; /* 水色に変更 */
    color: #121212;
    box-shadow: 0 0 15px rgba(135, 206, 235, 0.5); /* 水色の影に変更 */
}

/* フッター */
footer {
    margin-top: 3rem;
    padding: 1rem;
    font-size: 0.9rem;
    color: #888;
}

/* スマートフォン向けレスポンシブ対応 */
@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem; /* 余白を削減 */
    }

    nav ul {
        gap: 0.8rem; /* ボタン間の余白を削減 */
        width: 100%; /* 横幅を画面いっぱいまで広げる */
        box-sizing: border-box;
        padding: 0 5px; /* 左右に少し余白を確保 */
    }

    nav a {
        font-size: 1.0rem; /* フォントサイズをさらに小さく */
        padding: 0.6rem 0.5rem; /* ボタン内の横の余白を削減 */
        width: 100%; /* 親要素いっぱいに広げる */
        box-sizing: border-box;
    }

    nav a i {
        margin-right: 0.6rem; /* アイコンの余白を調整 */
    }

    footer {
        margin-top: 1.5rem; /* フッターの余白を削減 */
    }
}


/* さんすうタイムアタック専用スタイル */
.math-quiz-body {
    justify-content: flex-start; /* 上寄せに変更 */
    padding-top: 2rem;
}

.math-quiz-container {
    background-color: #1e1e1e;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 500px;
    margin-top: 2rem;
}

.math-quiz-header h1 {
    color: #87ceeb;
    margin-bottom: 1.5rem;
}

#math-quiz-question {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

#math-quiz-input {
    width: 80%;
    padding: 0.8rem;
    font-size: 1.5rem;
    text-align: center;
    background-color: #2a2a2a;
    border: 1px solid #87ceeb;
    color: #e0e0e0;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

#math-quiz-feedback {
    font-size: 1.2rem;
    height: 2rem;
    line-height: 2rem;
    color: #e0e0e0;
}

#math-quiz-timer, #math-quiz-score {
    font-size: 1.2rem;
    color: #87ceeb;
    margin-bottom: 1rem;
}

#math-quiz-start-button {
    background-color: #87ceeb;
    color: #121212;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
}

#math-quiz-start-button:hover {
    background-color: #a0d8ef;
    box-shadow: 0 0 15px rgba(135, 206, 235, 0.5);
}

#math-quiz-results {
    display: none;
    margin-top: 2rem;
}

#math-quiz-final-score {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

#math-quiz-restart-button {
    background-color: #87ceeb;
    color: #121212;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
}

#math-quiz-restart-button:hover {
    background-color: #a0d8ef;
    box-shadow: 0 0 15px rgba(135, 206, 235, 0.5);
}

.math-quiz-footer {
    margin-top: 2rem; /* 上の要素との間隔を調整 */
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}
