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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.game-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 30px;
    max-width: 900px;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
}

.game-info {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: 8px;
    background: #f5f5f5;
}

.stone {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.stone.red {
    background: #e74c3c;
}

.stone.blue {
    background: #3498db;
}

.player-info.active {
    background: #ecf0f1;
    border: 2px solid #333;
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

button {
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: #3498db;
    color: white;
    transition: background 0.3s;
}

button:hover {
    background: #2980b9;
}

button.secondary {
    background: #95a5a6;
}

button.secondary:hover {
    background: #7f8c8d;
}

.board-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

svg {
    border: 2px solid #333;
    border-radius: 8px;
    background: #fffbf0;
}

.hex {
    cursor: pointer;
    transition: filter 0.2s;
}

.hex:hover {
    filter: brightness(0.95);
}

.hex.empty {
    fill: #fffbf0;
    stroke: #bbb;
    stroke-width: 1;
}

.hex.red {
    fill: #e74c3c;
    stroke: #c0392b;
    stroke-width: 2;
}

.hex.blue {
    fill: #3498db;
    stroke: #2980b9;
    stroke-width: 2;
}

.status-message {
    text-align: center;
    font-size: 16px;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.status-message.info {
    background: #ecf0f1;
    color: #333;
}

.status-message.winner {
    background: #d4edda;
    color: #155724;
    font-weight: bold;
    font-size: 18px;
}

.instructions {
    background: #f9f9f9;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.instructions h3 {
    margin-bottom: 10px;
    color: #333;
}

.board-size-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.board-size-selector label {
    margin: 0;
    font-weight: 500;
}

.board-size-selector select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}
