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

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}

.container {
    background: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
    width: 90%;
    max-width: 400px;
}

h1 { margin-bottom: 1rem; font-size: 2rem; }

.mode-selector, .starter-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.mode-selector { background: #f1f5f9; padding: 0.3rem; border-radius: 8px; }
.starter-selector { font-size: 0.95rem; color: #64748b; }

.mode-btn, .starter-btn {
    border: none;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.mode-btn { flex: 1; padding: 0.6rem; background: transparent; font-size: 0.95rem; color: #64748b; }
.mode-btn.active { background: #ffffff; color: #4f46e5; box-shadow: 0 2px 6px rgba(0,0,0,0.1); }

.starter-btn { padding: 0.4rem 0.8rem; border: 2px solid #e2e8f0; background: transparent; font-size: 0.9rem; color: #64748b; }
.starter-btn.active { border-color: #4f46e5; background: #eef2ff; color: #4f46e5; }

.status {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    height: 1.5rem;
    color: #555;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 0 auto 1.5rem;
    width: 300px;
    aspect-ratio: 1 / 1;
}

.cell {
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.cell:hover:not(.taken) { background: #e2e8f0; transform: scale(1.02); }
.cell.taken { cursor: default; }
.cell.x { color: #2563eb; }
.cell.o { color: #dc2626; }

#resetBtn {
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
#resetBtn:hover { background: #4338ca; }
#resetBtn:active { transform: scale(0.98); }