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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f23;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding-top: 40px;
}

.container {
    width: 100%;
    max-width: 840px;
    padding: 0 20px;
}

header {
    text-align: center;
    margin-bottom: 32px;
}

h1 {
    font-size: 2rem;
    color: #fff;
}

.subtitle {
    color: #888;
    margin-top: 4px;
}

/* Player setup */
.player-setup {
    text-align: center;
    margin-bottom: 20px;
}

.player-setup input {
    padding: 10px 16px;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #333;
    background: #1a1a2e;
    color: #fff;
    width: 240px;
}

.player-setup input:focus {
    outline: none;
    border-color: #6366f1;
}

/* Buttons */
.actions {
    text-align: center;
    margin-bottom: 28px;
}

.btn {
    padding: 10px 24px;
    font-size: 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s;
    text-decoration: none;
    display: inline-block;
}

.btn.primary {
    background: #6366f1;
    color: #fff;
}

.btn.primary:hover {
    background: #5558e6;
}

.btn.secondary {
    background: #2a2a4a;
    color: #ccc;
}

.btn.secondary:hover {
    background: #3a3a5a;
}

/* Room list */
.room-list {
    margin-top: 8px;
}

.room-list h2 {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 12px;
}

.rooms {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.room-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #1a1a2e;
    border-radius: 8px;
    border: 1px solid #2a2a4a;
}

.room-card .room-name {
    font-weight: 600;
}

.room-card .room-meta {
    font-size: 0.85rem;
    color: #888;
}

.room-card .join-btn {
    padding: 6px 16px;
    font-size: 0.85rem;
}

.empty {
    color: #666;
    text-align: center;
    padding: 24px 0;
}

/* Error */
.error {
    background: #4a1a1a;
    color: #f88;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 16px;
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 600px) {
    h1 { font-size: 1.5rem; }
    .room-card { flex-direction: column; gap: 8px; }
}