/* OGgame — login / sign-up. */
.auth-body { min-block-size: 100dvh; }
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); min-block-size: 100dvh; }

.auth-art { position: relative; isolation: isolate; overflow: hidden; margin: 16px; margin-inline-end: 0; border-radius: 30px; background: #15171a; }
.auth-art-bg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; z-index: -2; animation: hub-zoom 16s ease-out both; }
.auth-art::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #111316 4%, #111316a8 34%, #11131620 70%), linear-gradient(90deg, #11131680, transparent 40%); }
.auth-art-hero {
    position: absolute; inset-block-end: 0; inset-inline-start: 50%; translate: -50% 0;
    block-size: 88%; inline-size: auto; max-inline-size: 90%; object-fit: contain; object-position: bottom;
    filter: drop-shadow(0 30px 50px #000c);
    mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent), linear-gradient(0deg, transparent, #000 18%);
    mask-composite: intersect;
    animation: auth-hero 1000ms cubic-bezier(.2,.72,.24,1) 100ms both;
}
html[dir="rtl"] .auth-art-hero { translate: 50% 0; }
@keyframes auth-hero { from { opacity: 0; transform: translateY(40px) scale(.97); } }
@keyframes hub-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.auth-art-copy { position: absolute; inset-inline: 0; inset-block-end: 0; z-index: 1; display: grid; gap: 6px; padding: clamp(24px, 4vw, 48px); }
.auth-art-copy strong { font-size: clamp(1.2rem, 2.2vw, 1.8rem); color: #f8eddb; }
.auth-art-copy span { color: #d6d2ca; font-size: .9rem; }

.auth-panel { display: grid; align-content: center; justify-items: center; gap: 22px; padding: 40px clamp(20px, 4vw, 56px); }
.auth-wordmark { grid-area: auto; justify-self: center; font-size: 1.6rem; }
.auth-card { position: relative; inline-size: min(420px, 100%); display: grid; gap: 4px; padding: 32px clamp(20px, 3vw, 34px) 28px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 80px -40px #000; animation: panel-in 500ms cubic-bezier(.2,.72,.24,1) both; }
.auth-progress { position: absolute; inset-block-start: 0; inset-inline: 28px; block-size: 3px; border-radius: 0 0 4px 4px; background: var(--raised); overflow: hidden; }
.auth-progress span { display: block; block-size: 100%; inline-size: calc(var(--p) * 33.34%); background: linear-gradient(90deg, var(--gold), #f7d8a1); border-radius: inherit; transition: inline-size 600ms var(--hover-ease); margin-inline-start: auto; }
.auth-card h1 { margin: 6px 0 0; font-size: 1.35rem; }
.auth-sub { margin: 4px 0 20px; color: var(--muted); font-size: .86rem; line-height: 1.9; }
.auth-back-form { justify-self: start; margin-block-end: 6px; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: .78rem; cursor: pointer; }
.auth-back:hover { color: var(--gold); }
.auth-back .vg-i { inline-size: 14px; block-size: 14px; }
.input-icon { position: relative; }
.input-icon > .vg-i { position: absolute; inset-inline-start: 15px; inset-block: 0; margin-block: auto; color: var(--muted); pointer-events: none; transition: color 200ms ease; }
/* Phone and password inputs are LTR inside an RTL page, so the padding is set physically. */
.input-icon input { padding-right: 46px !important; padding-left: 15px !important; min-block-size: 54px !important; font-size: 1rem; }
.input-icon:has(.input-reveal) input { padding-left: 50px !important; }
.input-icon:focus-within > .vg-i { color: var(--gold); }
.input-reveal { position: absolute; inset-inline-end: 8px; inset-block: 0; margin-block: auto; inline-size: 38px; block-size: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.input-reveal.is-on { color: var(--gold); }
input[type="password"] { direction: ltr; text-align: right; }
.auth-foot { margin: 16px 0 0; text-align: center; color: var(--muted); font-size: .74rem; }
.auth-alt { display: grid; gap: 10px; margin-block-start: 18px; padding-block-start: 18px; border-block-start: 1px dashed var(--line-strong); text-align: center; color: var(--muted); font-size: .8rem; }
.auth-skip { margin-block-start: 10px; }
.auth-home { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .82rem; }
.auth-home:hover { color: var(--gold); }

.otp { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; margin-block-end: 18px; }
.otp > .otp-input {
    inline-size: 100%; aspect-ratio: 1 / 1.1; max-block-size: 66px;
    border: 1px solid var(--line-strong); border-radius: 15px; background: var(--sunken); color: var(--text);
    padding-inline: 0; text-align: center; font: 800 1.5rem/1 Yekan, Tahoma, sans-serif; outline: none; caret-color: var(--gold);
    transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms var(--hover-ease), background-color 200ms ease;
}
.otp-input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px #ebc7881f; transform: translateY(-2px); }
.otp-input.is-filled { background: #2a2620; border-color: #ebc78866; }
[data-otp-form].is-complete .otp-input { border-color: var(--success); animation: otp-done 420ms ease; }
@keyframes otp-done { 50% { transform: translateY(-4px); } }
.otp-timer { display: flex; align-items: center; justify-content: center; gap: 10px; margin-block-start: 14px; color: var(--muted); font-size: .8rem; }
.otp-timer b { color: var(--text); font-weight: 700; }
.otp-timer .link { border: 0; background: none; font: inherit; cursor: pointer; font-weight: 700; font-size: .8rem; }
.otp-timer .link:disabled { display: none; }

@media (max-width: 900px) {
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth-art { display: none; }
    .auth-panel { min-block-size: 100dvh; background: radial-gradient(ellipse at 50% 0, #3b342b, transparent 60%); }
}
@media (prefers-reduced-motion: reduce) {
    .auth-art-bg, .auth-art-hero, .auth-card { animation: none; }
}
