*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

[hidden]{
    display:none !important;
}

html,body{
    min-height:100%;
    font-family:Arial,sans-serif;
    color:#fff;
}

body{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:28px 20px;

    background:
        linear-gradient(
            rgba(12,5,6,.72),
            rgba(8,4,5,.78)
        ),
        url("background.jpg");

    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
    background-attachment:fixed;
}

.auth-card{
    position:relative;
    width:100%;
    max-width:480px;
    padding:38px;
    overflow:hidden;

    background:linear-gradient(
        145deg,
        rgba(31,15,17,.84),
        rgba(14,9,10,.78)
    );
    border:1px solid rgba(222,74,80,.24);
    border-radius:28px;
    backdrop-filter:blur(18px);

    box-shadow:
        0 24px 80px rgba(0,0,0,.48),
        0 0 46px rgba(177,29,37,.18),
        inset 0 1px 0 rgba(255,255,255,.1);
}

.auth-card::before{
    content:"";
    position:absolute;
    top:-130px;
    right:-110px;
    width:280px;
    height:280px;
    border-radius:50%;
    pointer-events:none;
    background:rgba(190,36,43,.22);
    filter:blur(60px);
}

.brand{
    position:relative;
    display:inline-block;
    margin-bottom:14px;
    font-size:clamp(32px,7vw,44px);
    font-weight:800;
    letter-spacing:-1px;
    color:#ef6469;
    background:linear-gradient(
        135deg,
        #f08a87 0%,
        #df3b42 50%,
        #8d171e 100%
    );
    background-clip:text;
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    text-shadow:
        0 0 16px rgba(239,91,97,.22),
        0 0 28px rgba(177,29,37,.18);
}

.auth-title{
    position:relative;
    margin-bottom:8px;
    font-size:27px;
    line-height:1.2;
}

.auth-description{
    position:relative;
    margin-bottom:28px;
    color:rgba(232,237,255,.72);
    font-size:15px;
    line-height:1.55;
}

.step-indicator{
    display:flex;
    gap:8px;
    margin-bottom:26px;
}

.step-dot{
    height:4px;
    flex:1;
    border-radius:999px;
    background:rgba(255,255,255,.12);
    transition:background .25s ease, box-shadow .25s ease;
}

.step-dot.active{
    background:linear-gradient(90deg,#9b1b22,#ec4b52);
    box-shadow:0 0 14px rgba(205,47,55,.45);
}

.field{
    display:block;
    margin-bottom:18px;
}

.field-label{
    display:block;
    margin:0 0 8px 3px;
    color:rgba(242,245,255,.88);
    font-size:14px;
    font-weight:700;
}

.field-input{
    width:100%;
    height:56px;
    padding:0 17px;

    color:#fff;
    caret-color:#ef5b61;
    background:rgba(255,255,255,.07);
    border:1px solid rgba(224,111,112,.22);
    border-radius:16px;
    outline:none;

    font:inherit;
    font-size:16px;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.field-input::placeholder{
    color:rgba(221,228,255,.4);
}

.field-input:focus{
    background:rgba(255,255,255,.095);
    border-color:rgba(224,65,72,.76);
    box-shadow:
        0 0 0 4px rgba(196,38,46,.14),
        0 0 22px rgba(151,25,33,.16);
}

.code-input{
    text-align:center;
    letter-spacing:10px;
    font-size:24px;
    font-weight:700;
}

.telegram-code-input{
    font-family:Consolas,"SFMono-Regular",monospace;
    font-size:15px;
    letter-spacing:.04em;
}

.code-progress{
    margin:-9px 3px 17px;
    color:rgba(213,220,255,.44);
    font-size:12px;
    text-align:right;
}

.telegram-link{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    min-height:48px;
    margin-top:18px;
    color:#b9dfff;
    background:rgba(34,158,217,.1);
    border:1px solid rgba(81,183,231,.2);
    border-radius:15px;
    font-size:14px;
    font-weight:700;
    text-decoration:none;
    transition:background .2s ease,border-color .2s ease;
}

.telegram-link:hover{
    background:rgba(34,158,217,.17);
    border-color:rgba(81,183,231,.38);
}

.telegram-link svg{
    width:20px;
    height:20px;
    fill:#58b9e8;
}

.primary-btn{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-height:58px;
    padding:0 24px;

    color:#fff;
    background:linear-gradient(135deg,#e0444a,#85161d);
    border:1px solid rgba(255,255,255,.2);
    border-radius:17px;
    cursor:pointer;

    font:inherit;
    font-size:17px;
    font-weight:700;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.2),
        0 12px 30px rgba(151,25,33,.34),
        0 0 24px rgba(220,55,62,.16);

    transition:
        transform .2s ease,
        filter .2s ease,
        box-shadow .2s ease;
}

.primary-btn:hover:not(:disabled){
    transform:translateY(-2px);
    filter:brightness(1.08);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 16px 36px rgba(151,25,33,.42),
        0 0 30px rgba(220,55,62,.22);
}

.primary-btn:disabled{
    cursor:wait;
    opacity:.65;
}

.secondary-btn{
    display:block;
    margin:16px auto 0;
    padding:5px;
    color:#e69a9d;
    background:none;
    border:0;
    cursor:pointer;
    font:inherit;
    font-size:14px;
}

.secondary-btn:hover:not(:disabled){
    color:#fff;
}

.secondary-btn:disabled{
    cursor:default;
    color:rgba(208,215,255,.4);
}

.message{
    min-height:20px;
    margin:15px 0 0;
    color:#ff9fae;
    font-size:14px;
    line-height:1.45;
    text-align:center;
}

.message.success{
    color:#8ee6c2;
}

.notice{
    margin-top:20px;
    color:rgba(226,232,255,.58);
    font-size:13px;
    line-height:1.5;
    text-align:center;
}

.auth-footer{
    margin-top:24px;
    padding-top:21px;
    border-top:1px solid rgba(255,255,255,.09);
    color:rgba(226,232,255,.65);
    font-size:14px;
    text-align:center;
}

.auth-link{
    color:#e69a9d;
    font-weight:700;
    text-decoration:none;
}

.auth-link:hover{
    color:#fff;
}

@media (max-width:560px){
    body{
        padding:18px 14px;
        background-attachment:scroll;
    }

    .auth-card{
        padding:30px 22px;
        border-radius:23px;
    }

    .auth-title{
        font-size:24px;
    }
}

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