:root {
    --bg: #f6f8fa;
    --card: #ffffff;
    --border: #e5e7eb;
    --primary: #2563eb;
    --text: #111827;
    --muted: #6b7280;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    padding: 40px 16px;
}

.container {
    width: 100%;
    max-width: 720px;
}

h1 {
    margin: 0 0 10px;
    font-size: 28px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

#invite {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

#invite input {
    flex: 1;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 500;
}

button.secondary {
    background: #e5e7eb;
    color: #111827;
}

button:hover {
    opacity: 0.9;
}

#players {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

.player-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 20px;
}

.player-row:last-child {
    border-bottom: none;
}

.player-name {
    font-weight: 500;
}

.player-vote {
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 6px;
}

.player-header {

    display: grid;
    grid-template-columns: 1fr auto;

    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: .05em;

    color: var(--muted);

    padding: 0 12px 6px 12px;

}

#stats {
    display: flex;
    justify-content: space-around;
    font-size: 20px;
    color: var(--text);
    font-weight: bold;
}

#cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

#cards button {
    font-weight: bold;
    color: var(--text);
    appearance: none;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;

    transition:
        background .15s,
        border-color .15s,
        transform .05s,
        box-shadow .15s;

    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);

}

#cards button:hover {
    border-color: var(--primary);
    background: #f9fafb;
}

#cards button:active {
    transform: scale(0.96);
}

#cards button.selected {

    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);

}

@media (max-width:600px) {

    #cards {
        justify-content: center;
    }

    #cards button {
        flex: 1 1 60px;
        text-align: center;
    }

}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

input {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    width: 100%;
    margin-bottom: 10px;
}

.login-card {
    max-width: 360px;
    margin: auto;
}