
@font-face {
    font-family: c64;
    src: url("/font/C64.ttf");
}

/* Dark theme base (match game page background) */
body.dark {
    background: #1a1a2e;
    color: #eee;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

h1, .center {
    text-align: center;
}

#bottom {
    bottom: 0;
    left: 0;
    position: fixed;
    right: 0;
    text-align: center;
    font-size: xx-small;
}

code, pre {
    font-family: c64, monospace;
    font-size: 11px;
    background: beige;
}

.red {
    color: #c9211e;
    font-family: c64, monospace;
}

.green {
    color: #158466;
    font-family: c64, monospace;
}

.blue {
    color: #3465a4;
    font-family: c64, monospace;
}

.hoverspan {
    vertical-align: super;
    font-size: smaller;
    color: blue;
    position: relative;
}

.hoverspan > .tooltip {
    display: none;
}

.hoverspan:hover > .tooltip {
    vertical-align: initial;
    font-size: initial;
    color: initial;
    display: inline;
    position: absolute;
    padding: 24px;
    top: -50px;
    left: 40px;
    border: 2px solid black;
    background: white;
}

/* Web UI additions */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.lobby-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: #16213e;
    color: #eee;
    border-radius: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #2d3a4a;
    border-radius: 6px;
    font-size: 16px;
    background: #0d1117;
    color: #fff;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #42a5f5;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 14px;
}

.checkbox-group {
    margin-top: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: default;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: default;
}

.checkbox-label input[type="checkbox"]:disabled {
    opacity: 0.7;
}

.checkbox-label span {
    color: #aaa;
    font-size: 14px;
}

/* Radio button group */
.radio-group {
    margin-top: 15px;
    margin-bottom: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
    padding: 8px 0;
}

.radio-label input[type="radio"] {
    width: auto;
    margin: 0;
    cursor: pointer;
    accent-color: #42a5f5;
}

.radio-label span {
    color: #ccc;
    font-size: 14px;
}

.radio-label:hover span {
    color: #fff;
}

/* Waiting games section */
.waiting-games-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #2d3a4a;
}

.waiting-games-section h3 {
    color: #888;
    font-size: 14px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.waiting-games-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.waiting-game-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #0d1117;
    border: 1px solid #2d3a4a;
    border-radius: 8px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s;
}

.waiting-game-btn:hover {
    background: #1a2332;
    border-color: #42a5f5;
    color: #fff;
}

.waiting-game-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.waiting-game-name {
    font-weight: bold;
    color: #fff;
}

.waiting-game-slots {
    font-size: 12px;
    color: #888;
}

.waiting-game-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.waiting-game-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
}

.waiting-game-badge.robots-only {
    background: #5c3d2e;
    color: #ffa726;
}

.waiting-game-request-id {
    font-size: 11px;
    color: #666;
    font-family: monospace;
    cursor: pointer;
    padding: 2px 0;
}

.waiting-game-request-id:hover {
    color: #42a5f5;
}

.btn-primary {
    background: #1976d2;
    color: white !important;
    padding: 12px 32px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    display: inline-block;
    width: auto;
    text-decoration: none !important;
}

.btn-primary:hover {
    background: #1565c0;
    text-decoration: none !important;
}

.btn-primary:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Game start buttons */
.game-mode-section {
    margin-bottom: 20px;
}

.game-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-game {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    flex: 1 1 0;
    min-width: 0;
    font-size: 16px;
    font-weight: bold;
}

.game-descriptions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 8px;
}

.game-desc {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

.status-message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
}

.status-message:not(:empty) {
    background: #e3f2fd;
}

.info {
    margin-top: 40px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.info h3 {
    margin-top: 0;
}

.info ul {
    line-height: 1.8;
}

/* Pawn selection and move highlighting */
.pawn.selected {
    box-shadow: 0 0 0 3px #ffeb3b;
    transform: scale(1.1);
    z-index: 100;
}

.cell.target {
    cursor: pointer;
}

.cell.target::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    pointer-events: none;
    box-sizing: border-box;
}

.cell.target-RED::after {
    background: rgba(201, 33, 30, 0.4);
    border: 2px solid #c9211e;
}

.cell.target-GREEN::after {
    background: rgba(21, 132, 102, 0.4);
    border: 2px solid #158466;
}

.cell.target-BLUE::after {
    background: rgba(52, 101, 164, 0.4);
    border: 2px solid #3465a4;
}

.cell.target:hover::after {
    width: 80%;
    height: 80%;
}
