.account-dialog { width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 28px; border: 1px solid #4a4a4a; border-radius: 8px; background: #181818; color: #f4f5fa; overflow-y: auto; }
.account-dialog::backdrop { background: #000000c8; }
.account-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.account-heading h2 { margin: 0 0 18px; }
.account-dialog label { display: block; margin: 18px 0 8px; }
.account-dialog input { display: block; width: 100%; min-height: 44px; padding: 12px; background: #101010; color: #fff; border: 1px solid #4a4a4a; border-radius: 3px; font: inherit; box-sizing: border-box; }
.account-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.account-dialog button { cursor: pointer; }
#account-status { color: #ffd98b; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
#account-collection { max-height: 200px; overflow-y: auto; padding-left: 22px; line-height: 1.9; }
.site-shell .footer-left { min-width: 0; gap: 8px; }
.site-shell .footer-ver { font-size: 10px; }


@media (max-width: 580px) {                .site-shell .site-footer { justify-content: center; } .site-shell .footer-right { display: none; } .account-dialog { padding: 20px; } }
@media (max-height: 520px) {  .site-shell .site-footer { padding-block: 0; } }


/* Full-Screen Split Sign In & Sign Up Page (21st.dev Modern Split Auth Layout) */


.account-dialog.auth-split-page {
    width:100vw; max-width:100vw; height:100dvh; max-height:100dvh;
    margin:0; padding:0; border:0; border-radius:0;
    background:linear-gradient(135deg,#121212 0%,#1c1c1c 50%,#161616 100%);
    color:#111827; overflow:hidden;
}
.account-dialog.auth-split-page::backdrop { background:rgba(0,0,0,.85); }
.auth-split-layout { display:flex; width:100%; height:100%; }

/* Left Panel - Full-Bleed Image Section */
.auth-split-left {
    flex:1 1 50%; position:relative; overflow:hidden;
    background:linear-gradient(135deg,#121212 0%,#1c1c1c 50%,#161616 100%);
}
.auth-back-wrap { position:absolute; top:24px; left:24px; z-index:10; }
.auth-back-btn {
    width:40px; height:40px; border-radius:9999px; border:1px solid rgba(255,255,255,.16);
    background:rgba(0,0,0,.25); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
    display:flex; align-items:center; justify-content:center; color:#ffffff;
    cursor:pointer; transition:background .2s,transform .2s;
}
.auth-back-btn:hover { background:rgba(0,0,0,.42); transform:scale(1.05); }
.auth-back-btn svg { width:20px; height:20px; }
.auth-split-art { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:20% center; }
.auth-split-left::after {
    content:''; position:absolute; inset:0;
    background:linear-gradient(180deg,rgba(0,0,0,.25) 0%,transparent 35%,rgba(14,14,14,.85) 100%);
    pointer-events:none;
}
.auth-split-brand { position:absolute; left:36px; bottom:32px; z-index:5; pointer-events:none; }
.auth-split-brand img { display:block; height:120px; width:auto; object-fit:contain; filter:drop-shadow(0 10px 28px rgba(0,0,0,.85)); }

/* Right Panel - Clean White Form Section */
.auth-split-right {
    flex:1 1 50%; display:flex; align-items:center; justify-content:center;
    background:#ffffff; color:#111827; overflow-y:auto; padding:24px;
}
.auth-form-box { width:100%; max-width:448px; padding:32px; box-sizing:border-box; margin:auto; }
.auth-mobile-back { display:none; margin-bottom:20px; }
.auth-mobile-back-btn {
    display:inline-flex; align-items:center; gap:8px; padding:8px 14px;
    border:1px solid #e5e7eb; border-radius:9999px; background:#f9fafb; color:#374151;
    font:600 13px/1 'Be Vietnam Pro','Barlow',sans-serif; cursor:pointer;
}
.auth-mobile-back-btn svg { width:16px; height:16px; }

.auth-header-block { margin-bottom:28px; }
.auth-main-title {
    margin:0 0 8px; color:#111827;
    font:700 30px/1.2 'Be Vietnam Pro','Barlow',sans-serif; letter-spacing:-.02em;
}
.auth-subtitle { margin:0; color:#4b5563; font:400 15px/1.5 'Be Vietnam Pro','Barlow',sans-serif; }
.auth-subtitle[hidden] { display:none !important; }
.auth-switch-link {
    border:0; background:transparent; padding:0; margin-left:4px;
    color:#2563eb; font:600 15px/1.5 'Be Vietnam Pro','Barlow',sans-serif; cursor:pointer;
}
.auth-switch-link:hover { color:#1d4ed8; text-decoration:underline; }

.auth-gate-alert {
    display:flex; align-items:center; gap:10px; padding:12px 14px; margin-bottom:16px;
    border:1px solid #fde68a; border-radius:12px; background:#fffbeb;
    color:#92400e; font:500 13px/1.45 'Be Vietnam Pro','Barlow',sans-serif;
}
.auth-gate-alert[hidden] { display:none !important; }
.auth-gate-alert svg { width:18px; height:18px; color:#d97706; flex-shrink:0; }

#account-status.auth-status-banner {
    margin:0 0 18px; padding:11px 14px; border-radius:12px;
    border:1px solid #e5e7eb; background:#f9fafb; color:#4b5563;
    font:500 13px/1.45 'Be Vietnam Pro','Barlow',sans-serif;
}
#account-status.auth-status-banner[data-tone="error"] { border-color:#fecaca; background:#fef2f2; color:#dc2626; }
#account-status.auth-status-banner[data-tone="success"] { border-color:#a7f3d0; background:#ecfdf5; color:#059669; }
#account-status.auth-status-banner[data-tone="warn"] { border-color:#fde68a; background:#fffbeb; color:#b45309; }

.auth-form-stack { display:block; }
.auth-form-stack[hidden] { display:none !important; }
.auth-field-group { margin:0 0 20px; }
.auth-field-group[hidden] { display:none !important; }
.account-dialog .auth-label {
    display:block; margin:0 0 8px; color:#374151;
    font:500 14px/1.4 'Be Vietnam Pro','Barlow',sans-serif;
    letter-spacing:0; text-transform:none;
}
.account-dialog .auth-input {
    display:block; width:100%; min-height:48px; margin:0; padding:12px 16px;
    border:1px solid #d1d5db; border-radius:12px; background:#ffffff; color:#111827;
    font:400 15px/1.4 'Be Vietnam Pro','Barlow',sans-serif; box-sizing:border-box;
    outline:none; transition:border-color .15s,box-shadow .15s;
}
.account-dialog .auth-input::placeholder { color:#9ca3af; }
.account-dialog .auth-input:focus { border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,.22); outline:none; }
.auth-password-wrap { position:relative; }
.account-dialog .auth-input-pass { padding-right:48px; }
.auth-eye-toggle {
    position:absolute; right:12px; top:50%; transform:translateY(-50%);
    width:34px; height:34px; padding:4px; border:0; border-radius:9999px;
    background:transparent; color:#6b7280; display:flex; align-items:center; justify-content:center;
    cursor:pointer; transition:background .15s,color .15s;
}
.auth-eye-toggle:hover { background:#f3f4f6; color:#111827; }
.auth-eye-toggle svg { width:20px; height:20px; }
.auth-eye-toggle svg[hidden] { display:none !important; }

.auth-signup-rules {
    list-style:none; margin:0 0 18px; padding:12px 14px;
    border:1px solid #e5e7eb; border-radius:12px; background:#f9fafb;
    display:grid; grid-template-columns:1fr 1fr; gap:8px 12px;
}
.auth-signup-rules[hidden] { display:none !important; }
.auth-signup-rules li { display:flex; align-items:center; gap:8px; color:#6b7280; font:500 12px/1.35 'Be Vietnam Pro','Barlow',sans-serif; }
.auth-signup-rules .rule-dot { width:8px; height:8px; border-radius:50%; background:#d1d5db; flex-shrink:0; transition:background .15s,box-shadow .15s; }
.auth-signup-rules li.is-valid { color:#059669; }
.auth-signup-rules li.is-valid .rule-dot { background:#10b981; box-shadow:0 0 0 3px rgba(16,185,129,.18); }

.auth-remember-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 22px; }
.auth-remember-row[hidden] { display:none !important; }
.account-dialog .auth-remember-label {
    display:inline-flex; align-items:center; gap:8px; margin:0;
    color:#4b5563; font:400 14px/1.4 'Be Vietnam Pro','Barlow',sans-serif;
    letter-spacing:0; text-transform:none; cursor:pointer;
}
.account-dialog .auth-remember-label input[type="checkbox"] {
    width:16px; height:16px; min-height:16px; margin:0; padding:0;
    accent-color:#2563eb; border-radius:4px; cursor:pointer;
}
.auth-forgot-link {
    border:0; background:transparent; padding:0;
    color:#2563eb; font:500 14px/1.4 'Be Vietnam Pro','Barlow',sans-serif; cursor:pointer;
}
.auth-forgot-link:hover { color:#1d4ed8; text-decoration:underline; }

.auth-turnstile { margin: 0 0 12px; }
.auth-turnstile p { margin: 4px 0; font-size: 13px; }
.auth-turnstile p:empty { display: none; }
#account-turnstile-retry { margin: 4px 0; padding: 6px 0; border: 0; background: transparent; color: #1d4ed8; font: inherit; text-decoration: underline; }

.auth-submit-btn {
    display:flex; align-items:center; justify-content:center;
    width:100%; min-height:48px; padding:12px 16px; border:0; border-radius:12px;
    background:#000000; color:#ffffff;
    font:600 15px/1.4 'Be Vietnam Pro','Barlow',sans-serif;
    cursor:pointer; transition:background .18s,transform .14s;
}
.auth-submit-btn:hover:not(:disabled) { background:#1f2937; }
.auth-submit-btn:disabled { opacity:.6; cursor:not-allowed; }

.auth-divider { position:relative; margin:24px 0; display:flex; align-items:center; justify-content:center; }
.auth-divider-line { position:absolute; inset:0; display:flex; align-items:center; }
.auth-divider-line::before { content:''; width:100%; border-top:1px solid #d1d5db; }
.auth-divider-text { position:relative; padding:0 10px; background:#ffffff; color:#6b7280; font:400 14px/1 'Be Vietnam Pro','Barlow',sans-serif; }

.auth-social-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.auth-social-btn {
    display:flex; align-items:center; justify-content:center; gap:8px;
    min-height:48px; padding:12px 14px; border:1px solid #d1d5db; border-radius:12px;
    background:#ffffff; color:#374151;
    font:500 13.5px/1.3 'Be Vietnam Pro','Barlow',sans-serif;
    cursor:pointer; transition:background .15s,border-color .15s;
}
.auth-social-btn:hover { background:#f9fafb; border-color:#9ca3af; }
.auth-social-icon { width:20px; height:20px; flex-shrink:0; }

/* Signed-In Profile View on Right Panel */
.auth-profile-view[hidden] { display:none !important; }
.auth-profile-card {
    display:flex; align-items:center; gap:16px; padding:18px; margin-bottom:16px;
    border:1px solid #e5e7eb; border-radius:16px; background:#f9fafb;
}
.auth-avatar {
    width:56px; height:56px; border-radius:14px; display:grid; place-items:center; flex-shrink:0;
    background:linear-gradient(135deg,#242424,#141414); color:#ffd16b; border:1px solid #383838;
    font:800 20px/1 'Montserrat',sans-serif;
}
.auth-profile-meta { min-width:0; flex:1; }
.auth-profile-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:4px; }
.auth-profile-row strong { font:700 18px/1.2 'Be Vietnam Pro','Barlow',sans-serif; color:#111827; }
.auth-verified-badge {
    padding:3px 8px; border-radius:9999px; background:#dcfce7; color:#15803d;
    font:700 10px/1.2 'Montserrat',sans-serif; letter-spacing:.05em;
}
.auth-profile-email { display:block; color:#6b7280; font-size:13px; margin-bottom:8px; overflow-wrap:anywhere; }
.auth-profile-balance { margin:0; padding:6px 10px; border-radius:8px; background:#ffffff; border:1px solid #e5e7eb; color:#1f2937; font:600 12px monospace; }
.auth-profile-note { margin:0 0 16px; color:#4b5563; font-size:13px; line-height:1.6; }
.auth-collection-heading { margin:0 0 8px; font:700 15px/1.3 'Be Vietnam Pro','Barlow',sans-serif; color:#111827; }
.auth-collection-list { max-height:140px; margin:0 0 20px; padding:10px 14px 10px 28px; border:1px solid #e5e7eb; border-radius:12px; background:#f9fafb; color:#374151; font-size:13px; line-height:1.7; overflow-y:auto; }
.auth-profile-actions { display:grid; gap:12px; }
.auth-profile-secondary-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.auth-logout-btn {
    width:100%; min-height:44px; padding:10px 16px; border:1px solid #fecaca; border-radius:12px;
    background:#fef2f2; color:#dc2626; font:600 14px/1.3 'Be Vietnam Pro','Barlow',sans-serif; cursor:pointer;
}
.auth-logout-btn:hover { background:#fee2e2; }

/* Arena Auth Gate — shown on /play when user is not logged in */
.arena-auth-gate { margin:0 0 28px; }
.arena-auth-gate[hidden] { display:none !important; }
.arena-auth-gate-card {
    max-width:620px; margin:16px auto 28px; padding:36px 32px; text-align:center;
    border:1px solid #59442a; border-top:4px solid #ffd16b; border-radius:8px;
    background:radial-gradient(ellipse at 50% 0%,rgba(255,159,67,.18),transparent 70%),linear-gradient(160deg,#1f1c18 0%,#121212 100%);
    box-shadow:0 24px 64px rgba(0,0,0,.78);
}
.arena-auth-gate-badge {
    width:58px; height:58px; margin:0 auto 16px; border-radius:50%; display:grid; place-items:center;
    background:rgba(255,209,107,.14); border:1px solid rgba(255,209,107,.45); color:#ffd16b;
    box-shadow:0 0 24px rgba(255,159,67,.22);
}
.arena-auth-gate-badge svg { width:28px; height:28px; }
.arena-auth-gate-card h2 { margin:0 0 12px; font:900 clamp(24px,3vw,34px)/1.15 'Montserrat',sans-serif; color:#fff; }
.arena-auth-gate-card p:not(.eyebrow) { max-width:460px; margin:0 auto 24px; color:#cccccc; font-size:13.5px; line-height:1.75; }
.arena-auth-gate-actions { display:flex; align-items:center; justify-content:center; gap:14px; flex-wrap:wrap; }
.arena-auth-gate-actions .button { min-width:170px; min-height:46px; font-weight:800; }
body[data-auth-locked="true"] [data-page="/play"] #match-lobby,
body[data-auth-locked="true"] [data-page="/play"] .play-layout {
    filter:blur(6px) brightness(.38); opacity:.45; pointer-events:none; user-select:none;
}

@media (max-width:960px) {
    .auth-split-left { display:none; }
    .auth-mobile-back { display:block; }
    .auth-form-box { padding:20px 12px; }
}
@media (max-width:580px) {
    .auth-social-grid,.auth-signup-rules,.auth-profile-secondary-row { grid-template-columns:1fr; }
}
