:root {
    --gold:#efae5a;
    --cream:#fff0d0;
    --ink:#101117;
    --panel:#191b23
}

* {
    box-sizing:border-box
}

body {
    margin:0;
    background:radial-gradient(ellipse at 25% 20%,#24252b 0%,#121318 52%,#0c0d11 100%);
    color:#f8f4ed;
    font-family:Arial,Helvetica,sans-serif;
    min-height:100vh;
    overflow-x:hidden
}

.stage {
    position:relative;
    min-height:100svh;
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(330px,430px);
    align-items:center;
    gap:3vw;
    padding:35px max(4vw,24px);
    isolation:isolate
}

.stage:before {
    content:"";
    position:absolute;
    inset:0;
    background:radial-gradient(ellipse at 30% 65%,rgba(245,160,55,.14),transparent 45%);
    opacity:0;
    transition:opacity 1s;
    pointer-events:none;
    z-index:-1
}

body.on .stage:before {
    opacity:1
}

.lamp-zone {
    height:min(86vh,780px);
    min-height:480px;
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center
}

.lamp {
    width:min(100%,690px);
    height:100%;
    overflow:visible;
    filter:drop-shadow(0 22px 24px rgba(0,0,0,.4))
}

.beam {
    position:absolute;
    top:42%;
    left:10%;
    width:80%;
    height:54%;
    background:linear-gradient(180deg,rgba(255,220,140,.38),rgba(255,193,97,.09) 58%,transparent);
    clip-path:polygon(39% 0,61% 0,99% 100%,1% 100%);
    filter:blur(15px);
    opacity:0;
    transition:opacity .8s;
    pointer-events:none
}

.floorlight {
    position:absolute;
    bottom:7%;
    left:12%;
    width:76%;
    height:15%;
    background:radial-gradient(ellipse,rgba(255,180,79,.38),transparent 70%);
    filter:blur(22px);
    opacity:0;
    transition:opacity .8s;
    pointer-events:none
}

body.on .floorlight {
    opacity:1
}

body.on .light-cone {
    opacity:1!important
}

.bulb {
    opacity:.12;
    transition:opacity .65s
}

body.on .bulb {
    opacity:1
}

.pull {
    position:absolute;
    left:62%;
    top:38%;
    width:64px;
    height:230px;
    border:0;
    background:transparent;
    cursor:grab;
    touch-action:none;
    z-index:3;
    padding:0
}

.pull:focus-visible {
    outline:2px solid var(--gold);
    border-radius:20px
}

.cord {
    position:absolute;
    left:31px;
    top:0;
    width:2px;
    height:168px;
    background:linear-gradient(#a39a89,#e5d7b7);
    transform-origin:top;
    transition:transform .2s
}

.bead {
    position:absolute;
    top:160px;
    left:19px;
    width:26px;
    height:37px;
    border-radius:15px;
    background:linear-gradient(100deg,#8c5b2a,#eac083 45%,#875528);
    box-shadow:0 5px 12px #0008;
    transition:transform .2s
}

.pull:active {
    cursor:grabbing
}

.hint {
    position:absolute;
    bottom:7%;
    left:0;
    right:0;
    text-align:center;
    color:#85828a;
    font-size:12px;
    letter-spacing:3px;
    transition:opacity .4s
}

body.on .hint {
    opacity:.2
}

.auth {
    background:linear-gradient(145deg,rgba(32,34,43,.95),rgba(20,22,29,.96));
    border:1px solid #ffffff1a;
    border-radius:25px;
    padding:clamp(23px,3vw,40px);
    box-shadow:0 25px 80px #0008,0 0 70px rgba(255,176,79,.05);
    opacity:0;
    visibility:hidden;
    transform:translateY(18px);
    transition:opacity .65s,transform .65s,visibility .65s;
    max-height:calc(100svh - 34px);
    overflow:auto
}

body.on .auth {
    opacity:1;
    visibility:visible;
    transform:none
}

.logo {
    font-size:13px;
    letter-spacing:4px;
    color:var(--gold);
    font-weight:800;
    margin-bottom:19px
}

.auth h1 {
    font-size:clamp(27px,3vw,36px);
    margin:0 0 8px;
    letter-spacing:-1px
}

.sub {
    font-size:13px;
    color:#92939f;
    margin:0 0 22px;
    line-height:1.5
}

label {
    display:block;
    font-size:12px;
    color:#c8c5c6;
    margin:0 0 8px
}

.field {
    margin-bottom:15px
}

input {
    width:100%;
    height:44px;
    border:1px solid #ffffff1b;
    border-radius:10px;
    background:#11131a;
    color:white;
    padding:0 13px;
    outline:0;
    font-size:14px
}

input:focus {
    border-color:#e9a857;
    box-shadow:0 0 0 3px #e9a85720
}

.primary {
    width:100%;
    height:45px;
    border:0;
    border-radius:10px;
    background:linear-gradient(105deg,#e7a24e,#f8ca81);
    font-size:14px;
    color:#24170b;
    font-weight:800;
    cursor:pointer;
    margin-top:7px
}

.secondary {
    border:0;
    background:none;
    color:var(--gold);
    cursor:pointer;
    font-size:13px;
    padding:5px
}

.links {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-top:18px;
    color:#9c9ba5;
    font-size:13px;
    gap:10px
}

.error {
    color:#ffb1a5;
    font-size:12px;
    min-height:16px;
    margin-top:8px
}

.hidden {
    display:none!important
}

@media(max-width:760px) {
    .stage {
        display:flex;
        flex-direction:column;
        justify-content:flex-start;
        padding:8px 16px 18px;
        gap:0
    }

    .lamp-zone {
        height:43svh;
        min-height:255px;
        width:100%;
        flex-shrink:0
    }

    .lamp {
        max-width:390px
    }

    .pull {
        top:37%;
        left:62%;
        height:150px
    }

    .cord {
        height:98px
    }

    .bead {
        top:92px
    }

    .hint {
        bottom:0;
        font-size:10px
    }

    .auth {
        width:min(100%,440px);
        padding:21px;
        max-height:none;
        margin-top:0
    }

    .auth h1 {
        font-size:27px
    }

    .sub {
        margin-bottom:13px
    }

    .field {
        margin-bottom:11px
    }

    input {
        height:40px
    }

    .primary {
        height:42px
    }

}

@media(max-height:680px) and (min-width:761px) {
    .stage {
        padding-top:10px;
        padding-bottom:10px
    }

    .lamp-zone {
        height:95vh;
        min-height:390px
    }

    .auth {
        padding:20px
    }

    .sub {
        margin-bottom:13px
    }

    .field {
        margin-bottom:10px
    }

    input {
        height:38px
    }

    .logo {
        margin-bottom:10px
    }

}

@media(prefers-reduced-motion:reduce) {
    *,*:before,*:after {
        transition:none!important;
        animation:none!important
    }

}

/* Ambient particles remain invisible until the pendant light is switched on. */ .ambient-stars {
    position:absolute;
    inset:0;
    overflow:hidden;
    pointer-events:none;
    z-index:0;
    opacity:0;
    transition:opacity 1.1s ease
}

body.on .ambient-stars {
    opacity:1
}

.ambient-stars i {
    position:absolute;
    display:block;
    width:var(--sz);
    height:var(--sz);
    left:var(--x);
    top:var(--y);
    border-radius:50%;
    background:#ffe7b5;
    box-shadow:0 0 7px 2px rgba(255,197,112,.5),0 0 18px rgba(255,191,103,.18);
    opacity:0;
    animation:floatStar var(--dur) ease-in-out var(--delay) infinite alternate,twinkle var(--twinkle) ease-in-out var(--delay) infinite alternate
}

.ambient-stars i:nth-child(5n) {
    background:#fff9e9;
    box-shadow:0 0 8px rgba(255,247,210,.6)
}

@keyframes floatStar {
    from {
        transform:translate3d(0,9px,0)
    }

    to {
        transform:translate3d(var(--drift),-22px,0)
    }

}

@keyframes twinkle {
    from {
        opacity:.12
    }

    to {
        opacity:.75
    }

}

.lamp-zone,.auth {
    z-index:1
}

.auth {
    position:relative;
    isolation:isolate;
    transition:opacity .65s,transform .65s,visibility .65s,box-shadow 1s,border-color 1s
}

.auth:before {
    content:"";
    position:absolute;
    inset:-1px;
    border-radius:inherit;
    pointer-events:none;
    z-index:-1;
    background:radial-gradient(ellipse at 0% 40%,rgba(255,190,94,.18),transparent 72%);
    opacity:0;
    transition:opacity 1s
}

body.on .auth {
    border-color:rgba(240,186,109,.35);
    box-shadow:-20px 10px 85px rgba(255,176,76,.14),0 25px 80px #0008,inset 1px 0 28px rgba(244,185,103,.06)
}

body.on .auth:before {
    opacity:1
}

body.on .auth input {
    border-color:rgba(239,189,119,.24)
}

body.on .auth input:focus {
    border-color:#e9a857
}

@media(prefers-reduced-motion:reduce) {
    .ambient-stars i {
        animation:none;
        opacity:.5
    }

}

/* Social authentication buttons: UI only; connect OAuth before production use. */ .social-divider {
    display:flex;
    align-items:center;
    gap:12px;
    margin:18px 0 13px;
    color:#9c9ba5;
    font-size:12px;
    white-space:nowrap
}

.social-divider:before,.social-divider:after {
    content:"";
    height:1px;
    flex:1;
    background:#ffffff24
}

.social-buttons {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px
}

.social-btn {
    min-height:45px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    border:1px solid #ffffff30;
    border-radius:10px;
    background:#181a21;
    color:#f5f5f5;
    font:600 14px inherit;
    cursor:pointer;
    transition:background .2s,border-color .2s
}

.social-btn:hover {
    background:#252832;
    border-color:#e9a85780
}

.social-btn:focus-visible {
    outline:2px solid #e9a857;
    outline-offset:3px
}

.social-icon {
    height:20px;
    width:20px;
    flex-shrink:0
}

.apple-icon {
    height:22px;
    width:22px
}

@media(max-width:400px) {
    .social-btn {
        gap:6px;
        font-size:13px
    }

}
