
/* =========================================================
   RASHT ENGLISH — SIGNATURE PROFILE EXPERIENCE
   Premium iOS-inspired glass interface
   Responsive / Light & Dark / Smooth interactions
========================================================= */


/* =========================================================
   01. DESIGN FOUNDATION
========================================================= */

.profile-card,
.profile-card *,
.glass-modal,
.glass-modal *,
.glass-confirm,
.glass-confirm *,
#glassNotification,
#glassNotification *,
#glassConfirm,
#glassConfirm * {
    box-sizing: border-box;
}

.profile-card {
    --profile-radius: 35px;
    --profile-border: color-mix(in srgb, var(--fg) 13%, transparent);
    --profile-surface: color-mix(in srgb, var(--c-glass) 27%, transparent);
    --profile-surface-hover: color-mix(in srgb, var(--c-glass) 42%, transparent);
    --profile-muted: color-mix(in srgb, var(--fg) 62%, transparent);
    --profile-accent: var(--c-action);
    --profile-danger: #ff626f;
    --profile-success: #35c98a;

    position: relative;
    isolation: isolate;
    overflow: hidden;

    width: min(1050px, calc(100% - 40px));
    margin: 35px auto 90px;
    padding: clamp(24px, 4vw, 45px);

    color: var(--fg);

    border: 1px solid var(--profile-border);
    border-radius: 35px;


    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    box-shadow: var(--box-shadow);

    animation: profileEntrance .8s cubic-bezier(.2,.8,.2,1) both;
}

.profile-card::before {
    content: "";
    position: absolute;
    z-index: -1;

    width: 420px;
    height: 420px;

    top: -260px;
    right: -170px;

    border-radius: 50%;

    background: color-mix(
        in srgb,
        var(--c-action) 13%,
        transparent
    );

    filter: blur(65px);
    pointer-events: none;
}

.profile-card::after {
    content: "";
    position: absolute;
    inset: 0;

    border-radius: inherit;

    background: linear-gradient(
        135deg,
        rgba(255,255,255,.13),
        transparent 28%,
        transparent 75%,
        rgba(255,255,255,.035)
    );

    pointer-events: none;
    z-index: -1;
}


/* =========================================================
   02. PAGE TITLE
========================================================= */

.page-title {
    width: fit-content;
    max-width: calc(100% - 30px);

    margin: 35px auto 0;
    padding: 12px 25px;

    color: var(--fg);

    font-size: clamp(27px, 4vw, 38px);
    font-weight: 800;
    letter-spacing: -.8px;

    text-align: center;

    animation: titleEntrance .7s ease both;
}


/* =========================================================
   03. PROFILE HEADER
========================================================= */

.profile-header {
    display: grid;

    grid-template-columns: 190px minmax(0, 1fr);
    grid-template-areas:
        "photo info"
        "delete account";

    align-items: center;
    column-gap: 32px;
    row-gap: 22px;

    width: 100%;
    padding: 5px 0 35px;

    border-bottom: 1px solid var(--profile-border);
}

.profile-photo {
    grid-area: photo;

    position: relative;

    width: 180px;
    height: 180px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto;

    overflow: hidden;
    flex-shrink: 0;

    border-radius: 50%;
    border: 3px solid color-mix(in srgb, var(--fg) 35%, transparent);

    background: var(--profile-surface);

    box-shadow: var(--box-shadow);

    cursor: pointer;

    transition:
        transform .45s cubic-bezier(.2,.8,.2,1),
        border-color .35s ease,
        box-shadow .35s ease;
}

.profile-photo:hover {
    transform: translateY(-4px) scale(1.025);
    border-color: var(--profile-accent);
}

.profile-photo:active {
    transform: scale(.97);
}

.profile-photo::before {
    content: "";
    position: absolute;
    inset: 7px;

    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;

    z-index: 4;
    pointer-events: none;
}

.profile-photo::after {
    content: "Change photo";

    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #fff;
    background: rgba(0,0,0,.48);

    font-size: 13px;
    font-weight: 700;

    opacity: 0;
    transition: opacity .3s ease;

    z-index: 5;
    pointer-events: none;
}

.profile-photo:hover::after {
    opacity: 1;
}

#profileImage {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    display: none;
    object-fit: cover;

    z-index: 2;
}

.profile-avatar {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--fg);

    font-size: 70px;

    background: var(--profile-surface);

    z-index: 1;
}

.profile-header-info {
    grid-area: info;
    min-width: 0;
    width: 100%;
}

.profile-header-info h2 {
    margin: 0;

    color: var(--fg);

    font-size: clamp(27px, 4vw, 38px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.2;

    overflow-wrap: anywhere;
}

#deletePhoto {
    grid-area: delete;

    justify-self: center;

    min-width: 145px;
    min-height: 43px;

    margin: 0;



    background: color-mix(
        in srgb,
        var(--profile-danger) 9%,
        transparent
    );

    border-color: color-mix(
        in srgb,
        var(--profile-danger) 25%,
        transparent
    );
}


/* =========================================================
   04. ACCOUNT INFORMATION
========================================================= */

.profile-account-info {
    grid-area: account;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    width: 100%;
    gap: 14px;

    min-width: 0;
}

.account-info-item {
    position: relative;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    justify-content: center;

    min-width: 0;
    min-height: 95px;

    gap: 10px;
    padding: 18px 20px;

    border: 1px solid var(--profile-border);
    border-radius: 35px;

    background: var(--profile-surface);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    box-shadow: var(--box-shadow);

    transition:
        transform .35s cubic-bezier(.2,.8,.2,1),
        background .3s ease,
        border-color .3s ease;
}

.account-info-item:hover {
    transform: translateY(-4px);
    background: var(--profile-surface-hover);
    border-color: color-mix(in srgb, var(--fg) 23%, transparent);
}

.account-info-item span {
    color: var(--profile-muted);

    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2px;
}

.account-info-item strong {
    color: var(--fg);

    font-size: 14px;
    font-weight: 750;
    line-height: 1.5;

    overflow-wrap: anywhere;
}


/* =========================================================
   05. PROFILE SECTIONS
========================================================= */

.profile-section {
    position: relative;

    width: 100%;
    padding: 35px 0;

    border-bottom: 1px solid var(--profile-border);
}

.profile-section:last-child {
    padding-bottom: 5px;
    border-bottom: none;
}

.profile-section > h2 {
    display: flex;
    align-items: center;
    gap: 12px;

    margin: 0 0 27px;

    color: var(--fg);

    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.4px;
}

.profile-section > h2 i {
    font-size: 19px;
    opacity: .8;
}


/* =========================================================
   06. PERSONAL INFORMATION GRID
========================================================= */

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 25px;
}

.profile-item {
    display: flex;
    flex-direction: column;

    min-width: 0;
    gap: 11px;
}

.profile-item label {
    display: block;

    color: var(--profile-muted);

    font-size: 13px;
    font-weight: 700;
    letter-spacing: .2px;
}


/* =========================================================
   07. INPUTS
========================================================= */

.profile-input {
    width: 100%;
    min-width: 0;
    min-height: 58px;

    margin: 0;
    padding: 15px 20px;

    color: var(--fg);

    font-family: inherit;
    font-size: 14px;
    font-weight: 550;

    border: 1px solid var(--profile-border);
    border-radius: 35px;

    outline: none;

    background: var(--profile-surface);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow: var(--box-shadow);

    transition:
        border-color .3s ease,
        background .3s ease,
        box-shadow .3s ease,
        transform .3s ease;
}

.profile-input:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--fg) 25%, transparent);
}

.profile-input:focus {
    border-color: color-mix(
        in srgb,
        var(--profile-accent) 75%,
        transparent
    );

    background: color-mix(
        in srgb,
        var(--c-glass) 40%,
        transparent
    );

    transform: translateY(-1px);
}

.profile-input:disabled {
    opacity: .78;
    cursor: default;
}

.profile-input::placeholder {
    color: var(--fg);
    opacity: .45;
}

.profile-input:focus-visible {
    outline: 2px solid color-mix(
        in srgb,
        var(--profile-accent) 35%,
        transparent
    );

    outline-offset: 3px;
}


/* =========================================================
   08. PASSWORD ROW
========================================================= */

.password-row {
    display: flex;
    align-items: center;

    width: 100%;
    min-width: 0;
    gap: 12px;
}

.password-row .profile-input {
    flex: 1;
    width: 0;
}

.small-btn {
    flex-shrink: 0;

    min-height: 58px;
    padding: 12px 20px;

    font-size: 13px;
}


/* =========================================================
   09. BUTTON SYSTEM
========================================================= */

.profile-btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    min-height: 52px;
    margin: 0;
    padding: 13px 23px;

    color: var(--fg);

    font-family: inherit;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .1px;

    border: 1px solid var(--profile-border);
    border-radius: 35px;

    background: var(--profile-surface);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow: var(--box-shadow);

    cursor: pointer;

    transition:
        transform .35s cubic-bezier(.2,.8,.2,1),
        background .3s ease,
        border-color .3s ease,
        opacity .3s ease;
}

.profile-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;

    background: linear-gradient(
        120deg,
        rgba(255,255,255,.13),
        transparent 55%
    );

    opacity: 0;
    transition: opacity .3s ease;
}

.profile-btn:hover {
    transform: translateY(-3px);
    background: var(--profile-surface-hover);
    border-color: color-mix(in srgb, var(--fg) 27%, transparent);
}

.profile-btn:hover::before {
    opacity: 1;
}

.profile-btn:active {
    transform: scale(.965);
}

.profile-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

.profile-btn i {
    font-size: 14px;
}

.profile-btn:focus-visible,
.modal-close:focus-visible,
.confirm-close:focus-visible,
.password-toggle:focus-visible {
    outline: 2px solid var(--profile-accent);
    outline-offset: 4px;
}


/* =========================================================
   10. PROFILE ACTIONS
========================================================= */

.profile-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 14px;
    margin-top: 30px;
}

.profile-actions .profile-btn {
    min-width: 175px;
}

#saveProfileBtn {
    background: color-mix(
        in srgb,
        var(--profile-success) 14%,
        transparent
    );

    border-color: color-mix(
        in srgb,
        var(--profile-success) 30%,
        transparent
    );
}


/* =========================================================
   11. LOGOUT
========================================================= */

.logout-btn {
    min-width: 150px;

    color: var(--profile-danger);

    background: color-mix(
        in srgb,
        var(--profile-danger) 9%,
        transparent
    );

    border-color: color-mix(
        in srgb,
        var(--profile-danger) 25%,
        transparent
    );
}

.logout-btn:hover {
    background: color-mix(
        in srgb,
        var(--profile-danger) 17%,
        transparent
    );

    border-color: color-mix(
        in srgb,
        var(--profile-danger) 40%,
        transparent
    );
}


/* =========================================================
   12. WEBSITE MESSAGES
========================================================= */

.messages-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;
    margin-bottom: 23px;
}

.messages-header h2 {
    display: flex;
    align-items: center;
    gap: 11px;

    margin: 0;

    color: var(--fg);

    font-size: 21px;
    font-weight: 800;
}

.messages-header h2 i {
    opacity: .8;
}

#clearMessages {
    min-height: 44px;
    padding: 10px 18px;

    font-size: 12px;

    flex-shrink: 0;
}

.message {
    position: relative;
    overflow: hidden;

    margin: 13px 0;
    padding: 20px 22px;

    color: var(--fg);

    font-size: 13px;
    line-height: 1.8;

    overflow-wrap: anywhere;

    border: 1px solid var(--profile-border);
    border-radius: 35px;

    background: var(--profile-surface);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow: var(--box-shadow);

    animation: messageEntrance .45s cubic-bezier(.2,.8,.2,1) both;
}

.message h4 {
    margin: 0 0 7px;

    color: var(--profile-muted);

    font-size: 11px;
    font-weight: 700;
}

.message p {
    margin: 0;
}

#messageBox {
    max-height: 380px;
    overflow-y: auto;

    padding: 5px 10px 5px 3px;

    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--fg) 30%, transparent) transparent;
}

#messageBox::-webkit-scrollbar {
    width: 5px;
}

#messageBox::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--fg) 30%, transparent);
    border-radius: 35px;
}

#messageBox::-webkit-scrollbar-track {
    background: transparent;
}


/* =========================================================
   13. SHARED MODAL BACKDROP
========================================================= */

.glass-modal,
.glass-confirm {
    position: fixed;
    inset: 0;

    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(8, 12, 22, .35);

    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .35s ease,
        visibility .35s ease;
}

.glass-modal.show,
.glass-confirm.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =========================================================
   14. PASSWORD MODAL — FIXED
========================================================= */

.glass-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, .35);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .3s ease,
        visibility .3s ease;
}

.glass-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Modal card */

.glass-modal-card {
    position: relative;

    width: min(460px, 100%);
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);

    overflow-y: auto;
    overscroll-behavior: contain;

    padding: 38px;

    color: var(--fg);

    border: 1px solid color-mix(in srgb, var(--fg) 20%, transparent);
    border-radius: 35px;

    background: color-mix(
        in srgb,
        var(--c-glass) 48%,
        transparent
    );

    backdrop-filter: blur(25px) saturate(150%);
    -webkit-backdrop-filter: blur(25px) saturate(150%);

    box-shadow: var(--box-shadow);

    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(.97);

    transition:
        opacity .28s ease,
        transform .32s cubic-bezier(.2, .8, .2, 1);
}

.glass-modal.show .glass-modal-card {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

/* Modal icon */

.modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 66px;
    height: 66px;

    margin-bottom: 24px;

    color: var(--fg);

    font-size: 24px;

    border: 1px solid var(--profile-border);
    border-radius: 35px;

    background: var(--profile-surface);

    box-shadow: var(--box-shadow);
}

/* Heading */

.glass-modal-card h2 {
    margin: 0 0 10px;

    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.5px;
}

/* Description */

.glass-modal-card > p {
    margin: 0 0 24px;

    color: var(--profile-muted);

    font-size: 13px;
    line-height: 1.8;
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
    .glass-modal,
    .glass-modal-card {
        transition: none;
    }

    .glass-modal-card {
        transform: none;
    }
}
/* Keep the close button in the top-left corner in both languages */
.glass-modal-card .modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    right: auto;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* Keep the modal icon centered */
.glass-modal-card .modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    margin-left: auto;
    margin-right: auto;

    flex-shrink: 0;
}

/* =========================================================
   15. MODAL CLOSE BUTTON
========================================================= */

.modal-close,
.confirm-close {
    position: absolute;
    top: 17px;
    right: 17px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 43px;
    height: 43px;

    color: var(--fg);

    border: 1px solid var(--profile-border);
    border-radius: 35px;

    background: var(--profile-surface);

    box-shadow: var(--box-shadow);

    cursor: pointer;

    transition:
        transform .35s ease,
        background .3s ease;
}

.modal-close:hover,
.confirm-close:hover {
    transform: rotate(90deg);
    background: var(--profile-surface-hover);
}


/* =========================================================
   16. PASSWORD FIELD
========================================================= */

.password-field {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 60px;

    gap: 12px;
    padding: 9px 13px;

    border: 1px solid var(--profile-border);
    border-radius: 35px;

    background: var(--profile-surface);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow: var(--box-shadow);

    transition: border-color .3s ease;
}

.password-field:focus-within {
    border-color: color-mix(
        in srgb,
        var(--profile-accent) 70%,
        transparent
    );
}

.password-field > i {
    color: var(--profile-muted);
    flex-shrink: 0;
}

.password-field input {
    flex: 1;
    min-width: 0;

    padding: 8px 0;

    color: var(--fg);

    font-family: inherit;
    font-size: 14px;

    border: none;
    outline: none;

    background: transparent;
}

.password-field input::placeholder {
    color: var(--fg);
    opacity: .45;
}

.password-toggle {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    color: var(--fg);

    border: 1px solid var(--profile-border);
    border-radius: 35px;

    background: var(--profile-surface);

    box-shadow: var(--box-shadow);

    cursor: pointer;

    transition: transform .3s ease;
}

.password-toggle:hover {
    transform: scale(1.06);
}

.password-error {
    min-height: 22px;

    margin: 12px 0;

    color: var(--profile-danger);

    font-size: 12px;
    line-height: 1.6;
}

#confirmPasswordBtn {
    width: 100%;
    margin-top: 12px;
}


/* =========================================================
   17. CONFIRMATION MODAL
========================================================= */

.glass-confirm {
    z-index: 100000;
}

.glass-confirm-card {
    position: relative;

    width: min(440px, 100%);
    max-height: calc(100dvh - 40px);

    overflow-y: auto;

    padding: 38px;

    color: var(--fg);
    text-align: center;

    border: 1px solid color-mix(in srgb, var(--fg) 20%, transparent);
    border-radius: 35px;

    background: color-mix(
        in srgb,
        var(--c-glass) 48%,
        transparent
    );

    backdrop-filter: blur(35px) saturate(165%);
    -webkit-backdrop-filter: blur(35px) saturate(165%);

    box-shadow: var(--box-shadow);

    opacity: 0;
    transform: translateY(25px) scale(.94);

    transition:
        opacity .4s cubic-bezier(.2,.8,.2,1),
        transform .45s cubic-bezier(.2,.8,.2,1);
}

.glass-confirm.show .glass-confirm-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.confirm-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 68px;
    height: 68px;

    margin: 0 auto 22px;

    color: var(--fg);
    font-size: 25px;

    border: 1px solid var(--profile-border);
    border-radius: 35px;

    background: var(--profile-surface);

    box-shadow: var(--box-shadow);
}

.glass-confirm-card h2 {
    margin: 0 0 12px;

    font-size: 23px;
    font-weight: 800;
}

.glass-confirm-card p {
    margin: 0 0 25px;

    color: var(--profile-muted);

    font-size: 13px;
    line-height: 1.8;
}

.confirm-buttons {
    display: flex;
    justify-content: center;

    gap: 12px;
}

.confirm-btn {
    flex: 1;

    min-height: 50px;
    padding: 12px 20px;

    color: var(--fg);

    font-family: inherit;
    font-size: 13px;
    font-weight: 750;

    border: 1px solid var(--profile-border);
    border-radius: 35px;

    background: var(--profile-surface);

    box-shadow: var(--box-shadow);

    cursor: pointer;

    transition:
        transform .3s ease,
        background .3s ease;
}

.confirm-btn:hover {
    transform: translateY(-2px);
    background: var(--profile-surface-hover);
}

.confirm-btn:active {
    transform: scale(.96);
}



/* =========================================================
   18. NOTIFICATIONS
========================================================= */

.glass-notification {
    position: fixed;
    top: 24px;
    right: 24px;

    z-index: 100001;

    display: flex;
    align-items: center;

    width: min(390px, calc(100% - 30px));
    min-height: 85px;

    gap: 14px;
    padding: 17px;

    color: var(--fg);

    border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent);
    border-radius: 35px;

    background: color-mix(
        in srgb,
        var(--c-glass) 50%,
        transparent
    );

    backdrop-filter: blur(30px) saturate(160%);
    -webkit-backdrop-filter: blur(30px) saturate(160%);

    box-shadow: var(--box-shadow);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(-18px) scale(.96);

    transition:
        opacity .35s ease,
        transform .4s cubic-bezier(.2,.8,.2,1),
        visibility .35s ease;
}

.glass-notification.show,
.glass-notification.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateY(0) scale(1);
}

.notification-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 47px;
    height: 47px;

    flex: 0 0 47px;

    color: var(--profile-success);

    border: 1px solid var(--profile-border);
    border-radius: 35px;

    background: var(--profile-surface);

    box-shadow: var(--box-shadow);
}

.notification-content {
    display: flex;
    flex-direction: column;

    flex: 1;
    min-width: 0;
    gap: 5px;
}

.notification-title {
    color: var(--fg);

    font-size: 14px;
    font-weight: 800;
}

.notification-message {
    color: var(--profile-muted);

    font-size: 11px;
    line-height: 1.6;

    overflow-wrap: anywhere;
}

.notification-close {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    flex-shrink: 0;

    color: var(--fg);

    border: 1px solid var(--profile-border);
    border-radius: 35px;

    background: var(--profile-surface);

    box-shadow: var(--box-shadow);

    cursor: pointer;

    transition:
        transform .3s ease,
        background .3s ease;
}

.notification-close:hover {
    transform: rotate(90deg);
    background: var(--profile-surface-hover);
}


/* =========================================================
   19. SCROLLBARS
========================================================= */

.glass-modal-card,
.glass-confirm-card {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--fg) 25%, transparent) transparent;
}

.glass-modal-card::-webkit-scrollbar,
.glass-confirm-card::-webkit-scrollbar {
    width: 5px;
}

.glass-modal-card::-webkit-scrollbar-thumb,
.glass-confirm-card::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--fg) 25%, transparent);
    border-radius: 35px;
}


/* =========================================================
   20. ANIMATIONS
========================================================= */

@keyframes profileEntrance {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes titleEntrance {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes messageEntrance {
    from {
        opacity: 0;
        transform: translateY(9px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   21. TABLET
========================================================= */

@media (max-width: 800px) {
    .profile-card {
        width: calc(100% - 30px);
        padding: 30px;
    }

    .profile-header {
        grid-template-columns: 165px minmax(0, 1fr);
        column-gap: 23px;
    }

    .profile-photo {
        width: 155px;
        height: 155px;
    }

    .profile-avatar {
        font-size: 60px;
    }

    .profile-grid {
        gap: 20px;
    }
}


/* =========================================================
   22. MOBILE
========================================================= */

@media (max-width: 600px) {
    .page-title {
        margin-top: 25px;
        font-size: 28px;
    }

    .profile-card {
        width: calc(100% - 22px);

        margin: 20px auto 55px;
        padding: 23px 18px;

        border-radius: 35px;
    }

    .profile-header {
        display: flex;
        flex-direction: column;
        align-items: center;

        gap: 17px;

        padding: 8px 0 28px;

        text-align: center;
    }

    .profile-photo {
        width: 145px;
        height: 145px;
    }

    .profile-avatar {
        font-size: 57px;
    }

    .profile-header-info {
        text-align: center;
    }

    .profile-header-info h2 {
        font-size: 27px;
    }

    #deletePhoto {
        min-width: 140px;
    }

    .profile-account-info {
        width: 100%;
        gap: 10px;
    }

    .account-info-item {
        min-height: 82px;
        padding: 14px 12px;
        border-radius: 35px;
        gap: 7px;
    }

    .account-info-item span {
        font-size: 10px;
    }

    .account-info-item strong {
        font-size: 11px;
    }

    .profile-section {
        padding: 27px 0;
    }

    .profile-section > h2 {
        margin-bottom: 21px;
        font-size: 20px;
    }

    .profile-grid {
        grid-template-columns: 1fr;
        gap: 19px;
    }

    .profile-item label {
        font-size: 12px;
    }

    .profile-input {
        min-height: 55px;
        padding: 13px 17px;
        font-size: 13px;
    }

    .password-row .small-btn {
        min-height: 55px;
    }

    .profile-actions {
        flex-direction: column;
        gap: 11px;
        margin-top: 25px;
    }

    .profile-actions .profile-btn {
        width: 100%;
    }

    .messages-header {
        gap: 10px;
    }

    .messages-header h2 {
        font-size: 17px;
    }

    #clearMessages {
        min-height: 41px;
        padding: 9px 13px;
        font-size: 11px;
    }

    .message {
        padding: 16px 17px;
        font-size: 12px;
    }

    .glass-modal,
    .glass-confirm {
        padding: 15px;
    }

    .glass-modal-card,
    .glass-confirm-card {
        padding: 30px 22px;
        border-radius: 35px;
    }

    .glass-modal-card h2,
    .glass-confirm-card h2 {
        font-size: 22px;
    }

    .confirm-buttons {
        flex-direction: column;
    }

    .confirm-btn {
        width: 100%;
        flex: auto;
    }

    .glass-notification {
        top: 12px;
        right: 12px;
        width: calc(100% - 24px);
        padding: 14px;
    }
}


/* =========================================================
   23. SMALL MOBILE
========================================================= */

@media (max-width: 380px) {
    .profile-card {
        padding: 19px 13px;
    }

    .profile-account-info {
        grid-template-columns: 1fr;
    }

    .account-info-item {
        min-height: 70px;
        padding: 14px 17px;
    }

    .account-info-item span {
        font-size: 11px;
    }

    .account-info-item strong {
        font-size: 12px;
    }

    .profile-photo {
        width: 125px;
        height: 125px;
    }

    .profile-header-info h2 {
        font-size: 24px;
    }

    .password-row {
        flex-wrap: wrap;
    }

    .password-row .profile-input {
        flex: 1 1 100%;
        width: 100%;
    }

    .password-row .small-btn {
        width: 100%;
    }

    .messages-header {
        align-items: flex-start;
    }

    #clearMessages {
        align-self: center;
    }

    .glass-notification {
        gap: 10px;
    }
}


/* =========================================================
   24. REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
    .profile-card,
    .page-title,
    .message {
        animation: none !important;
    }

    .profile-card *,
    .profile-card *::before,
    .profile-card *::after,
    .glass-modal,
    .glass-modal *,
    .glass-confirm,
    .glass-confirm *,
    .glass-notification {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* =====================================================
   RASHT ENGLISH — LIQUID GLASS ANIMATION SYSTEM
   Water Drop / Smooth Motion / iOS Inspired
===================================================== */


/* =====================================================
   01. ANIMATION VARIABLES
===================================================== */

:root {
    --motion-smooth: cubic-bezier(.22, 1, .36, 1);
    --motion-drop: cubic-bezier(.16, 1.35, .35, 1);
    --motion-soft: cubic-bezier(.4, 0, .2, 1);
}


/* =====================================================
   02. PROFILE CARD ENTRANCE
===================================================== */

.profile-card {
    animation: profileEnter 1s var(--motion-smooth) both;
    transform-origin: center top;
}

@keyframes profileEnter {
    0% {
        opacity: 0;
        transform: translateY(45px) scale(.96);
        filter: blur(12px);
    }

    65% {
        opacity: 1;
        filter: blur(0);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}


/* =====================================================
   03. PROFILE HEADER
===================================================== */

.profile-header {
    animation: headerDrop .9s var(--motion-drop) .12s both;
}

@keyframes headerDrop {
    0% {
        opacity: 0;
        transform: translateY(-25px) scale(.94);
    }

    70% {
        opacity: 1;
        transform: translateY(4px) scale(1.015);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =====================================================
   04. WATER DROP PHOTO
===================================================== */

.profile-photo {
    transform-origin: center;
    animation: photoDrop 1.1s var(--motion-drop) .2s both;
    will-change: transform;
}

@keyframes photoDrop {
    0% {
        opacity: 0;
        transform: scale(.55);
        filter: blur(10px);
    }

    65% {
        opacity: 1;
        transform: scale(1.08);
        filter: blur(0);
    }

    82% {
        transform: scale(.97);
    }

    100% {
        transform: scale(1);
    }
}

.profile-photo::before {
    content: "";
    position: absolute;
    inset: -100%;

    background: linear-gradient(
        115deg,
        transparent 40%,
        rgba(255,255,255,.28) 50%,
        transparent 60%
    );

    transform: translateX(-100%) rotate(25deg);
    pointer-events: none;
    z-index: 2;
    transition: transform 1s var(--motion-smooth);
}

.profile-photo:hover::before {
    transform: translateX(100%) rotate(25deg);
}

.profile-photo:hover {
    transform: scale(1.06) rotate(2deg);
}


/* =====================================================
   05. ACCOUNT INFO — CASCADE
===================================================== */

.account-info-item {
    animation: infoDrop .8s var(--motion-drop) both;
    transition:
        transform .4s var(--motion-smooth),
        background .4s ease;
}

.account-info-item:nth-child(1) {
    animation-delay: .25s;
}

.account-info-item:nth-child(2) {
    animation-delay: .38s;
}

@keyframes infoDrop {
    0% {
        opacity: 0;
        transform: translateY(22px) scale(.92);
        filter: blur(5px);
    }

    75% {
        opacity: 1;
        transform: translateY(-3px) scale(1.02);
        filter: blur(0);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.account-info-item:hover {
    transform: translateY(-5px);
}


/* =====================================================
   06. PROFILE SECTIONS
===================================================== */

.profile-section {
    animation: sectionEnter .8s var(--motion-smooth) both;
}

.profile-section:nth-of-type(1) {
    animation-delay: .2s;
}

.profile-section:nth-of-type(2) {
    animation-delay: .35s;
}

.profile-section:nth-of-type(3) {
    animation-delay: .5s;
}

@keyframes sectionEnter {
    from {
        opacity: 0;
        transform: translateY(25px);
        filter: blur(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}


/* =====================================================
   07. INPUT FOCUS — LIQUID FEEL
===================================================== */

.profile-input {
    transition:
        transform .4s var(--motion-smooth),
        background .4s ease,
        box-shadow .4s ease,
        border-color .4s ease;
}

.profile-input:focus {
    outline: none;
    transform: scale(1.015);

    background: color-mix(
        in srgb,
        var(--c-glass) 35%,
        transparent
    );

    box-shadow:
        0 0 0 3px color-mix(
            in srgb,
            var(--c-action) 20%,
            transparent
        );
}

.profile-item:focus-within label {
    transition: color .3s ease;
    color: var(--c-action);
}


/* =====================================================
   08. BUTTON WATER RIPPLE
===================================================== */

.profile-btn,
.password-toggle,
.modal-close {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.profile-btn::after {
    content: "";
    position: absolute;

    width: 10px;
    height: 10px;

    left: 50%;
    top: 50%;

    border-radius: 50%;

    background: rgba(255,255,255,.3);

    transform: translate(-50%, -50%) scale(0);
    opacity: 0;

    pointer-events: none;
}

.profile-btn:active::after {
    animation: buttonRipple .65s ease-out;
}

@keyframes buttonRipple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: .8;
    }

    100% {
        transform: translate(-50%, -50%) scale(22);
        opacity: 0;
    }
}

.profile-btn {
    transition:
        transform .35s var(--motion-smooth),
        background .35s ease,
        filter .35s ease;
}

.profile-btn:hover {
    filter: brightness(1.12);
}

.profile-btn:active {
    transform: scale(.95);
}


/* =====================================================
   09. PASSWORD MODAL — WATER DROP POPUP
===================================================== */

.glass-modal {
    transition:
        opacity .4s ease,
        backdrop-filter .5s ease;
}

.glass-modal.show {
    animation: backdropAppear .45s ease both;
}

@keyframes backdropAppear {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }

    to {
        opacity: 1;
        backdrop-filter: blur(20px) saturate(140%);
    }
}

.glass-modal-card {
    transform-origin: center;

    animation:
        waterDropOpen .75s var(--motion-drop) both;
}

@keyframes waterDropOpen {
    0% {
        opacity: 0;
        transform:
            translateY(-45px)
            scale(.72, .82);
        filter: blur(12px);
    }

    55% {
        opacity: 1;
        transform:
            translateY(8px)
            scale(1.045, .96);
        filter: blur(0);
    }

    72% {
        transform:
            translateY(-4px)
            scale(.98, 1.025);
    }

    88% {
        transform:
            translateY(2px)
            scale(1.01, .99);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}


/* =====================================================
   10. MODAL LIGHT REFLECTION
===================================================== */

.glass-modal-card::before {
    content: "";
    position: absolute;
    inset: 0;

    border-radius: inherit;

    background: linear-gradient(
        135deg,
        rgba(255,255,255,.18),
        transparent 35%,
        transparent 70%,
        rgba(255,255,255,.06)
    );

    opacity: .65;
    pointer-events: none;
}


/* =====================================================
   11. MODAL ICON DROP
===================================================== */

.modal-icon {
    animation: iconDrop .8s var(--motion-drop) .15s both;
}

@keyframes iconDrop {
    0% {
        opacity: 0;
        transform: scale(.3) rotate(-20deg);
    }

    70% {
        opacity: 1;
        transform: scale(1.15) rotate(5deg);
    }

    100% {
        transform: scale(1) rotate(0);
    }
}


/* =====================================================
   12. MODAL CLOSE BUTTON
===================================================== */

.modal-close {
    transition:
        transform .4s var(--motion-drop),
        background .3s ease;
}

.modal-close:hover {
    transform: rotate(90deg) scale(1.12);
}


/* =====================================================
   13. PASSWORD FIELD ANIMATION
===================================================== */

.password-field {
    transition:
        transform .4s var(--motion-smooth),
        background .4s ease,
        border-color .4s ease;
}

.password-field:focus-within {
    transform: scale(1.015);
}

.password-toggle {
    transition:
        transform .35s var(--motion-drop),
        background .3s ease;
}

.password-toggle:hover {
    transform: scale(1.1) rotate(-5deg);
}


/* =====================================================
   14. ERROR MESSAGE APPEARANCE
===================================================== */

.password-error:not(:empty) {
    animation: errorAppear .4s var(--motion-drop) both;
}

@keyframes errorAppear {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =====================================================
   15. DELETE PHOTO / LOGOUT
===================================================== */

#deletePhoto:hover {
    transform: translateY(-3px) scale(1.04);
}

.logout-btn:hover {
    filter: brightness(1.15);
}


/* =====================================================
   16. SOFT GLASS HIGHLIGHT
===================================================== */

.profile-card {
    position: relative;
    isolation: isolate;
}

.profile-card::before {
    content: "";
    position: absolute;
    inset: 0;

    border-radius: inherit;

    background: linear-gradient(
        125deg,
        rgba(255,255,255,.07),
        transparent 35%,
        transparent 70%,
        rgba(255,255,255,.035)
    );

    pointer-events: none;
    z-index: -1;
}


/* =====================================================
   17. NOTIFICATION POPUP
===================================================== */

#glassNotification {
    transform-origin: center bottom;
}

#glassNotification.show {
    animation: notificationDrop .65s var(--motion-drop) both;
}

@keyframes notificationDrop {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(.8);
        filter: blur(8px);
    }

    65% {
        opacity: 1;
        transform: translateY(-5px) scale(1.035);
        filter: blur(0);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =====================================================
   18. CONFIRMATION POPUP
===================================================== */

#glassConfirm.show .glass-confirm-card {
    animation: waterDropOpen .7s var(--motion-drop) both;
}


/* =====================================================
   19. REDUCED MOTION
===================================================== */

@media (prefers-reduced-motion: reduce) {
    .profile-card,
    .profile-header,
    .profile-photo,
    .account-info-item,
    .profile-section,
    .glass-modal-card,
    .modal-icon,
    #glassNotification.show,
    #glassConfirm.show .glass-confirm-card {
        animation: none !important;
        filter: none !important;
        transform: none !important;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
.glass-modal {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .3s ease,
        visibility .3s ease;
}

.glass-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.glass-modal-card {
    opacity: 0;
    transform: translateY(28px) scale(.94);

    transition:
        opacity .4s ease,
        transform .4s cubic-bezier(.16, 1, .3, 1);

    will-change: opacity, transform;
}

.glass-modal.show .glass-modal-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}