
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: "Inter", sans-serif;
    background: #020617;
    color: #fff;
}


/* =========================================
   PAGE
========================================= */

.register-page {
    position: relative;
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px 15px;

    overflow: visible;
}


/* =========================================
   BACKGROUND
========================================= */

.house-background {
    position: fixed;
    inset: -30px;

    background-image:
        url("../../img/modern-house.jpg");

    background-size: cover;
    background-position: center;

    filter:
        blur(8px)
        brightness(.48)
        saturate(.85);

    transform: scale(1.08);

    z-index: 0;
}


.background-overlay {
    position: fixed;
    inset: 0;

    background:
        linear-gradient(
            135deg,
            rgba(2,6,23,.82),
            rgba(2,6,23,.55),
            rgba(2,6,23,.85)
        );

    z-index: 1;
}


.vignette {
    position: fixed;
    inset: 0;

    pointer-events: none;

    background:
        radial-gradient(
            ellipse at center,
            transparent 20%,
            rgba(0,0,0,.35) 65%,
            rgba(0,0,0,.75) 100%
        );

    z-index: 2;
}


/* =========================================
   WRAPPER
========================================= */

.register-wrapper {
    position: relative;

    width: 100%;
    max-width: 470px;

    z-index: 10;

    animation: cardAppear .5s ease-out;
}


@keyframes cardAppear {

    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================================
   CARD
========================================= */

.register-card {
    position: relative;

    width: 100%;

    padding: 38px;

    border-radius: 26px;

    background: rgba(8,15,30,.88);

    border: 1px solid rgba(96,165,250,.25);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    box-shadow:
        0 30px 70px rgba(0,0,0,.55);

    /*
       IMPORTANT:
       Must remain visible so the
       country dropdown can display.
    */
    overflow: visible;
}


/* =========================================
   LOGO
========================================= */

.logo {
    width: 76px;
    height: 76px;

    margin: 0 auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 20px;

    background: rgba(255,255,255,.07);

    border: 1px solid rgba(255,255,255,.12);

    overflow: hidden;
}


.logo img {
    width: 60px;
    height: 60px;

    object-fit: contain;
}


/* =========================================
   HEADER
========================================= */

.register-header {
    text-align: center;
}


.register-header h1 {
    font-size: 29px;
    font-weight: 800;

    margin-bottom: 8px;

    letter-spacing: -1px;
}


.register-header p {
    color: rgba(255,255,255,.55);

    font-size: 13px;

    line-height: 1.6;

    margin-bottom: 26px;
}


/* =========================================
   FORM
========================================= */

.form-group {
    margin-bottom: 15px;
}


.form-label {
    display: block;

    margin-bottom: 8px;

    font-size: 12px;
    font-weight: 600;

    color: rgba(255,255,255,.75);
}


/* =========================================
   NORMAL INPUT
========================================= */

.input-wrapper {
    position: relative;
}


.form-input {
    width: 100%;
    height: 52px;

    padding: 0 45px;

    border: 1px solid rgba(255,255,255,.10);

    border-radius: 13px;

    background: rgba(0,0,0,.25);

    color: #fff;

    outline: none;

    font-family: inherit;
    font-size: 13px;
}


.form-input::placeholder {
    color: rgba(255,255,255,.28);
}


.form-input:focus {
    border-color: rgba(96,165,250,.65);

    background: rgba(0,0,0,.32);

    box-shadow:
        0 0 0 3px rgba(59,130,246,.08);
}


.input-icon {
    position: absolute;

    left: 17px;
    top: 50%;

    transform: translateY(-50%);

    color: rgba(255,255,255,.35);

    font-size: 14px;

    pointer-events: none;

    z-index: 2;
}


/* =========================================
   PHONE
========================================= */

.phone-input-wrapper {
    width: 100%;
}


/*
   IMPORTANT:
   Do not add position:absolute
   to dropdown here.
*/

.iti {
    width: 100%;
    display: block;
}


/* Phone input */

.iti input[type="tel"] {
    width: 100% !important;
    height: 52px !important;

    padding-left: 95px !important;
    padding-right: 15px !important;

    border: 1px solid rgba(255,255,255,.10) !important;

    border-radius: 13px !important;

    background: rgba(0,0,0,.25) !important;

    color: #fff !important;

    outline: none !important;

    font-family: inherit !important;
    font-size: 13px !important;
}


.iti input[type="tel"]:focus {
    border-color: rgba(96,165,250,.65) !important;

    background: rgba(0,0,0,.32) !important;

    box-shadow:
        0 0 0 3px rgba(59,130,246,.08) !important;
}


/* =========================================
   SELECTED COUNTRY
========================================= */

.iti__selected-country {
    background: rgba(255,255,255,.04) !important;

    border-radius: 12px 0 0 12px !important;
}


.iti__selected-country:hover {
    background: rgba(255,255,255,.08) !important;
}


.iti__selected-dial-code {
    color: rgba(255,255,255,.85) !important;

    font-size: 12px !important;
}


.iti__arrow {
    border-top-color:
        rgba(255,255,255,.45) !important;
}


/* =========================================
   DROPDOWN
========================================= */

/*
   DO NOT set:

   position
   width
   top
   left

   here.

   intl-tel-input calculates these.
*/

.iti__dropdown-content {

    z-index: 999999 !important;

    background: #0b1220 !important;

    border:
        1px solid
        rgba(255,255,255,.12) !important;

    border-radius: 12px !important;

    box-shadow:
        0 20px 50px
        rgba(0,0,0,.65) !important;

    overflow: hidden !important;
}


/* =========================================
   COUNTRY LIST
========================================= */

.iti__country-list {

    max-height: 280px !important;

    overflow-y: auto !important;

    overflow-x: hidden !important;

    background: #0b1220 !important;
}


/* =========================================
   SEARCH
========================================= */

.iti__search-input {

    width: calc(100% - 20px) !important;

    height: 42px !important;

    margin: 10px !important;

    padding: 0 12px !important;

    background: #111a2d !important;

    border:
        1px solid
        rgba(255,255,255,.12) !important;

    border-radius: 9px !important;

    color: #fff !important;

    outline: none !important;

    font-family: inherit !important;
}


.iti__search-input::placeholder {
    color: rgba(255,255,255,.35) !important;
}


/* =========================================
   COUNTRY
========================================= */

.iti__country {
    color: rgba(255,255,255,.85) !important;

    padding: 10px 12px !important;

    font-size: 12px !important;

    white-space: nowrap !important;
}


.iti__country:hover {
    background:
        rgba(59,130,246,.15) !important;
}


.iti__country--highlight {
    background:
        rgba(59,130,246,.18) !important;
}


.iti__country-name {
    color: rgba(255,255,255,.85) !important;
}


.iti__dial-code {
    color: rgba(255,255,255,.45) !important;
}


.iti__divider {
    border-bottom-color:
        rgba(255,255,255,.08) !important;
}


/* =========================================
   PASSWORD
========================================= */

.password-toggle {
    position: absolute;

    right: 14px;
    top: 50%;

    transform: translateY(-50%);

    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;

    background: transparent;

    color: rgba(255,255,255,.35);

    cursor: pointer;

    z-index: 5;
}


.password-toggle:hover {
    color: #fff;
}


/* =========================================
   TERMS
========================================= */

.terms {
    display: flex;

    align-items: flex-start;

    gap: 9px;

    margin:
        18px 0 20px;

    color:
        rgba(255,255,255,.45);

    font-size: 11px;

    line-height: 1.6;

    cursor: pointer;
}


.terms input {
    appearance: none;

    width: 17px;
    height: 17px;

    flex: 0 0 17px;

    margin-top: 1px;

    border:
        1px solid
        rgba(255,255,255,.20);

    border-radius: 5px;

    background:
        rgba(255,255,255,.04);

    cursor: pointer;

    position: relative;
}


.terms input:checked {
    background: #3b82f6;

    border-color: #3b82f6;
}


.terms input:checked::after {
    content: "✓";

    position: absolute;

    left: 3px;
    top: -2px;

    color: #fff;

    font-size: 12px;
    font-weight: 700;
}


.terms a {
    color: #60a5fa;

    text-decoration: none;

    font-weight: 600;
}


/* =========================================
   BUTTON
========================================= */

.register-btn {
    width: 100%;
    height: 54px;

    border: none;

    border-radius: 14px;

    background: #3b82f6;

    color: #fff;

    font-family: inherit;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}


.register-btn:hover {
    background: #4b8df8;

    transform: translateY(-2px);
}


.register-btn:active {
    transform: translateY(0);
}


.register-btn i {
    margin-left: 7px;

    font-size: 12px;
}


/* =========================================
   LOGIN
========================================= */

.login-text {
    text-align: center;

    margin-top: 22px;

    color:
        rgba(255,255,255,.43);

    font-size: 12px;
}


.login-text a {
    color: #60a5fa;

    text-decoration: none;

    font-weight: 700;

    margin-left: 4px;
}


/* =========================================
   ERROR
========================================= */

.error-message {
    display: none;

    margin-bottom: 15px;

    padding: 11px 13px;

    border-radius: 10px;

    background:
        rgba(239,68,68,.10);

    border:
        1px solid
        rgba(239,68,68,.25);

    color: #fca5a5;

    font-size: 11px;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .register-page {
        padding:
            20px 12px;
    }

    .register-card {
        padding:
            32px 22px;

        border-radius:
            23px;
    }

    .logo {
        width: 72px;
        height: 72px;
    }

    .logo img {
        width: 56px;
        height: 56px;
    }

    .register-header h1 {
        font-size: 27px;
    }

    .register-header p {
        font-size: 12px;
    }

    .iti input[type="tel"] {
        padding-left:
            88px !important;
    }

}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 360px) {

    .register-card {
        padding:
            28px 17px;
    }

    .iti input[type="tel"] {
        padding-left:
            86px !important;

        font-size:
            12px !important;
    }

}
/* =========================================
   USERNAME STATUS
========================================= */

.username-status {
    margin-top: 7px;
    font-size: 12px;
    font-weight: 600;
    min-height: 18px;
    transition: all 0.2s ease;
}

.username-status.checking {
    color: #999;
}

.username-status.available {
    color: #22c55e;
}

.username-status.taken {
    color: #ef4444;
}

.username-status.invalid {
    color: #ef4444;
}

/* =========================================================
   REGISTRATION ERROR
========================================================= */

.error-message {
    display: none;
    width: 100%;
    box-sizing: border-box;

    margin: 0 0 18px;

    padding: 12px 15px;

    border-radius: 10px;

    background: rgba(220, 53, 69, 0.10);

    border: 1px solid rgba(220, 53, 69, 0.25);

    color: #dc3545;

    font-size: 13px;
    font-weight: 500;

    line-height: 1.5;
}

.error-message.show {
    display: block;

    animation:
        registerErrorIn
        0.25s
        ease
        forwards;
}


@keyframes registerErrorIn {

    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================================================
   SUCCESS POPUP
========================================================= */

.register-success-popup {

    position: fixed;

    top: 25px;
    left: 50%;

    transform:
        translate(-50%, -25px);

    width: min(
        calc(100% - 40px),
        420px
    );

    box-sizing: border-box;

    display: flex;
    align-items: center;

    gap: 14px;

    padding: 16px 18px;

    border-radius: 14px;

    background: rgba(255, 255, 255, 0.97);

    border: 1px solid rgba(0, 0, 0, 0.08);

    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.18);

    opacity: 0;

    z-index: 99999;

    pointer-events: none;

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}


.register-success-popup.show {

    opacity: 1;

    transform:
        translate(-50%, 0);
}


/* Success icon */

.success-popup-icon {

    width: 42px;
    height: 42px;

    min-width: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #22c55e;

    color: #ffffff;

    font-size: 18px;

    box-shadow:
        0 6px 18px rgba(34, 197, 94, 0.25);
}


/* Text */

.success-popup-content {

    display: flex;
    flex-direction: column;

    gap: 3px;

    min-width: 0;
}


.success-popup-content strong {

    color: #111827;

    font-size: 15px;

    font-weight: 700;
}


.success-popup-content span {

    color: #6b7280;

    font-size: 13px;

    font-weight: 500;

    line-height: 1.4;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 480px) {

    .register-success-popup {

        top: 15px;

        width:
            calc(100% - 30px);

        padding: 14px 15px;

    }

    .success-popup-icon {

        width: 38px;
        height: 38px;

        min-width: 38px;

        font-size: 16px;

    }

}
