:root {
    --cyan: #00FFFF;
    --cyan-dark: #00CCCC;
    --violet: #EE82EE;
    --violet-dark: #CC66CC;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --border: #333333;
    --text: #222222;
    --shadow: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-light);
    color: var(--text);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow);
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 0.9em;
}

h2 {
    margin-bottom: 20px;
    color: var(--text);
}

h3 {
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #555;
}

.game-setup, .game-container {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 20px;
}

.setup-section {
    margin-bottom: 25px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 4px;
}

.setup-section label {
    display: block;
    margin-bottom: 10px;
}

.setup-section input[type="text"],
.setup-section input[type="number"],
.setup-section select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.setup-section input[type="radio"] {
    margin-right: 5px;
}

.setup-section input[type="file"] {
    margin: 10px 0;
    width: 100%;
}

.setup-section p {
    color: #666;
    font-size: 0.9em;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background: #4CAF50;
    color: white;
    font-size: 1.1em;
    padding: 12px 30px;
    width: 100%;
}

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

.btn-secondary {
    background: #2196F3;
    color: white;
}

.btn-secondary:hover {
    background: #0b7dda;
}

.setup-section button {
    background: #999;
    color: white;
    margin-top: 5px;
}

.setup-section button:hover {
    background: #777;
}

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

.status {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
}

.board-code {
    color: #666;
    font-family: monospace;
}

.board {
    display: inline-block;
    border: 2px solid var(--border);
    margin: 20px auto;
    background: var(--bg-white);
    box-shadow: 0 4px 8px var(--shadow);
}

.board-row {
    display: flex;
}

.board-header {
    display: flex;
    justify-content: center;
}

.col-label {
    width: 80px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
}

.cell {
    width: 80px;
    height: 80px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.cell:hover {
    background: #f0f0f0;
}

.cell.cyan {
    background: var(--cyan);
}

.cell.violet {
    background: var(--violet);
}

.cell.selectable {
    cursor: pointer;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.cell.selectable:hover {
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.3);
}

.cell.selected {
    background: #FFD700 !important;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

.game-controls {
    text-align: center;
    margin-top: 20px;
}

#moveSelection {
    margin-bottom: 20px;
}

#legalMoves {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.move-button {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.move-button:hover {
    background: #45a049;
}

.winner-message {
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    padding: 20px;
    margin-top: 20px;
    background: #FFD700;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--shadow);
}

.rules {
    background: var(--bg-white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow);
    margin-top: 20px;
}

.rules p {
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .cell {
        width: 60px;
        height: 60px;
        font-size: 2em;
    }

    .col-label {
        width: 60px;
        height: 30px;
    }
}
