:root {
    --cell-bg-color: #e4e6eb;
    --cell-text-color: #333;
    --hit-bg-color: #ff6b6b;
    --hit-text-color: white;
}
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: transparent;
    color: #333;
    margin: 0;
    padding: 20px;
}
h1 {
    margin-bottom: 20px;
    font-family: "Arial Rounded MT Bold", "Comic Sans MS", sans-serif;
    font-size: 3rem;
    color: #ff4757;
    text-shadow: 3px 3px 0 #ffffff, 6px 6px 0 rgba(0,0,0,0.1);
    letter-spacing: 1px;
}
#bingo-board {
    display: grid;
    gap: 10px;
    background-color: #fff;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}
.bingo-cell {
    aspect-ratio: 1; /* 正方形を維持 */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--cell-bg-color);
    color: var(--cell-text-color);
    font-family: "Arial Rounded MT Bold", "Comic Sans MS", sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
    box-sizing: border-box;
    border: 3px solid transparent; /* リーチ時の枠線領域を確保 */
    text-shadow: 2px 2px 2px rgba(0,0,0,0.2);
}
.bingo-cell:hover {
    background-color: #d0d3d9;
}
/* 当たり（ヒット）した時のスタイル */
.bingo-cell.hit {
    background-color: var(--hit-bg-color);
    color: var(--hit-text-color);
}
/* リーチ時のスタイル */
@keyframes blink {
    0% { box-shadow: 0 0 5px #ffd700; border-color: #ffd700; }
    50% { box-shadow: 0 0 20px #ffd700; border-color: #ffeb3b; }
    100% { box-shadow: 0 0 5px #ffd700; border-color: #ffd700; }
}
.bingo-cell.reach {
    animation: blink 1.5s infinite ease-in-out;
    border-color: #ffd700;
    z-index: 10;
}
/* ビンゴ成立時のメッセージ */
#bingo-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 6rem;
    font-weight: 900;
    color: #ff4757;
    text-shadow: 3px 3px 0 #fff, -3px -3px 0 #fff, 3px -3px 0 #fff, -3px 3px 0 #fff, 0 5px 15px rgba(0,0,0,0.3);
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}
#bingo-message.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
/* 履歴エリアのスタイル */
#history-container {
    margin-top: 30px;
    width: 100%;
    max-width: 400px;
}
#score-history {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.history-item {
    background-color: #fff;
    padding: 5px 10px;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-weight: bold;
    color: #555;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.history-item:hover {
    background-color: #ffcccc;
    color: #d63031;
    text-decoration: line-through;
}