:root{

    --primary:#7B61FF;
    --primary-light:#9F8CFF;

    --bg:#F6F7FC;

    --surface:#FFFFFF;

    --teacher-bg:#F7F3FF;

    --text:#1B1B1F;

    --muted:#777785;

    --border:#E8E8EF;

    --success:#34C759;

    --danger:#FF3B30;

    --radius:22px;

}

*{

    margin:0;

    padding:0;

    box-sizing:border-box;

    -webkit-tap-highlight-color:transparent;

}

html{

    font-size:16px;

}

body{

    min-height:100dvh;

    font-family:"Outfit",sans-serif;

    background:var(--bg);

    color:var(--text);

}

.screen{

    min-height:100dvh;

    display:flex;

    flex-direction:column;

    padding:

        max(18px,env(safe-area-inset-top))

        18px

        max(22px,env(safe-area-inset-bottom));

}

/* ---------------- HEADER ---------------- */

.header{

    margin-bottom:28px;

}

.back-btn{

    width:46px;

    height:46px;

    border:none;

    border-radius:16px;

    background:#fff;

    font-size:22px;

    margin-bottom:18px;

    box-shadow:

    0 8px 20px rgba(0,0,0,.05);

}

.logo{

    width:62px;

    height:62px;

    border-radius:20px;

    margin-bottom:18px;

    display:flex;

    justify-content:center;

    align-items:center;

    color:#fff;

    font-size:28px;

    font-weight:800;

    background:linear-gradient(
        135deg,
        var(--primary),
        var(--primary-light)
    );

    box-shadow:

    0 18px 35px rgba(123,97,255,.25);

}

.header h1{

    font-size:2rem;

    font-weight:800;

}

.header p{

    margin-top:8px;

    color:var(--muted);

}

/* ---------------- FORM ---------------- */

form{

    display:flex;

    flex-direction:column;

    gap:18px;

}

.input-group{

    display:flex;

    flex-direction:column;

    gap:8px;

}

.input-group label{

    font-size:.95rem;

    font-weight:600;

}

.input-group label span{

    color:var(--muted);

    font-weight:500;

}

input{

    width:100%;

    height:58px;

    border:2px solid var(--border);

    border-radius:18px;

    background:#fff;

    padding:0 18px;

    font-size:1rem;

    font-family:inherit;

    transition:.2s;

}

input:focus{

    outline:none;

    border-color:var(--primary);

    box-shadow:

    0 0 0 5px rgba(123,97,255,.08);

}

/* ---------------- PASSWORD ---------------- */
.password-box {
    position: relative;
}

.password-box input {
    padding-right: 58px;
}

#togglePassword {
    position: absolute;

    right: 8px;
    top: 50%;

    transform: translateY(-50%);

    width: 42px;
    height: 42px;

    border: none;
    background: none;

    cursor: pointer;

    display: flex;
    justify-content: center;
    align-items: center;

    color: #757575;
}

#togglePassword:hover {
    color: var(--primary);
}

.material-symbols-rounded {
    font-size: 24px;
}

.password-rules {
    display: flex;

    flex-direction: column;

    gap: 4px;

    margin-top: 4px;
}

.password-rules small {
    color: var(--muted);

    transition: .2s;
}

.password-rules small.valid {
    color: var(--success);

    font-weight: 600;
}

/* ---------------- USERNAME ---------------- */

#usernameStatus{

    min-height:18px;

    font-size:.82rem;

    font-weight:500;

}

#usernameStatus.success{

    color:var(--success);

}

#usernameStatus.error{

    color:var(--danger);

}

#usernameStatus.loading{

    color:var(--primary);

}

#emailError{

    min-height:18px;

    font-size:.82rem;

    color:#FF3B30;

    font-weight:500;

}

#registerError{

    display:block;

    min-height:18px;

    font-size:.82rem;

    color:#FF3B30;

    font-weight:500;

    text-align:center;

}

input.error{

    border-color:#FF3B30;

}

/* ---------------- TEACHER ---------------- */

#teacherFields{

    display:none;

    margin-top:6px;

    padding:20px;

    border-radius:24px;

    background:var(--teacher-bg);

    animation:fade .3s ease;

}

#teacherFields h3{

    margin-bottom:18px;

    font-size:1.1rem;

}

/* ---------------- SCHOOL HEADER ---------------- */

.teacher-header{

    display:flex;

    align-items:center;

    justify-content:space-between;

    gap:12px;

    margin-bottom:18px;

}

.teacher-header h3{

    margin:0;

    font-size:1.1rem;

}

.skip-school{

    display:flex;

    align-items:center;

    gap:8px;

    font-size:.88rem;

    font-weight:600;

    color:var(--muted);

    cursor:pointer;

    user-select:none;

}

.skip-school input{

    width:18px;

    height:18px;

    accent-color:var(--primary);

    cursor:pointer;

}

/* ---------------- BUTTON ---------------- */

#registerBtn{

    margin-top:12px;

    margin-bottom:18px;

    height:60px;

    border:none;

    border-radius:20px;

    background:#D8D8DE;

    color:#fff;

    font-size:1rem;

    font-weight:700;

    transition:.25s;

}

#registerBtn.active{

    background:linear-gradient(
        135deg,
        var(--primary),
        var(--primary-light)
    );

    box-shadow:

    0 18px 35px rgba(123,97,255,.22);

}

#registerBtn:disabled{

    cursor:not-allowed;

}

/* ---------------- SCROLL ---------------- */

body::-webkit-scrollbar{

    display:none;

}

/* ---------------- ANIMATION ---------------- */

@keyframes fade{

    from{

        opacity:0;

        transform:translateY(12px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/* ---------------- SMALL DEVICES ---------------- */

@media (max-height:700px){

    .header{

        margin-bottom:18px;

    }

    .logo{

        width:54px;

        height:54px;

        margin-bottom:14px;

    }

    .header h1{

        font-size:1.7rem;

    }

    input{

        height:54px;

    }

}

.bottom-link{

    margin-top:auto;

    text-align:center;

    font-size:.92rem;

    color:var(--muted);

}

.bottom-link a{

    color:var(--primary);

    font-weight:700;

    text-decoration:none;

}

.legal-note{

    text-align:center;

    font-size:.8rem;

    color:var(--muted);

    margin:2px 0 12px;

}

.legal-note a{

    color:var(--primary);

    text-decoration:none;

    font-weight:600;

}