/* 全体のリセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace; /* ピクセルアート風フォント */
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #2d3436;
}

/* ゲームのメインコンテナ - ピクセルアート風 */
.game-container {
    text-align: center;
    background: white;
    border-radius: 0; /* 角を四角く */
    border: 4px solid #2d3436; /* ドット絵風のボーダー */
    padding: 30px;
    box-shadow: 8px 8px 0px #636e72; /* ドット絵風の影 */
    max-width: 900px;
    width: 100%;
}

/* ゲームタイトルスタイル */
.game-title {
    font-family: 'Courier New', monospace;
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    margin: 20px 0 5px 0;
    color: #2d3436;
    text-shadow: 2px 2px 0px #ddd6fe;
}

.game-subtitle {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    text-align: center;
    margin: 0 0 20px 0;
    color: #636e72;
    font-style: italic;
}

/* 汎用タイトルスタイル */
h1, h2 {
    color: #2d3436;
    margin-bottom: 10px;
}

/* スコア表示スタイル - ピクセルアート風 */
.score-display {
    background: #55a3ff;
    color: white;
    padding: 10px 20px;
    border-radius: 0; /* 角を四角く */
    border: 2px solid #2d3436;
    display: inline-block;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 4px 4px 0px #0984e3; /* ドット絵風の影 */
}



/* ゲーム画面（Canvas）のスタイル - ピクセルアート風 */
#gameCanvas {
    border: 4px solid #2d3436;
    border-radius: 0; /* 角を四角く */
    background: #ddd6fe;
    display: block;
    margin: 0 auto 20px auto;
    box-shadow: 4px 4px 0px #636e72; /* ドット絵風の影 */
    image-rendering: pixelated; /* ピクセル補間を無効化 */
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* 操作説明のスタイル */
.controls {
    margin-bottom: 20px;
}

.controls p {
    font-size: 1.1em;
    color: #636e72;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 0; /* ピクセルアート風 */
    border: 2px solid #2d3436;
    display: inline-block;
    margin: 5px;
    box-shadow: 2px 2px 0px #636e72; /* ドット絵風の影 */
}

.debug-info {
    font-size: 0.9em !important;
    background: #ffeaa7 !important;
    color: #2d3436 !important;
}

/* ゲームオーバー画面のスタイル */
.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(45, 52, 54, 0.95);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.game-over h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-over p {
    font-size: 1.3em;
    margin-bottom: 30px;
}

/* リスタートボタンのスタイル */
#restartButton {
    background: linear-gradient(45deg, #00b894, #00cec9);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

#restartButton:hover {
    background: linear-gradient(45deg, #00a085, #00b7b3);
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
}

#restartButton:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* 非表示クラス */
.hidden {
    display: none !important;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .game-container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    #gameCanvas {
        max-width: 100%;
        height: auto;
    }
    
    .game-over {
        padding: 30px 20px;
        margin: 10px;
        width: calc(100% - 20px);
    }
}
