:root {
    --bg: #0f1419;
    --surface: #1a2332;
    --border: #2d3a4f;
    --text: #e7ecf3;
    --muted: #8b9cb3;
    --primary: #3dd68c;
    --poetry: #8c221c;
    --poetry-light: #ecd9bc;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: radial-gradient(ellipse at top, #1a2838 0%, var(--bg) 55%);
    color: var(--text);
    min-height: 100vh;
}

.hub {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

.hub-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.hub-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hub-subtitle {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.hub-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hidden { display: none !important; }

.hub-games {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.game-card {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.game-card-poetry:hover { border-color: #c45a52; }
.game-card-skate:hover { border-color: #0c9d9a; }
.game-card-bubble:hover { border-color: #7dffa2; }

.game-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

.game-card h2 { font-size: 1.35rem; margin-bottom: 0.5rem; }

.game-card p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 1rem;
}

.game-cta {
    font-weight: 600;
    font-size: 0.9rem;
}

.game-card-poetry .game-cta { color: #e8a090; }
.game-card-skate .game-cta { color: #5eead4; }
.game-card-bubble .game-cta { color: #a5f3b0; }

.btn {
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: #0a0e14;
    font-weight: 600;
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.modal {
    border: none;
    border-radius: 12px;
    padding: 0;
    background: var(--surface);
    color: var(--text);
    max-width: 400px;
    width: calc(100% - 2rem);
    margin: 0;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

.modal:not([open]) {
    display: none;
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
    position: fixed;
    inset: 0;
}

.modal form { padding: 1.5rem; }
.modal h2 { margin-bottom: 1rem; }
.modal label {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--muted);
}
.modal input {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}
.error { color: #f07178; font-size: 0.85rem; min-height: 1.2em; }
