:root{
    --brand-red:#cd0606;
    --brand-gray:#cccccc;
    --brand-black:#000000;
}

body{
    min-height:100vh;
    margin:0;
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
    overflow-x:hidden;
    font-family:'Segoe UI',Roboto,Arial,sans-serif;
    background:radial-gradient(circle at 15% 20%, rgba(205,6,6,.2), transparent 40%),
               radial-gradient(circle at 85% 80%, rgba(255,255,255,.1), transparent 40%),
               var(--brand-black);
    color:#fff;
}

.form-container{
    position:relative;
    z-index:1;
    width:100%;
    max-width:420px;
    margin:40px 0;
    padding:34px 28px 28px;
    border-radius:18px;
    background:rgba(12,12,12,.92);
    border:1px solid rgba(255,255,255,.12);
    box-shadow:0 16px 34px rgba(0,0,0,.4);
    animation:fadeInUp .7s ease;
}

h1{
    margin:0 0 22px;
    text-align:center;
    font-size:2rem;
    font-weight:900;
    letter-spacing:.4px;
    color:#fff;
}

.form-group{
    margin-bottom:18px;
    position:relative;
}

.form-group label{
    display:block;
    margin-bottom:7px;
    color:var(--brand-gray);
    font-size:.96rem;
    font-weight:700;
}

.form-group input{
    width:100%;
    box-sizing:border-box;
    padding:12px 14px;
    border-radius:10px;
    border:1.5px solid rgba(255,255,255,.2);
    background:rgba(255,255,255,.05);
    color:#fff;
    font-size:1rem;
    outline:0;
    transition:border-color .2s, box-shadow .2s, background .2s;
}

.form-group input:focus{
    border-color:rgba(205,6,6,.9);
    background:rgba(255,255,255,.08);
    box-shadow:0 0 0 3px rgba(205,6,6,.2);
}

.password-container{
    display:flex;
    position:relative;
    align-items:center;
}

.password-container input{
    flex:1;
    padding-right:44px;
}

.password-toggle{
    position:absolute;
    right:10px;
    top:50%;
    transform:translateY(-50%);
    border:none;
    background:transparent;
    color:var(--brand-gray);
    cursor:pointer;
    font-size:18px;
}

.password-toggle:hover{
    color:#fff;
}

.form-group #submit{
    width:100%;
    margin-top:8px;
    padding:12px 0;
    border:none;
    border-radius:11px;
    background:linear-gradient(90deg, #cd0606 0%, #9f0505 100%);
    color:#fff;
    font-size:1rem;
    font-weight:800;
    cursor:pointer;
    transition:transform .15s, box-shadow .2s, filter .2s;
    box-shadow:0 10px 24px rgba(205,6,6,.25);
}

.form-group #submit:hover:not(:disabled){
    transform:translateY(-1px);
    filter:brightness(1.05);
}

.form-group #submit:disabled{
    cursor:not-allowed;
    opacity:.55;
    box-shadow:none;
}

.text-center{
    margin-top:16px;
    text-align:center;
    color:var(--brand-gray);
    font-weight:600;
}

.text-center a{
    color:#fff;
    text-decoration:none;
    font-weight:800;
}

.text-center a:hover{
    color:var(--brand-red);
    text-decoration:underline;
}

#confirm-password-error,
#email-message,
#username-error,
#username-message{
    margin-top:6px;
    min-height:18px;
    display:block;
    color:#ff7777;
    font-size:.9rem;
    font-weight:700;
}

@keyframes fadeInUp{
    from{
        opacity:0;
        transform:translateY(20px);
    }
    to{
        opacity:1;
        transform:none;
    }
}

@media (max-width:600px){
    .form-container{
        margin:18px 10px;
        max-width:calc(100vw - 20px);
        padding:24px 16px 18px;
        border-radius:14px;
    }

    h1{
        font-size:1.65rem;
    }
}