:root {
    --bg-color: #09090b;
    --card-bg: #18181b;
    --primary: #2563eb;
    --secondary: #db2777;
    --accent: #10b981;
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    --border: #27272a;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    text-align: center;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(37, 99, 235, 0.5);
}

.status-bar {
    margin-bottom: 20px;
    padding: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.panel {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.hidden {
    display: none !important;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    margin: 5px 0;
}

.btn:active {
    transform: scale(0.98);
}

.primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

.secondary {
    background: var(--card-bg);
    /* Use card background for join button */
    color: white;
    /* Ensure text is visible */
    border: 1px solid var(--border);
    /* Add a border to distinguish it */
}

/* Add hover effect for secondary button too */
.secondary:hover {
    background: #27272a;
    /* Slightly lighter on hover */
}

.danger {
    background: #ef4444;
    color: white;
    margin-top: 20px;
}

input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    /* This ensures padding is included in width */
    padding: 12px;
    margin: 10px 0;
    background: #27272a;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: white;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

input[type="text"]:focus {
    outline: 2px solid var(--primary);
}

.divider {
    color: var(--text-muted);
    margin: 15px 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Game Interface */
.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    background: #27272a;
    padding: 10px;
    border-radius: 8px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item .label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.info-item .value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: white;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 10px;
    aspect-ratio: 1;
    margin: 0 auto;
    max-width: 350px;
}

.cell {
    background: #27272a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.cell:hover {
    background: #3f3f46;
}

.game-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.cell.x {
    color: var(--secondary);
    /* Pink for X */
    text-shadow: 0 0 10px rgba(219, 39, 119, 0.6);
}

.cell.o {
    color: var(--accent);
    /* Green for O */
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}