/* チャレンジ回数の小さい数字 */
.attempt-number {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 1em;
    text-align: center;
    font-size: 0.8em;
    color: #888;
    background: transparent;
    z-index: 2;
    pointer-events: none;
    background-color: greenyellow;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    height: 100vh;
    
    /* テキスト選択を防ぐ */
    -webkit-user-select: none;
    user-select: none;
}

/* オプション選択 */
#option {
    min-width: 200px;
    text-align: right;
    line-height: 3em;
    padding: 15px;
    font-size: 1em;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: white;
    cursor: pointer;
}
#option select {
    width: 150px;
    margin-left: 10px;
    padding: 5px;
    font-size: 1em;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: white;
}
/* 難易度：ノーマル */
.normal {
    color: blue;
    font-weight: bold;
}
/* 難易度：ハード */
.hard {
    color: red;
    font-weight: bold;
}

/* タイマー表示 */
#time {
    font-size: 1.2em;
    font-weight: bold;
}

.result-area {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    font-size: 1.2em;
    font-weight: bold;
}

/* 履歴エリア */
.history-area {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 50vh;
    overflow-y: auto;
}
.history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
    position: relative;
}
.history-row.current {
    font-size: 1.2em;
    font-weight: bold;
    background-color: #ffff00;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.history-colors {
    display: flex;
    gap: 10px;
}
.history-colors .input-slot {
    width: 30px;
    height: 30px;
}
.history-result {
    text-align: right;
    gap: 15px;
}
.history-result .hit.hightlight {
    color: red;
    font-weight: bold;
}
.history-result .blow.hightlight {
    color: blue;
    font-weight: bold;
}


/* 入力エリア */
.input-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    background-color: white;
}

/* メニュー画面：入力エリア */
#menu-container .input-area {
    justify-content: center;
    width: 80%;
    height: 50vh;
    background-color: #f0f0f0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
#menu-container .input-area h1 {
    margin: 0;
    text-align: center;
    color: #333;
}

/* ゲーム画面 */
#game-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 20px 20px 100px 20px; /* 下部にinput-area分の余白を追加 */
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#game-container .input-area {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px;
}
#game-container .input-area .input-slot {
    position: relative;
}
#game-container .input-area .input-slot::before {
    content: '+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    font-size: 24px;
    pointer-events: none;
}
#game-container .input-area .input-slot[style*="background-color"]::before {
    display: none;
}

.input-slot {
    width: 50px;
    height: 50px;
    border: 2px solid #ccc;
    border-radius: 50%;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.input-slot:hover {
    border-color: #999;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.input-slots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.color-palette {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.color-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
    touch-action: manipulation;
}

.color-btn:hover {
    transform: scale(1.1);
}

.submit-btn {
    display: block;
    padding: 10px 30px;
    font-size: 1.1em;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    touch-action: manipulation;
}

.submit-btn:hover {
    background-color: #45a049;
}
