/* ============================================================================
   Shared auth overlay styling (bereanai-auth flow).
   Self-contained and themeable via the CSS custom properties below — restyle
   the whole login by changing these, not the rules. Tuned here to match the
   Eagle & Phoenix dark / gold table.
   ============================================================================ */

:root {
    --auth-accent:        #ffd700;   /* gold — primary buttons, focus rings   */
    --auth-accent-text:   #222;      /* text that sits on top of the accent   */
    --auth-bg-backdrop:   #181818;   /* full-screen backdrop behind the card  */
    --auth-bg-surface:    #2b2b2b;   /* the card                              */
    --auth-bg-field:      #1f1f1f;   /* inputs                                */
    --auth-text-primary:  #f5f5f5;
    --auth-text-muted:    #b5b5b5;
    --auth-border:        #444;
    --auth-error:         #ff6b6b;
}

#auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;                  /* above the whole game table + overlays */
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-bg-backdrop);
    font-family: sans-serif;
    padding: 16px;
}

/* The shared `.hidden { display: none }` is a class selector and loses to the
   `#auth-overlay` id rule above on specificity. This id+class rule matches it,
   so adding `hidden` actually hides the overlay (e.g. after sign-in). */
#auth-overlay.hidden {
    display: none;
}

.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--auth-bg-surface);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    text-align: center;
    color: var(--auth-text-primary);
}

.auth-logo {
    font-size: 44px;
    line-height: 1;
    margin-bottom: 12px;
}

.auth-card h1 {
    margin: 0 0 4px;
    font-size: 24px;
    color: var(--auth-accent);
}

.auth-subtitle {
    margin: 0 0 22px;
    color: var(--auth-text-muted);
    font-size: 14px;
}

.form-group {
    text-align: left;
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--auth-text-muted);
}

.form-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 16px;
    background: var(--auth-bg-field);
    color: var(--auth-text-primary);
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease;
}

.form-group input:focus {
    border-color: var(--auth-accent);
}

.btn-primary {
    width: 100%;
    padding: 13px;
    font-size: 16px;
    font-weight: 600;
    color: var(--auth-accent-text);
    background: var(--auth-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.btn-primary:hover:not(:disabled) {
    filter: brightness(1.08);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: default;
}

.btn-text {
    width: 100%;
    margin-top: 12px;
    padding: 6px;
    font-size: 13px;
    color: var(--auth-text-muted);
    background: none;
    border: none;
    cursor: pointer;
}

.btn-text:hover {
    color: var(--auth-accent);
}

.auth-hint {
    font-size: 13px;
    color: var(--auth-text-muted);
    margin: 10px 0;
}

.auth-hint a {
    color: var(--auth-accent);
    text-decoration: none;
}

.auth-qr {
    width: 200px;
    height: 200px;
    margin: 8px auto;
    display: block;
    background: #fff;
    border-radius: 8px;
    padding: 8px;
}

.auth-status {
    min-height: 18px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--auth-error);
}
