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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #121213;
    color: #d7dadc;
    min-height: 100vh;
}

header {
    text-align: center;
    padding: 16px;
    border-bottom: 1px solid #3a3a3c;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

nav {
    margin-bottom: 8px;
}

.nav-link {
    color: #818384;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 12px;
    padding-bottom: 4px;
}

.nav-link.active {
    color: #d7dadc;
    border-bottom: 2px solid #538d4e;
}

.nav-link:hover {
    color: #d7dadc;
}

main {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* Tiles */
.tile-row {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 6px;
}

.tile {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid #3a3a3c;
    border-radius: 2px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s;
}

span.tile {
    cursor: default;
}

.tile-x {
    background: #3a3a3c;
    color: #d7dadc;
}

.tile-y {
    background: #b59f3b;
    color: #fff;
    border-color: #b59f3b;
}

.tile-g {
    background: #538d4e;
    color: #fff;
    border-color: #538d4e;
}

/* Input */
.input-section {
    margin-bottom: 24px;
}

.guess-input-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
}

input[type="text"] {
    background: #1a1a1b;
    border: 2px solid #3a3a3c;
    color: #d7dadc;
    padding: 10px 14px;
    font-size: 1.1rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    width: 180px;
    text-align: center;
}

input[type="text"]::placeholder {
    text-transform: none;
    letter-spacing: normal;
    color: #565758;
}

input[type="text"]:focus {
    outline: none;
    border-color: #538d4e;
}

.form-group {
    margin-bottom: 12px;
    text-align: center;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: #818384;
    margin-bottom: 4px;
}

/* Buttons */
.btn {
    background: #3a3a3c;
    color: #d7dadc;
    border: none;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn:hover {
    background: #4a4a4c;
}

.btn-primary {
    background: #538d4e;
    color: #fff;
}

.btn-primary:hover {
    background: #6aaf65;
}

.btn-secondary {
    background: transparent;
    border: 1px solid #3a3a3c;
    color: #818384;
    font-size: 0.8rem;
    padding: 6px 14px;
    margin-top: 8px;
}

.btn-secondary:hover {
    border-color: #818384;
    color: #d7dadc;
}

.button-row {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

/* Board */
.board {
    margin-bottom: 20px;
}

/* Candidates */
.candidates-section {
    margin-top: 16px;
    text-align: center;
}

.candidate-count {
    font-size: 0.9rem;
    color: #818384;
    margin-bottom: 8px;
}

.candidate-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.candidate {
    background: #1a1a1b;
    border: 1px solid #3a3a3c;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

/* Game (simulate) */
.game-board {
    margin-bottom: 16px;
}

.game-row {
    margin-bottom: 2px;
}

.game-result {
    text-align: center;
    margin-top: 16px;
    font-size: 1.1rem;
    color: #538d4e;
}

/* Error */
.error {
    background: #85182a;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    margin-bottom: 12px;
    text-align: center;
    font-size: 0.9rem;
}

/* Layout */
.solve-container,
.simulate-container {
    text-align: center;
}
