@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent
}

html {
    overflow: hidden;
    height: 100%;
    width: 100%;
    position: fixed;
    overscroll-behavior: none
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: #0a0a0f;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior: none;
    overflow: hidden;
    height: 100dvh;
    width: 100vw;
    -webkit-user-select: none;
    user-select: none;
    position: fixed;
    inset: 0;
    color: #e8e8f0
}

input,
textarea {
    -webkit-user-select: text;
    user-select: text;
    color: #e8e8f0
}

*:focus {
    outline: none
}

::selection {
    background: rgba(124, 92, 252, .35);
    color: #fff
}

button,
a,
div,
[onclick] {
    -webkit-tap-highlight-color: transparent;
    outline: none
}

/* ===== APP SHELL ===== */
.app {
    width: 100%;
    height: 100dvh;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #0a0a12 0%, #12121e 40%, #0d0d18 100%)
}

.view {
    position: absolute;
    inset: 0;
    bottom: 54px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    overflow-y: auto;
    overflow-x: hidden
}

.view.active {
    opacity: 1;
    pointer-events: auto
}

.view::-webkit-scrollbar {
    display: none
}

/* ===== BOTTOM BAR ===== */
.bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 54px;
    background: rgba(14, 14, 22, .92);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, .05);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 50
}

.tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    padding: 6px 22px;
    border: none;
    background: none;
    position: relative;
    transition: transform .15s
}

.tab-btn:active {
    transform: scale(.92)
}

.tab-btn svg {
    color: rgba(255, 255, 255, .3);
    transition: color .2s
}

.tab-btn span {
    font-size: 9px;
    font-weight: 500;
    color: rgba(255, 255, 255, .3);
    transition: color .2s
}

.tab-btn.active svg {
    color: #a78bfa
}

.tab-btn.active span {
    color: #a78bfa;
    font-weight: 600
}

.tab-btn.active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, #a78bfa, #7c5cfc);
    border-radius: 0 0 3px 3px
}

/* ===== HEADER ===== */
.header {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px
}

.header-title {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #e0d4ff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

/* ===== EMPTY STATE ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center
}

.empty-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(167, 139, 250, .1);
    border: 1px solid rgba(167, 139, 250, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px
}

.empty-icon svg {
    stroke: #a78bfa
}

.empty-title {
    font-size: 13px;
    font-weight: 600;
    color: #d4d0e8;
    margin-bottom: 4px
}

.empty-desc {
    font-size: 10px;
    color: rgba(255, 255, 255, .35);
    line-height: 1.6
}

/* ===== SEARCH ===== */
.search-section {
    position: relative
}

.search-bar {
    margin: 0 14px 6px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: border-color .2s, background .2s
}

.search-bar:focus-within {
    border-color: rgba(167, 139, 250, .3);
    background: rgba(167, 139, 250, .06)
}

.search-bar input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 12px;
    color: #e8e8f0;
    width: 100%;
    font-family: inherit
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, .25)
}

.search-results {
    position: absolute;
    left: 14px;
    right: 14px;
    top: 100%;
    background: rgba(20, 20, 32, .98);
    backdrop-filter: blur(20px);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 0 0 12px 12px;
    overflow: hidden
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background .15s
}

.search-result-item:active {
    background: rgba(167, 139, 250, .08)
}

/* ===== SETTINGS ===== */
.s-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background .15s;
    border-radius: 10px;
    margin: 0 8px
}

.s-item:active {
    background: rgba(255, 255, 255, .04)
}

.s-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(167, 139, 250, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0
}

.s-icon svg {
    stroke: #a78bfa !important
}

.divider {
    height: 1px;
    background: rgba(255, 255, 255, .04);
    margin: 4px 16px
}

/* ===== PROFILE / BANNER ===== */
.banner {
    height: 195px;
    position: relative;
    background: linear-gradient(135deg, #1a1033, #2c1654, #1a1033);
    background-size: cover;
    background-position: center;
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%)
}

.banner::after {
    content: '';
    position: absolute;
    inset: 0;
    display: none;
}

.profile-ava {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    border: 3px solid #0a0a0f;
    background: linear-gradient(135deg, #2c1654, #4c1d95);
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #d4bfff;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 20px rgba(124, 92, 252, .3);
    z-index: 5
}

.banner+div {
    padding-top: 0 !important
}

/* Removed spinning border */

.info-section {
    margin: 0 16px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 14px;
    padding: 2px 0;
    overflow: hidden
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .04)
}

.info-row:last-child {
    border-bottom: none
}

.info-label {
    font-size: 9px;
    color: rgba(255, 255, 255, .3);
    font-weight: 500;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: .3px
}

.info-value {
    font-size: 12px;
    color: #d4d0e8;
    font-weight: 500
}

.emoji-preview {
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
}

/* ===== CHAT VIEW ===== */
.chat-view {
    position: absolute;
    inset: 0;
    background: #0a0a12;
    z-index: 60;
    transform: translateX(100%);
    transition: transform .25s cubic-bezier(.4, 0, .2, 1);
    overscroll-behavior: none;
    touch-action: manipulation
}

.chat-view.open {
    transform: translateX(0)
}

.chat-header {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    background: rgba(14, 14, 22, .95);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 5;
    flex-shrink: 0
}

.chat-header button svg {
    stroke: #a78bfa
}

/* ===== MESSAGES ===== */
.messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: linear-gradient(180deg, rgba(14, 14, 22, .6), rgba(10, 10, 15, .9));
    padding-bottom: 16px
}

.msg-emoji-only {
    font-size: 44px;
    line-height: normal;
}

.messages-area::-webkit-scrollbar {
    display: none
}

.msg-container {
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform .15s ease-out;
    touch-action: pan-y
}

.msg {
    max-width: 72%;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 12.5px;
    line-height: 1.5;
    word-break: break-word;
    -webkit-user-select: text;
    user-select: text;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    position: relative;
    z-index: 1;
}

.msg-out {
    background: linear-gradient(135deg, #7c5cfc, #6d28d9);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    margin-right: 4px;
}

.msg-out::before {
    content: "";
    position: absolute;
    bottom: 0;
    right: -6px;
    width: 12px;
    height: 12px;
    background: #6d28d9;
    border-bottom-left-radius: 10px;
    z-index: -1;
    clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.msg-in {
    background: rgba(40, 40, 50, .9);
    color: #e8e8f0;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .06);
    margin-left: 4px;
}

.msg-in::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: -6px;
    width: 12px;
    height: 12px;
    background: rgba(40, 40, 50, .9);
    border-bottom-right-radius: 10px;
    z-index: -1;
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

.msg-time {
    font-size: 8px;
    opacity: .4;
    margin-top: 1px;
    display: flex;
    align-items: center;
    gap: 3px;
    color: #a0a0b0
}

.msg-status {
    display: inline-flex;
    align-items: center
}

.msg-status svg {
    width: 10px;
    height: 10px
}

.msg-status.read svg {
    color: #a78bfa
}

/* ===== INPUT BAR ===== */
.input-bar {
    padding: 6px 10px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, .05);
    background: rgba(14, 14, 22, .95);
    backdrop-filter: blur(20px);
    flex-shrink: 0
}

.input-wrap {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 24px;
    padding: 2px 3px 2px 0;
    transition: border-color .2s
}

.input-wrap:focus-within {
    border-color: rgba(167, 139, 250, .25)
}

.input-bar input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 8px 14px;
    font-size: 12px;
    font-family: inherit;
    color: #e8e8f0
}

.input-bar input::placeholder {
    color: rgba(255, 255, 255, .25)
}

.send-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c5cfc, #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: opacity .15s, transform .15s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(124, 92, 252, .35)
}

.send-btn:active {
    transform: scale(.9)
}

.send-btn.off {
    opacity: .15;
    pointer-events: none
}

/* ===== EMOJI BUTTON ===== */
.emoji-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    flex-shrink: 0;
    font-size: 18px;
    transition: transform .15s;
    opacity: .6
}

.emoji-btn:hover {
    opacity: 1
}

.emoji-btn:active {
    transform: scale(.85)
}

/* ===== EMOJI PICKER ===== */
.emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: rgba(18, 18, 30, .98);
    backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, .06);
    border-radius: 16px 16px 0 0;
    max-height: 260px;
    overflow: hidden;
    transform: translateY(100%);
    opacity: 0;
    transition: transform .25s cubic-bezier(.4, 0, .2, 1), opacity .2s;
    pointer-events: none;
    z-index: 10
}

.emoji-picker.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto
}

.emoji-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .05)
}

.emoji-picker-header span {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, .5)
}

.emoji-picker-close {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, .4);
    font-size: 18px;
    padding: 2px 6px
}

.emoji-tabs {
    display: flex;
    padding: 6px 10px 4px;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch
}

.emoji-tabs::-webkit-scrollbar {
    display: none
}

.emoji-tab {
    padding: 4px 10px;
    border: none;
    background: rgba(255, 255, 255, .05);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s, transform .1s
}

.emoji-tab.active {
    background: rgba(167, 139, 250, .2)
}

.emoji-tab:active {
    transform: scale(.9)
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    padding: 6px 10px 14px;
    overflow-y: auto;
    max-height: 180px
}

.emoji-grid::-webkit-scrollbar {
    display: none
}

.emoji-grid span {
    font-size: 22px;
    text-align: center;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background .1s, transform .1s;
    -webkit-user-select: none;
    user-select: none
}

.emoji-grid span:active {
    background: rgba(167, 139, 250, .15);
    transform: scale(1.15)
}

/* ===== CHAT LIST ===== */
.chat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background .15s;
    border-radius: 12px;
    margin: 2px 8px
}

.chat-item:active {
    background: rgba(167, 139, 250, .06)
}

.ava-sm {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    background: linear-gradient(135deg, #2c1654, #4c1d95);
    color: #d4bfff
}

.dot-online {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #4ade80;
    border: 2.5px solid #0a0a12;
    position: absolute;
    bottom: 0;
    right: 0;
    box-shadow: 0 0 6px rgba(74, 222, 128, .5)
}

.badge {
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, #7c5cfc, #a78bfa);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 8px rgba(124, 92, 252, .3)
}

/* ===== MODALS ===== */
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(8px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto
}

.modal-tap-zone {
    flex: 1;
    min-height: 0;
    cursor: pointer
}

.modal-sheet {
    width: 100%;
    max-height: 85%;
    background: rgba(18, 18, 30, .98);
    border: 1px solid rgba(255, 255, 255, .06);
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: max(14px, env(safe-area-inset-bottom))
}

.modal-overlay.open .modal-sheet {
    transform: translateY(0)
}

.modal-sheet::-webkit-scrollbar {
    display: none
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    position: sticky;
    top: 0;
    background: rgba(18, 18, 30, .98);
    z-index: 2
}

.modal-header span {
    font-size: 13px;
    font-weight: 600;
    color: #d4d0e8
}

/* ===== EDIT FIELDS ===== */
.edit-field {
    padding: 6px 16px
}

.edit-field label {
    display: block;
    font-size: 9px;
    color: rgba(255, 255, 255, .35);
    font-weight: 500;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .3px
}

.edit-field input,
.edit-field textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    font-family: inherit;
    outline: none;
    transition: border .2s, background .2s;
    resize: none;
    background: rgba(255, 255, 255, .04);
    color: #e8e8f0
}

.edit-field input:focus,
.edit-field textarea:focus {
    border-color: rgba(167, 139, 250, .4);
    background: rgba(167, 139, 250, .06)
}

.edit-field .field-error {
    font-size: 8px;
    color: #f87171;
    margin-top: 3px;
    min-height: 10px
}

.upload-zone {
    border: 1.5px dashed rgba(255, 255, 255, .12);
    border-radius: 10px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s
}

.upload-zone:hover {
    border-color: rgba(167, 139, 250, .3);
    background: rgba(167, 139, 250, .04)
}

.upload-zone p {
    font-size: 9px;
    color: rgba(255, 255, 255, .3);
    margin-top: 4px
}

.emoji-preview {
    width: 21px;
    height: 21px;
    display: inline-block;
    vertical-align: middle
}

.btn-sm {
    padding: 5px 14px;
    border-radius: 8px;
    border: none;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: opacity .15s, transform .1s
}

.btn-sm:active {
    opacity: .7;
    transform: scale(.95)
}

.btn-black {
    background: linear-gradient(135deg, #7c5cfc, #6d28d9);
    color: #fff
}

.btn-ghost {
    background: transparent;
    color: #a0a0b0
}

.profile-name-row {
    display: inline-block;
    position: relative
}

.profile-name-row .emoji-preview {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-60%);
    margin-left: 3px
}

/* ===== EMOJI MODAL ===== */
.emoji-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px)
}

.emoji-modal-overlay.open {
    opacity: 1;
    pointer-events: auto
}

.emoji-modal-card {
    background: rgba(24, 24, 38, .95);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    padding: 24px;
    width: 230px;
    transform: scale(.85);
    opacity: 0;
    transition: transform .3s cubic-bezier(.4, 0, .2, 1), opacity .25s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .4)
}

.emoji-modal-overlay.open .emoji-modal-card {
    transform: scale(1);
    opacity: 1
}

.emoji-modal-lottie {
    width: 120px;
    height: 120px;
    border-radius: 14px;
    background: transparent
}

.emoji-modal-info {
    text-align: center;
    width: 100%
}

.emoji-modal-info .label {
    font-size: 8px;
    color: rgba(255, 255, 255, .3);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 3px;
    font-weight: 500
}

.emoji-modal-info .value {
    font-size: 12px;
    color: #d4d0e8;
    font-weight: 600
}

.emoji-modal-close {
    width: 100%;
    padding: 8px 0;
    border: none;
    background: rgba(255, 255, 255, .06);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #d4d0e8;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s
}

.emoji-modal-close:active {
    background: rgba(255, 255, 255, .1)
}

/* ===== AUTH ===== */
.auth-screen {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #0a0a12, #12121e, #0d0d18);
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px
}

.auth-screen.hidden {
    display: none
}

.auth-card {
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px 24px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 20px;
    backdrop-filter: blur(20px)
}

.auth-card h2 {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2px;
    background: linear-gradient(135deg, #e0d4ff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent
}

.auth-card p {
    font-size: 11px;
    color: rgba(255, 255, 255, .35);
    text-align: center;
    margin-bottom: 6px
}

.auth-input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border .2s, background .2s;
    background: rgba(255, 255, 255, .04);
    color: #e8e8f0
}

.auth-input:focus {
    border-color: rgba(167, 139, 250, .4);
    background: rgba(167, 139, 250, .05)
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, .2)
}

.auth-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c5cfc, #6d28d9);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: opacity .15s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 16px rgba(124, 92, 252, .3)
}

.auth-btn:active {
    opacity: .85;
    transform: scale(.98)
}

.auth-btn:disabled {
    opacity: .3;
    pointer-events: none
}

.auth-switch {
    font-size: 11px;
    color: rgba(255, 255, 255, .35);
    text-align: center;
    margin-top: 4px;
    cursor: pointer
}

.auth-switch b {
    color: #a78bfa;
    font-weight: 600
}

.auth-error {
    font-size: 10px;
    color: #f87171;
    text-align: center;
    min-height: 14px
}

/* ===== LOADING ===== */
.loading-screen {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #0a0a12, #12121e);
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center
}

.loading-screen.hidden {
    display: none
}

.loading-spinner {
    width: 28px;
    height: 28px;
    border: 2.5px solid rgba(167, 139, 250, .15);
    border-top-color: #a78bfa;
    border-radius: 50%;
    animation: spin .7s linear infinite
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

/* ===== MISC ===== */
.save-error {
    font-size: 9px;
    color: #f87171;
    text-align: center;
    padding: 4px 16px;
    min-height: 16px
}

.bio-wrap {
    position: relative
}

.bio-counter {
    position: absolute;
    bottom: 6px;
    right: 10px;
    font-size: 8px;
    color: rgba(255, 255, 255, .2);
    pointer-events: none
}

.conn-status {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 9999;
    transition: opacity .3s
}

.conn-status.connected {
    background: #4ade80;
    opacity: 0
}

.conn-status.connecting {
    background: #fbbf24;
    opacity: 1;
    animation: pulse 1s infinite
}

.conn-status.disconnected {
    background: #ef4444;
    opacity: 1
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .4
    }
}

/* ===== USER PROFILE VIEW ===== */
.user-profile-view {
    position: absolute;
    inset: 0;
    background: #0a0a12;
    z-index: 70;
    transform: translateX(100%);
    transition: transform .25s cubic-bezier(.4, 0, .2, 1)
}

.user-profile-view.open {
    transform: translateX(0)
}

.inline-emoji {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 2px;
    flex-shrink: 0
}

/* ===== VERIFY ===== */
.verify-preview-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px)
}

.verify-preview-modal.open {
    display: flex
}

.verify-card {
    background: rgba(24, 24, 38, .95);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    padding: 26px;
    width: 270px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .4);
    transform: scale(.9);
    opacity: 0;
    transition: all .3s cubic-bezier(.4, 0, .2, 1)
}

.verify-preview-modal.open .verify-card {
    transform: scale(1);
    opacity: 1
}

.verify-emoji-lg {
    width: 120px;
    height: 120px;
    margin-bottom: 14px
}

.verify-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 18px;
    line-height: 1.4;
    color: #d4d0e8
}

.verify-actions {
    display: flex;
    gap: 10px;
    width: 100%
}

.verify-btn {
    flex: 1;
    padding: 11px 0;
    border-radius: 12px;
    border: none;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .1s
}

.verify-btn:active {
    transform: scale(.95)
}

.verify-btn-gray {
    background: rgba(255, 255, 255, .06);
    color: #d4d0e8
}

.verify-btn-black {
    background: linear-gradient(135deg, #7c5cfc, #6d28d9);
    color: #fff
}

/* ===== NOTIFICATIONS ===== */
.notif-badge {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    box-shadow: 0 2px 6px rgba(239, 68, 68, .4)
}

.notif-item {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .04)
}

.notif-item.notif-unread {
    background: rgba(167, 139, 250, .04)
}

.notif-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #d4d0e8
}

.notif-msg {
    font-size: 11px;
    color: rgba(255, 255, 255, .4);
    line-height: 1.4
}

.notif-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px
}

.notif-request {
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .04)
}

.notif-name {
    font-size: 12px;
    font-weight: 600;
    color: #d4d0e8
}

.notif-reason {
    font-size: 11px;
    color: rgba(255, 255, 255, .4);
    margin-top: 4px;
    line-height: 1.4
}

.notif-time {
    font-size: 9px;
    color: rgba(255, 255, 255, .2);
    margin-top: 4px
}

.notif-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .1s
}

.notif-btn:active {
    transform: scale(.95)
}

.notif-approve {
    background: rgba(74, 222, 128, .15);
    color: #4ade80
}

.notif-reject {
    background: rgba(248, 113, 113, .1);
    color: #f87171
}

/* ===== MARKDOWN ===== */
.markdown b {
    font-weight: 700
}

.markdown i {
    font-style: italic
}

.markdown s {
    text-decoration: line-through;
    opacity: .7
}

.markdown code {
    background: rgba(255, 255, 255, .1);
    padding: 1px 5px;
    border-radius: 4px;
    font-family: 'SF Mono', monospace;
    font-size: 11px
}

.msg-out .markdown code {
    background: rgba(255, 255, 255, .15)
}

.mention {
    color: #a78bfa;
    font-weight: 600;
    cursor: pointer
}

.msg-out .mention {
    color: #c4b5fd
}

/* ===== SPOILERS ===== */
.spoiler {
    background-color: rgba(255, 255, 255, .2);
    color: transparent;
    border-radius: 4px;
    padding: 0 2px;
    cursor: pointer;
    user-select: none;
    display: inline-block;
    vertical-align: middle;
    text-shadow: none;
    overflow: hidden
}

.spoiler.visible {
    background: transparent;
    color: inherit;
    user-select: text;
    padding: 0
}

.msg-out .spoiler {
    background-color: rgba(255, 255, 255, .25)
}

.msg-out .spoiler.visible {
    background: transparent
}

.chat-preview .spoiler {
    background-color: rgba(255, 255, 255, .15) !important;
    color: transparent !important;
    vertical-align: middle;
    border-radius: 3px
}

/* ===== REPLY ===== */
.reply-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: rgba(18, 18, 30, .95);
    border-top: 1px solid rgba(255, 255, 255, .05);
    font-size: 11px
}

.reply-info {
    flex: 1;
    border-left: 2px solid #7c5cfc;
    padding-left: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center
}

.reply-name {
    font-weight: 600;
    color: #a78bfa;
    margin-bottom: 1px
}

.reply-text {
    color: rgba(255, 255, 255, .4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.reply-close {
    padding: 4px;
    cursor: pointer;
    color: rgba(255, 255, 255, .3)
}

.msg-reply-preview {
    border-left: 2px solid;
    padding-left: 8px;
    margin-bottom: 5px;
    cursor: pointer;
    font-size: 10px;
    opacity: .8;
    display: block
}

.msg-out .msg-reply-preview {
    border-color: rgba(255, 255, 255, .5)
}

.msg-in .msg-reply-preview {
    border-color: #7c5cfc
}

.msg-reply-name {
    font-weight: 600;
    margin-bottom: 1px
}

.msg-reply-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

/* ===== SWIPE ===== */
.swipe-reply-icon {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 12px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(167, 139, 250, .15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s
}

.swipe-reply-icon svg {
    stroke: #a78bfa !important
}

.swipe-active .swipe-reply-icon {
    opacity: 1
}

@keyframes highlightBubble {
    0% {
        transform: scale(1);
        filter: brightness(1)
    }

    20% {
        transform: scale(1.08);
        filter: brightness(1.3)
    }

    40% {
        transform: scale(1.04);
        filter: brightness(1.15)
    }

    100% {
        transform: scale(1);
        filter: brightness(1)
    }
}

.msg-container.highlight .msg {
    animation: highlightBubble .7s ease-out;
    position: relative;
    z-index: 2;
    transform-origin: center;
    box-shadow: 0 0 20px rgba(124, 92, 252, .2)
}

/* ===== PROFILE ACTION ===== */
.profile-action-btn {
    width: auto;
    min-width: 110px;
    margin: 22px auto 0;
    padding: 8px 20px;
    background: linear-gradient(135deg, #7c5cfc, #6d28d9);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 16px rgba(124, 92, 252, .3);
    transition: transform .15s
}

.profile-action-btn:active {
    transform: scale(.95)
}

/* ===== TOASTS ===== */
.toast-container {
    position: fixed;
    bottom: 80px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    z-index: 2000
}

.toast {
    background: rgba(24, 24, 38, .95);
    backdrop-filter: blur(12px);
    color: #e8e8f0;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
    border: 1px solid rgba(255, 255, 255, .06);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .2s, transform .2s;
    pointer-events: auto;
    max-width: 80%;
    text-align: center
}

.toast.show {
    opacity: 1;
    transform: translateY(0)
}

/* ===== QUOTE TOOLTIP ===== */
.quote-tooltip {
    position: fixed;
    z-index: 500;
    background: linear-gradient(135deg, #7c5cfc, #6d28d9);
    color: #fff;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(124, 92, 252, .4);
    opacity: 0;
    transform: translateY(4px) scale(.9);
    transition: opacity .15s, transform .15s;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Inter', sans-serif
}

.quote-tooltip.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto
}

.quote-tooltip:active {
    opacity: .8
}

/* ===== SELECTION ===== */
.msg-in ::selection {
    background: rgba(167, 139, 250, .3)
}

.msg-out ::selection {
    background: rgba(255, 255, 255, .3);
    color: #fff
}

.msg {
    -webkit-user-select: text;
    user-select: text
}

/* ===== LANGUAGE MODAL ===== */
.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    cursor: pointer;
    transition: background .15s;
    border-bottom: 1px solid rgba(255, 255, 255, .04)
}

.lang-option:active {
    background: rgba(167, 139, 250, .06)
}

.lang-option.selected {
    background: rgba(167, 139, 250, .08)
}

.lang-option .lang-flag {
    font-size: 22px;
    flex-shrink: 0
}

.lang-option .lang-name {
    font-size: 13px;
    font-weight: 500;
    flex: 1;
    color: #d4d0e8
}

.lang-option .lang-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .2s
}

.lang-option.selected .lang-check {
    border-color: #7c5cfc;
    background: linear-gradient(135deg, #7c5cfc, #a78bfa)
}

/* ===== MICRO-ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.chat-item {
    animation: fadeInUp .3s ease-out backwards
}

.chat-item:nth-child(1) {
    animation-delay: 0s
}

.chat-item:nth-child(2) {
    animation-delay: .03s
}

.chat-item:nth-child(3) {
    animation-delay: .06s
}

.chat-item:nth-child(4) {
    animation-delay: .09s
}

.chat-item:nth-child(5) {
    animation-delay: .12s
}

.msg-container {
    animation: fadeInUp .25s ease-out backwards
}

/* ===== SCROLLBAR (desktop) ===== */
::-webkit-scrollbar {
    width: 4px
}

::-webkit-scrollbar-track {
    background: transparent
}

::-webkit-scrollbar-thumb {
    background: rgba(167, 139, 250, .15);
    border-radius: 4px
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(167, 139, 250, .3)
}

/* ===== DUP TAB SCREEN ===== */
.dup-tab-screen {
    position: fixed;
    inset: 0;
    background: #0a0a12;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e8e8f0;
    text-align: center;
    padding: 20px;
    flex-direction: column;
    gap: 15px
}

/* ===== TOGGLE ===== */
.toggle {
    width: 34px;
    height: 18px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .1);
    position: relative;
    cursor: pointer;
    transition: background .2s;
    flex-shrink: 0
}

.toggle.on {
    background: linear-gradient(135deg, #7c5cfc, #a78bfa)
}

.toggle::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    top: 2px;
    left: 2px;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2)
}

.toggle.on::after {
    transform: translateX(16px)
}

.req-status {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 4px
}

.req-pending {
    background: rgba(251, 191, 36, .1);
    color: #fbbf24
}

.req-approved {
    background: rgba(74, 222, 128, .1);
    color: #4ade80
}

.req-rejected {
    background: rgba(248, 113, 113, .1);
    color: #f87171
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 12px;
    margin: 4px 8px;
    transition: background 0.2s
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05)
}

.search-results {
    background: rgba(20, 20, 30, 0.95);
    border-radius: 12px;
    margin: 8px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05)
}