
/* =========================================================
   REGISTER PAGE — CINEMATIC / PREMIUM DESIGN
   Rohullah Sadat | Accounts App
========================================================= */

.account-section {
    --reg-bg: #080d1a;
    --reg-surface: rgba(17, 25, 45, 0.82);
    --reg-surface-light: rgba(255, 255, 255, 0.055);
    --reg-border: rgba(148, 163, 184, 0.16);
    --reg-text: #f1f5f9;
    --reg-muted: #94a3b8;
    --reg-primary: #6366f1;
    --reg-secondary: #06b6d4;
    --reg-danger: #fb7185;
    --reg-radius: 24px;

    position: relative;
    isolation: isolate;
    min-height: 760px;
    padding: 90px 22px 110px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 15% 15%, rgba(99, 102, 241, .17), transparent 38%),
        radial-gradient(ellipse at 85% 80%, rgba(6, 182, 212, .12), transparent 36%),
        var(--reg-bg);
    color: var(--reg-text);
}

.account-section::before,
.account-section::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(110px);
    pointer-events: none;
    opacity: .25;
}

.account-section::before {
    top: -180px;
    left: -160px;
    background: #6366f1;
}

.account-section::after {
    right: -180px;
    bottom: -180px;
    background: #06b6d4;
}

.account-container {
    width: min(100%, 1180px);
    margin-inline: auto;
}

.register-page {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.register-card {
    width: min(100%, 540px);
    position: relative;
    padding: 46px;
    border: 1px solid var(--reg-border);
    border-radius: var(--reg-radius);
    background: var(--reg-surface);
    box-shadow:
        0 30px 90px rgba(0, 0, 0, .38),
        inset 0 1px 0 rgba(255, 255, 255, .07);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    animation: registerCardEnter .7s cubic-bezier(.2, .8, .2, 1) both;
}

.register-card::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 15%;
    right: 15%;
    height: 2px;
    border-radius: 50%;
    background: linear-gradient(
        90deg,
        transparent,
        var(--reg-primary),
        var(--reg-secondary),
        transparent
    );
    opacity: .9;
}

.register-header {
    text-align: center;
    margin-bottom: 36px;
}

.register-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    margin: 0 auto 22px;
    border-radius: 23px;
    color: #fff;
    font-size: 27px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #06b6d4);
    box-shadow:
        0 12px 35px rgba(99, 102, 241, .35),
        inset 0 1px 0 rgba(255, 255, 255, .3);
}

.register-header h1 {
    margin: 0 0 12px;
    color: var(--reg-text);
    font-size: clamp(25px, 4vw, 32px);
    font-weight: 800;
    letter-spacing: -.8px;
    line-height: 1.3;
}

.register-header p {
    max-width: 370px;
    margin: 0 auto;
    color: var(--reg-muted);
    font-size: 14px;
    line-height: 1.9;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 21px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.form-group {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.form-group label {
    color: #dbeafe;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: .15px;
}

.form-group input {
    width: 100%;
    min-width: 0;
    height: 53px;
    padding: 0 16px;
    border: 1px solid var(--reg-border);
    border-radius: 13px;
    outline: none;
    background: rgba(255, 255, 255, .045);
    color: var(--reg-text);
    font-family: inherit;
    font-size: 14px;
    transition:
        border-color .25s ease,
        background .25s ease,
        box-shadow .25s ease,
        transform .25s ease;
}

.form-group input::placeholder {
    color: #64748b;
}

.form-group input:hover {
    border-color: rgba(129, 140, 248, .45);
    background: rgba(255, 255, 255, .065);
}

.form-group input:focus {
    border-color: var(--reg-primary);
    background: rgba(99, 102, 241, .075);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .14);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper > i:first-child {
    position: absolute;
    inset-inline-start: 16px;
    z-index: 2;
    color: #818cf8;
    font-size: 15px;
    pointer-events: none;
}

.input-wrapper input {
    padding-inline-start: 45px;
    padding-inline-end: 45px;
}

.password-toggle {
    position: absolute;
    inset-inline-end: 12px;
    z-index: 3;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: color .2s ease, background .2s ease;
}

.password-toggle:hover {
    color: #c4b5fd;
    background: rgba(129, 140, 248, .12);
}

.field-error {
    color: var(--reg-danger);
    font-size: 12px;
    line-height: 1.6;
}

.form-errors {
    padding: 13px 16px;
    border: 1px solid rgba(251, 113, 133, .25);
    border-radius: 12px;
    background: rgba(251, 113, 133, .08);
    color: #fda4af;
    font-size: 13px;
    line-height: 1.8;
}

.register-submit {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 7px;
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(110deg, #4f46e5, #7c3aed 52%, #0891b2);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(79, 70, 229, .25);
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

.register-submit::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    transform: translateX(-110%);
    background: linear-gradient(
        100deg,
        transparent,
        rgba(255, 255, 255, .2),
        transparent
    );
    transition: transform .65s ease;
}

.register-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 17px 35px rgba(79, 70, 229, .36);
    filter: saturate(1.15);
}

.register-submit:hover::before {
    transform: translateX(110%);
}

.register-submit:active {
    transform: translateY(-1px) scale(.99);
}

.register-submit i {
    font-size: 14px;
    transition: transform .25s ease;
}

.register-submit:hover i {
    transform: translateX(4px);
}

html[dir="rtl"] .register-submit:hover i {
    transform: translateX(-4px);
}

.register-footer {
    margin-top: 29px;
    padding-top: 22px;
    border-top: 1px solid var(--reg-border);
    text-align: center;
}

.register-footer p {
    margin: 0;
    color: var(--reg-muted);
    font-size: 13px;
    line-height: 1.8;
}

.register-footer a {
    margin-inline-start: 5px;
    color: #a5b4fc;
    font-weight: 750;
    text-decoration: none;
    transition: color .2s ease;
}

.register-footer a:hover {
    color: #67e8f9;
}

/* Accessibility */

.register-form input:focus-visible,
.register-submit:focus-visible,
.password-toggle:focus-visible,
.register-footer a:focus-visible {
    outline: 2px solid #67e8f9;
    outline-offset: 3px;
}

/* Animation */

@keyframes registerCardEnter {
    from {
        opacity: 0;
        transform: translateY(24px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive */

@media (max-width: 600px) {
    .account-section {
        min-height: auto;
        padding: 55px 15px 75px;
    }

    .register-card {
        padding: 32px 23px;
        border-radius: 20px;
    }

    .register-header {
        margin-bottom: 29px;
    }

    .register-icon {
        width: 66px;
        height: 66px;
        border-radius: 20px;
        font-size: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 21px;
    }

    .register-form {
        gap: 19px;
    }
}

@media (max-width: 380px) {
    .account-section {
        padding-inline: 11px;
    }

    .register-card {
        padding: 27px 17px;
    }

    .register-header h1 {
        font-size: 25px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .register-card {
        animation: none;
    }

    .register-card *,
    .register-card *::before,
    .register-card *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
