* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.game-container {
    text-align: center;
    padding: 20px;
    max-width: 900px;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(to right, #ffd700, #ffed4e, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.game-info {
    margin-bottom: 20px;
}

.score-board {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.player-score, .enemy-score {
    font-size: 1.2em;
    font-weight: bold;
}

.player-score {
    color: #3b82f6;
}

.enemy-score {
    color: #ef4444;
}

.turn-indicator {
    font-size: 1.1em;
    font-weight: bold;
    color: #fbbf24;
}

.hex-board {
    display: inline-block;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 30px;
    margin: 20px auto;
    position: relative;
}

/* ヘックス（六角形）のスタイル - モック */
.hex {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin: 2px;
    display: inline-block;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hex:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.hex.selected {
    background: rgba(251, 191, 36, 0.4);
    border-color: #fbbf24;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
}

.hex.valid-move {
    background: rgba(34, 197, 94, 0.3);
    border-color: #22c55e;
}

/* ユニットのスタイル */
.unit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 0.8em;
}

.unit.player {
    background: radial-gradient(circle, #60a5fa, #3b82f6);
    border: 2px solid #1e40af;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.7);
}

.unit.enemy {
    background: radial-gradient(circle, #f87171, #ef4444);
    border: 2px solid #991b1b;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.7);
}

/* クリスタルのスタイル */
.crystal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25px;
    height: 25px;
    background: linear-gradient(135deg, #a78bfa, #8b5cf6, #7c3aed);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    animation: crystal-glow 2s ease-in-out infinite;
}

@keyframes crystal-glow {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 5px #8b5cf6);
    }
    50% {
        filter: brightness(1.5) drop-shadow(0 0 15px #a78bfa);
    }
}

/* コントロールボタン */
.controls {
    margin-top: 20px;
}

button {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1em;
    border-radius: 8px;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

button:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

button:active {
    transform: translateY(0);
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background: linear-gradient(135deg, #1e293b, #334155);
    margin: 5% auto;
    padding: 30px;
    border: 2px solid #8b5cf6;
    border-radius: 15px;
    width: 80%;
    max-width: 600px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: #fff;
}

.rules-text {
    text-align: left;
    margin-top: 20px;
}

.rules-text h3 {
    color: #fbbf24;
    margin-top: 15px;
    margin-bottom: 10px;
}

.rules-text ul {
    margin-left: 20px;
    line-height: 1.8;
}

.rules-text li {
    margin-bottom: 8px;
}

#gameOverModal .modal-content {
    text-align: center;
}

#gameOverText {
    font-size: 2em;
    margin-bottom: 15px;
    color: #fbbf24;
}

#gameOverMessage {
    font-size: 1.2em;
    margin-bottom: 25px;
}
