/* Golden Games — landing + login (maps to app Liquid Glass tokens) */

:root {
    --background: var(--page-bg, #070708);
    --surface: rgba(18, 19, 23, 0.72);
    --surface-hover: rgba(24, 25, 30, 0.82);

    --border: rgba(255, 255, 255, 0.10);
    --border-bright: rgba(255, 255, 255, 0.18);

    --text-primary: var(--text, #f5f5f7);
    --text-secondary: var(--text-muted, #a1a1aa);
    --text-muted: var(--text-dim, #71717a);

    --gold: #d9b45b;
    --gold-light: #f1d691;
    --gold-dark: #927331;

    --danger: #ff7272;
    --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
}

body.landing-mode {
    overflow: hidden;
    color: var(--text-primary);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: transparent;
}

body.landing-mode .app-sidebar,
body.landing-mode .app-topbar,
body.landing-mode .app-main,
body.landing-mode .cursor-glow {
    display: none !important;
}

body.landing-mode .app-background,
body.landing-mode .inventory-grid,
body.landing-mode .background-noise {
    display: none !important;
}

.landing-mode button,
.landing-mode input {
    font: inherit;
}

.landing-mode button {
    color: inherit;
}

/* —— Background —— */
.page-background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 72% 4%, rgba(218, 181, 92, 0.105), transparent 32%),
        radial-gradient(circle at 18% 90%, rgba(81, 94, 138, 0.09), transparent 38%),
        linear-gradient(135deg, #050506 0%, #08090b 55%, #050506 100%);
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.65;
    will-change: transform;
}

.ambient-orb--gold {
    width: 620px;
    height: 620px;
    top: -330px;
    right: -140px;
    background: radial-gradient(circle, rgba(221, 181, 89, 0.18), transparent 68%);
    animation: drift-gold 22s ease-in-out infinite alternate;
}

.ambient-orb--blue {
    width: 700px;
    height: 700px;
    bottom: -440px;
    left: -160px;
    background: radial-gradient(circle, rgba(81, 113, 191, 0.12), transparent 68%);
    animation: drift-blue 28s ease-in-out infinite alternate;
}

.background-grid {
    position: absolute;
    inset: 0;
    opacity: 0.45;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at center, black 0%, rgba(0, 0, 0, 0.7) 45%, transparent 82%);
    -webkit-mask-image: radial-gradient(circle at center, black 0%, rgba(0, 0, 0, 0.7) 45%, transparent 82%);
}

.page-background .background-noise {
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    opacity: 0.025;
    mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.8'/%3E%3C/svg%3E");
}

@keyframes drift-gold {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-110px, 90px, 0) scale(1.15); }
}

@keyframes drift-blue {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(150px, -95px, 0) scale(1.12); }
}

/* —— Shell —— */
.app-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

/* —— Intro —— */
.intro-screen {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: grid;
    place-items: center;
    padding: 24px;
    transition: opacity 650ms var(--ease-premium), visibility 650ms;
}

.intro-content {
    position: relative;
    width: min(680px, 100%);
    text-align: center;
    transition:
        transform 800ms var(--ease-premium),
        opacity 500ms ease,
        filter 800ms var(--ease-premium);
}

.logo-mark {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.08em;
    width: 78px;
    height: 78px;
    margin: 0 auto 28px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 23px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.06em;
    line-height: 1;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.025)),
        rgba(20, 20, 22, 0.72);
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 0 70px rgba(218, 181, 92, 0.08);
    backdrop-filter: blur(20px) saturate(135%);
    -webkit-backdrop-filter: blur(20px) saturate(135%);
    animation: logo-arrival 1.1s var(--ease-premium) both;
}

.logo-mark::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(218, 181, 92, 0.16);
    border-radius: 17px;
    pointer-events: none;
}

.logo-g {
    position: relative;
    z-index: 1;
    display: inline-block;
    font-weight: 700;
    line-height: 1;
}

.logo-g--gold {
    color: transparent;
    background: linear-gradient(
        165deg,
        #fff0b9 0%,
        #efd48c 28%,
        #d9b45b 55%,
        #927331 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    filter: drop-shadow(0 1px 0 rgba(255, 240, 185, 0.25));
}

.logo-g--silver {
    color: transparent;
    background: linear-gradient(
        165deg,
        #ffffff 0%,
        #e8e8ec 35%,
        #c7c7cc 65%,
        #8e8e96 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.2));
}

.intro-eyebrow {
    margin: 0 0 12px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    animation: text-arrival 900ms 180ms var(--ease-premium) both;
}

.intro-title {
    margin: 0;
    font-size: clamp(52px, 8vw, 94px);
    font-weight: 570;
    letter-spacing: -0.065em;
    line-height: 0.95;
    background: linear-gradient(180deg, #ffffff 0%, #e7e7e9 40%, #96969c 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: title-arrival 1.1s 100ms var(--ease-premium) both;
}

.intro-title .golden {
    background: linear-gradient(
        110deg,
        #8e7137 0%,
        #efd48c 36%,
        #fff0b9 50%,
        #c49d4c 72%,
        #7d612d 100%
    );
    background-size: 220% auto;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation:
        title-arrival 1.1s 100ms var(--ease-premium) both,
        gold-shimmer 6s 1.2s ease-in-out infinite;
}

.intro-description {
    max-width: 470px;
    margin: 22px auto 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.65;
    animation: text-arrival 900ms 280ms var(--ease-premium) both;
}

.enter-button {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    min-width: 178px;
    min-height: 48px;
    margin-top: 34px;
    padding: 0 22px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 14px;
    color: #f7f7f7;
    font-size: 13px;
    font-weight: 620;
    letter-spacing: 0.01em;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)),
        rgba(18, 19, 22, 0.72);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(18px) saturate(125%);
    -webkit-backdrop-filter: blur(18px) saturate(125%);
    cursor: pointer;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease,
        box-shadow 180ms ease;
    animation: text-arrival 900ms 380ms var(--ease-premium) both;
}

.enter-button::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -80%;
    left: -55%;
    width: 32%;
    height: 260%;
    background: linear-gradient(90deg, transparent, rgba(255, 235, 181, 0.22), transparent);
    transform: rotate(20deg);
    transition: left 700ms var(--ease-premium);
}

.enter-button:hover {
    transform: translateY(-2px);
    border-color: rgba(238, 209, 134, 0.32);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035)),
        rgba(24, 24, 27, 0.82);
    box-shadow:
        0 20px 52px rgba(0, 0, 0, 0.42),
        0 0 30px rgba(218, 181, 92, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.enter-button:hover::before { left: 130%; }
.enter-button:active { transform: translateY(0) scale(0.98); }
.enter-button:focus-visible {
    outline: 2px solid rgba(240, 211, 140, 0.72);
    outline-offset: 4px;
}

.enter-button svg {
    width: 16px;
    height: 16px;
    transition: transform 220ms var(--ease-premium);
}

.enter-button:hover svg { transform: translateX(3px); }

.sound-note {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 0.035em;
    animation: text-arrival 900ms 460ms var(--ease-premium) both;
}

@keyframes logo-arrival {
    from { opacity: 0; transform: translateY(24px) scale(0.88); filter: blur(10px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes title-arrival {
    from { opacity: 0; transform: translateY(34px); filter: blur(15px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes text-arrival {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gold-shimmer {
    0%, 68%, 100% { background-position: 100% center; }
    82% { background-position: 0 center; }
}

/* —— Whoosh —— */
.whoosh-layer {
    position: fixed;
    inset: 0;
    z-index: 20;
    overflow: hidden;
    pointer-events: none;
    visibility: hidden;
}

.whoosh-streak {
    position: absolute;
    top: 50%;
    left: -30%;
    width: 28%;
    height: 1px;
    opacity: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 241, 199, 0.8),
        rgba(255, 255, 255, 0.16),
        transparent
    );
    filter: blur(0.4px);
    transform: rotate(-8deg);
}

.whoosh-streak:nth-child(2) {
    top: 43%;
    width: 22%;
    transform: rotate(-5deg);
}

.whoosh-streak:nth-child(3) {
    top: 57%;
    width: 34%;
    transform: rotate(-11deg);
}

body.is-entering .whoosh-layer { visibility: visible; }

body.is-entering .whoosh-streak {
    animation: whoosh-streak 720ms var(--ease-premium) both;
}

body.is-entering .whoosh-streak:nth-child(2) { animation-delay: 55ms; }
body.is-entering .whoosh-streak:nth-child(3) { animation-delay: 110ms; }

body.is-entering .intro-content {
    opacity: 0;
    filter: blur(18px);
    transform: scale(1.08);
}

@keyframes whoosh-streak {
    0% {
        left: -35%;
        opacity: 0;
        transform: rotate(-8deg) scaleX(0.5);
    }
    25% { opacity: 0.9; }
    100% {
        left: 120%;
        opacity: 0;
        transform: rotate(-8deg) scaleX(2.2);
    }
}

/* —— Login —— */
.login-screen {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.035);
    transition:
        opacity 750ms var(--ease-premium),
        transform 900ms var(--ease-premium),
        visibility 750ms;
}

body.is-login-visible .intro-screen {
    opacity: 0;
    visibility: hidden;
}

body.is-login-visible .login-screen {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 430px);
    align-items: center;
    gap: clamp(60px, 10vw, 150px);
    width: min(1100px, 100%);
    max-width: 100%;
}

.login-layout > * {
    min-width: 0;
}

.login-message { max-width: 530px; }

.login-message__label {
    margin: 0 0 17px;
    color: var(--gold-light);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.login-message__title {
    margin: 0;
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 550;
    letter-spacing: -0.055em;
    line-height: 1.02;
    color: var(--text-primary);
}

.login-message__description {
    max-width: 440px;
    margin: 23px 0 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

.login-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: 100%;
    max-width: 430px;
    min-width: 0;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.018)),
        rgba(15, 16, 19, 0.74);
    box-shadow:
        0 35px 100px rgba(0, 0, 0, 0.54),
        inset 0 1px 0 rgba(255, 255, 255, 0.11);
    backdrop-filter: blur(28px) saturate(135%);
    -webkit-backdrop-filter: blur(28px) saturate(135%);
}

.login-panel form {
    width: 100%;
    min-width: 0;
}

.login-panel::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: radial-gradient(circle at 70% 0%, rgba(218, 181, 92, 0.09), transparent 35%);
}

.login-panel__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 34px;
}

.mini-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.05em;
    width: 39px;
    height: 39px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.06em;
    line-height: 1;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.mini-logo .logo-g {
    font-size: inherit;
}

.login-panel__brand-copy strong {
    display: block;
    font-size: 14px;
    font-weight: 620;
    color: var(--text-primary);
}

.login-panel__brand-copy span {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 11px;
}

.login-panel h2 {
    margin: 0;
    font-size: 27px;
    font-weight: 570;
    letter-spacing: -0.035em;
    color: var(--text-primary);
}

.login-panel__subtitle {
    margin: 9px 0 28px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.landing-alert {
    margin: 0 0 1rem;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.1);
    color: #FCA5A5;
    font-size: 13px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 17px;
    width: 100%;
    min-width: 0;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #cacacf;
    font-size: 12px;
    font-weight: 550;
}

.input-wrapper {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.form-input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 13px;
    outline: none;
    color: var(--text-primary);
    caret-color: var(--gold-light);
    background: rgba(5, 6, 8, 0.48);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 1px 0 rgba(255, 255, 255, 0.015);
    transition:
        border-color 180ms ease,
        background-color 180ms ease,
        box-shadow 180ms ease;
    /* Prevent value length from expanding the grid column */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hide native browser reveal / clear controls (we use our own toggle) */
.form-input::-ms-reveal,
.form-input::-ms-clear {
    display: none;
}

.form-input::-webkit-credentials-auto-fill-button,
.form-input::-webkit-strong-password-auto-fill-button {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
    width: 0;
    margin: 0;
    padding: 0;
}

.form-input::placeholder { color: #5d5e65; }

.form-input:hover {
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(8, 9, 11, 0.58);
}

.form-input:focus {
    border-color: rgba(235, 207, 137, 0.42);
    background: rgba(8, 9, 11, 0.7);
    box-shadow:
        0 0 0 3px rgba(218, 181, 92, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.password-input { padding-right: 52px; }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    z-index: 2;
    width: 36px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
    flex-shrink: 0;
    transition: color 160ms ease, background-color 160ms ease;
}

.password-toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.password-toggle svg {
    width: 17px;
    height: 17px;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 4px 0 23px;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
}

.remember-me input { accent-color: var(--gold); }

.forgot-password {
    padding: 0;
    border: 0;
    color: #c8aa67;
    font-size: 12px;
    background: transparent;
    cursor: pointer;
}

.forgot-password:hover { color: var(--gold-light); }

.login-button {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 49px;
    border: 1px solid rgba(255, 235, 180, 0.18);
    border-radius: 13px;
    color: #16120a;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(180deg, #eed58f 0%, #cba552 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 12px 35px rgba(180, 138, 53, 0.14);
    cursor: pointer;
    transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.login-button::before {
    content: "";
    position: absolute;
    top: -60%;
    left: -45%;
    width: 28%;
    height: 220%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: rotate(18deg);
    transition: left 750ms var(--ease-premium);
}

.login-button:hover {
    filter: brightness(1.055);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 15px 42px rgba(180, 138, 53, 0.2);
}

.login-button:hover::before { left: 130%; }
.login-button:active { transform: scale(0.985); }

.login-button svg {
    width: 16px;
    height: 16px;
}

.login-footer {
    margin: 22px 0 0;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 820px) {
    .login-layout {
        grid-template-columns: 1fr;
        max-width: 430px;
        gap: 34px;
    }
    .login-message { text-align: center; }
    .login-message__title { font-size: clamp(38px, 11vw, 56px); }
    .login-message__description { margin-inline: auto; }
    .login-panel {
        padding: 27px;
        border-radius: 22px;
    }
}

@media (max-width: 480px) {
    .intro-title { font-size: clamp(47px, 17vw, 68px); }
    .intro-description { font-size: 14px; }
    .login-screen {
        align-items: start;
        overflow-y: auto;
        padding-top: 56px;
        padding-bottom: 56px;
    }
    .login-message__description { display: none; }
    .login-panel { padding: 24px 20px; }
    .form-options { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .ambient-orb,
    .whoosh-layer {
        display: none;
    }
}
