/* --- 全体の設定 --- */
body {
    margin: 0;
    padding: 0;
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', sans-serif;
    /* ↓ グラデーションをやめて、画像を読み込むように変更しました ↓ */
    background-image: url('bg-sea.jpg'); /* ※保存した名前に合わせてください(.jpgの場合は変更) */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

/* --- 画面の切り替え --- */
.screen {
    text-align: center;
    width: 100%;
    max-width: 600px;
    padding: 20px;
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

/* --- タイトル画面 --- */
#start-screen h1 {
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.level-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.level-btn {
    background: linear-gradient(to bottom, #FFD700, #DAA520);
    /* 金色風 */
    border: 2px solid #B8860B;
    border-radius: 15px;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s, box-shadow 0.1s;
    width: 80%;
}

.level-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* --- ゲーム画面 --- */
#top-bar {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

#japanese-meaning {
    font-size: 2rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px black;
}

/* --- 解答スロット --- */
.slots-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    min-height: 60px;
    /* スロットが空でも高さを確保 */
}

.slot {
    width: 50px;
    height: 50px;
    border: 2px dashed #00BFFF;
    /* 鍵穴・スロットのイメージ */
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: #FFD700;
    /* 入った文字は金色 */
    text-transform: lowercase;
}

.slot.filled {
    border-style: solid;
    background: rgba(255, 255, 255, 0.3);
}

/* --- コントロールボタン --- */
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.action-btn {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.action-btn:active {
    transform: translateY(2px);
    box-shadow: none;
}

#skip-btn {
    background-color: #4ecdc4;
}

/* --- 文字メダル --- */
.medals-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.medal {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    /* 丸いメダル型 */
    background: radial-gradient(circle, #FFD700, #B8860B);
    /* 金貨風グラデーション */
    border: 2px solid #8B6508;
    color: #4A3C00;
    /* 暗い金色で文字を目立たせる */
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.6);
    user-select: none;
    /* テキスト選択を防ぐ */
    transition: transform 0.1s;
    text-transform: lowercase;
}

.medal:active {
    transform: scale(0.9);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.medal.used {
    visibility: hidden;
    /* 使われたメダルは隠す（レイアウトを崩さないため） */
}

/* --- 結果画面 --- */
#result-screen h2 {
    font-size: 3rem;
    color: #FFD700;
}

#restart-btn {
    margin-top: 20px;
    padding: 15px 30px;
    font-size: 1.2rem;
    background-color: #00BFFF;
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
}