/* メインスタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    /* display: flex と justify-content, align-items を削除 */
}

.game-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    text-align: center;
    min-height: 600px;
    /* フッターを下に配置するための調整 */
    margin: 0 auto 20px auto;
}

.site-footer {
    /* background: #333; を削除するか、以下に変更 */
    background: transparent; /* 透明 */
    color: #333; /* 文字色も濃い色に変更 */
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}


h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2.2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    color: #666;
    margin-bottom: 20px;
    font-size: 1.1em;
}

/* 画面表示制御 */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* メニューボタン */
.menu-buttons {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.menu-btn {
    padding: 15px 25px;
    border: none;
    border-radius: 15px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #4CAF50, #66BB6A);
    color: white;
}

.menu-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.menu-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.category-btn {
    background: linear-gradient(45deg, #2196F3, #42A5F5);
}

.random-btn {
    background: linear-gradient(45deg, #FF9800, #FFB74D);
}

.battle-btn {
    background: linear-gradient(45deg, #F44336, #FF7043);
}

.stats-btn {
    background: linear-gradient(45deg, #9C27B0, #BA68C8);
}

/* 統計表示 */
.stats-display {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: grid;
    gap: 8px;
}

.stats-display div {
    font-size: 1em;
    color: #555;
}

/* 基本ボタン */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-clear {
    background: #ff7043;
    color: white;
}

.btn-clear:hover {
    background: #ff5722;
}

.btn-next {
    background: #66bb6a;
    color: white;
}

.btn-next:hover {
    background: #4caf50;
}

.btn-home {
    background: #9c27b0;
    color: white;
}

.btn-home:hover {
    background: #7b1fa2;
}

/* コントロール */
.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* フィードバック */
.feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback.correct {
    background: #c8e6c9;
    color: #2e7d32;
}

.feedback.incorrect {
    background: #ffcdd2;
    color: #c62828;
}

/* プログレスバー */
.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #66bb6a);
    transition: width 0.5s ease;
}

/* カテゴリタイトル */
.category-title {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 15px;
    font-weight: bold;
}

/* アニメーション */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.bounce {
    animation: bounce 0.6s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.5s ease;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    .game-container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .menu-btn {
        padding: 12px 20px;
        font-size: 1em;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 80%;
        max-width: 200px;
    }
}