/* ====== Temel Değişkenler (tek :root) ====== */

:root {

    --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", Helvetica, Arial, sans-serif;

    --font-jakarta: "Plus Jakarta Sans", var(--font-sans);

    --font-lexend: "Lexend", var(--font-sans);



    --text-size: 15px;

    --text-leading: 1.45;

    --text-track: .1px;



    --card: #fff;

    --bg: #f4f7ff;

    --panel: #fff;

    --soft: #eef3ff;

    --text: #0f172a;

    --muted: #6b7280;

    --primary: #3b82f6;

    --border: #e5e7eb;

    --shadow: 0 8px 28px rgba(59, 130, 246, .1);

    --radius: 18px;

    --topbar-h: 56px;

    --inputbar-h: 56px;



    --bubble-me: #eaf2ff;

    --bubble-you: #fff;

    --bubble-me-border: #bcd3ff;

    --bubble-you-border: #e6eaf2;



    --modal-radius: 16px;

    --modal-border: #e8edf5;

    --modal-shadow: 0 10px 40px rgba(11, 87, 208, .12), 0 2px 10px rgba(13, 23, 44, .06);

    --primary-08: rgba(11, 87, 208, .08);

    --primary-14: rgba(11, 87, 208, .14);



    --col-founder: #d97706;

    --col-admin: #7c3aed;

    --col-op: #0b57d0;

    --col-halfop: #059669;

    --col-voice: #0ea5e9;

    --col-user: #0b1a2b;

}



html,

body {

    height: 100%
}



/* ====== Global Gövde ====== */

body {

    margin: 0;

    background: var(--bg);

    color: var(--text);

    font-family: var(--font-sans);

    font-size: var(--text-size);

    line-height: var(--text-leading);

    letter-spacing: var(--text-track);

    -webkit-font-smoothing: antialiased;

    -moz-osx-font-smoothing: grayscale;

}



.body--jakarta {

    font-family: var(--font-jakarta)
}



.body--lexend {

    font-family: var(--font-lexend)
}



/* ====== Login ====== */

#login-screen {

    min-height: 100vh;

    display: flex
}



#login-screen.login-hero {

    min-height: 100dvh;

    display: grid;

    place-items: center !important;

    padding: clamp(16px, 3vw, 32px);

    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(59, 130, 246, .15), transparent 60%),

        radial-gradient(1000px 500px at -10% 110%, rgba(16, 185, 129, .12), transparent 60%),

        linear-gradient(180deg, #f8fbff 0%, #eef4ff 45%, #f6f9ff 100%);

}



.login-card {

    width: min(400px, 92vw);

    border-radius: 22px;

    padding: 28px;

    border: 1px solid rgba(255, 255, 255, .55);

    background: rgba(255, 255, 255, .6);

    box-shadow: 0 20px 60px rgba(15, 23, 42, .10), inset 0 1px 0 rgba(255, 255, 255, .6);

    backdrop-filter: blur(10px);

}



.login-brand {

    display: flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 6px
}



.login-brand .logo {

    width: 44px;

    height: 44px;

    display: grid;

    place-items: center;

    background: linear-gradient(135deg, #3b82f6, #2563eb);

    color: #fff;

    border-radius: 12px;

    box-shadow: 0 10px 24px rgba(37, 99, 235, .35);

}



.login-subtle {

    color: var(--muted);

    margin-bottom: 20px
}



.form-floating > .form-control,

.form-floating > .form-control:focus {

    background: rgba(255, 255, 255, .85);

    border: 1px solid var(--border)
}



.input-icon {

    position: absolute;

    left: 12px;

    top: 50%;

    transform: translateY(-50%);

    color: #64748b;

    opacity: .9
}



.input-with-icon .form-control {

    padding-left: 38px;

    border-radius: 12px
}



.form-floating > label {

    padding-left: 34px
}



.login-actions {

    display: flex;

    gap: 10px;

    align-items: center;

    justify-content: space-between;

    margin-top: 14px
}



.btn-login {

    padding: 12px 18px;

    border-radius: 12px;

    font-weight: 600;

    box-shadow: 0 10px 20px rgba(59, 130, 246, .25);

    transition: transform .06s ease, box-shadow .2s ease
}



.btn-login:hover {

    transform: translateY(-1px)
}



.btn-login:active {

    transform: translateY(0)
}



.login-card .col-md-6 {

    flex: 0 0 100% !important;

    max-width: 100% !important
}



.login-card .row {

    --bs-gutter-x: 0
}



#toggle-pass {

    position: absolute;

    right: 10px;

    top: 50%;

    transform: translateY(-50%);

    height: 36px;

    line-height: 36px;

    padding-inline: 10px;

    border-radius: 10px;

    background: transparent;

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

}



body.dark .login-hero {

    background:

        radial-gradient(1200px 600px at 80% -10%, rgba(59, 130, 246, .20), transparent 60%),

        radial-gradient(1000px 500px at -10% 110%, rgba(16, 185, 129, .18), transparent 60%),

        linear-gradient(180deg, #0b1220 0%, #0f172a 100%);

}



body.dark .login-card {

    background: rgba(2, 6, 23, .55);

    border-color: rgba(148, 163, 184, .3);

    box-shadow: 0 20px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .05)
}



body.dark .input-icon {

    color: #94a3b8;

    opacity: .95
}



/* ====== App ====== */

#main {

    display: none;

    height: 100vh;

    overflow: hidden;

    flex-direction: column
}



.topbar {

    height: var(--topbar-h);

    padding: 10px 12px;

    background: var(--panel);

    border-bottom: 1px solid var(--border);

    position: sticky;

    top: 0;

    z-index: 10;

    display: flex;

    align-items: center;

    justify-content: space-between;

}



.app-grid {

    display: grid;

    grid-template-columns: 1fr 280px;

    gap: 0px;

    height: calc(100vh - var(--topbar-h));

    padding: 12px;

    min-height: 0;

}



.app-grid.sidebar-collapsed {

    grid-template-columns: 1fr !important
}



.chat-card {

    display: flex;

    flex-direction: column;

    background: var(--panel);

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

    border-radius: 16px;

    min-height: 0;

    height: 100%;

}



/* ====== Tabs ====== */

#tabs {

    display: flex;

    flex-wrap: wrap;

    gap: .5rem .6rem;

    padding: .5rem .6rem;

    background: var(--panel);

    border-bottom: 1px solid var(--border);

    overflow-x: visible;

    max-height: 84px;

    overflow-y: auto;

    scrollbar-gutter: stable both-edges;

    align-content: flex-start;

}



#tabs button {

    position: relative;

    flex: 0 1 auto;

    max-width: 240px;

    padding: .42rem .75rem;

    border-radius: 999px;

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

    background: var(--soft);

    color: var(--text);

    font: 600 14px/1 var(--font-sans);

    display: inline-flex;

    align-items: center;

    gap: .45rem;

    cursor: pointer;

    transition: all .18s ease;

    text-overflow: ellipsis;

    overflow: hidden;

}



#tabs button:hover {

    background: #e8eefc
}



#tabs button:focus-visible {

    outline: none;

    box-shadow: 0 0 0 3px rgba(59, 130, 246, .3)
}



#tabs button.active {

    background: var(--primary);

    color: #fff;

    border-color: transparent;

    box-shadow: 0 6px 16px rgba(59, 130, 246, .22)
}



#tabs .close-tab-button {

    margin-left: .15rem;

    padding: 0 .25rem;

    border-radius: 8px;

    font-size: 16px;

    line-height: 1;

    opacity: .7;

    transition: transform .15s, opacity .15s, color .15s
}



#tabs button:hover .close-tab-button {

    opacity: .95
}



#tabs .close-tab-button:hover {

    color: #e65050;

    transform: scale(1.12)
}



#tabs button.new-message {

    border-color: #3b82f6;

    box-shadow: 0 0 0 2px #3b82f6
}



#tabs button.active.new-message {

    box-shadow: 0 0 0 2px #3b82f6, 0 6px 16px rgba(59, 130, 246, .22)
}



@keyframes ringPulse {

    0% {

        box-shadow: 0 0 0 2px #3b82f6
    }



    50% {

        box-shadow: 0 0 0 3px rgba(255, 71, 87, .7)
    }



    100% {

        box-shadow: 0 0 0 2px #3b82f6
    }

}



#tabs button.new-message.pulse {

    animation: ringPulse 1.4s ease-in-out infinite
}



#topic-header {

    display: none;

    align-items: center;

    gap: 10px;

    padding: 8px 12px
}



#private-user-info {

    display: none;

    align-items: center;

    gap: 10px;

    padding: 8px 12px;

    border-bottom: 1px solid var(--border);

    background: var(--panel);

    flex: 0 0 auto;

    position: relative;

    overflow: visible;

    /* avatar taşması için */

}



#channel-name {

    font-weight: 700
}



#channel-name,

.login-brand h1 {

    letter-spacing: .2px
}



/* ===== Mesaj alanı – arka plan + logo ===== */
#messages {
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: .1px;
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 1px;

    /* 1) Desen, 2) Logo, 3) En altta gradient ZEMİN */
    background-image:
        url("https://harabe.org/hchatv4/assets/icons/arka.png"),
        /* desen */
        url("https://harabe.org/hchatv4/assets/icons/HCHAT.png"),
        /* logo */
        linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
    /* zemin */

    background-repeat:
        repeat,
        /* desen tekrar etsin */
        no-repeat,
        /* logo */
        no-repeat;
    /* gradient */

    background-position:
        center center,
        /* desen */
        right 24px top 16px,
        /* logo */
        center top;
    /* gradient */

    background-size:
        420px auto,
        /* desenin gerçek boyu – büyüyüp çirkinleşmesin */
        110px auto,
        /* logo boyutu */
        cover;
    /* gradient tüm alanı kaplasın */

    padding-right: 140px;
    /* logonun altına yazı girmesin istersen */
}

/* Mobilde biraz küçültelim */
@media (max-width: 768px) {
    #messages {
        background-size:
            360px auto,
            /* desen biraz küçülür */
            80px auto,
            /* logo küçülür */
            cover;
        padding-right: 16px;
    }
}






.chat-toolbar {

    display: flex;

    gap: 8px;

    align-items: center;

    padding: 0 5px;

    background: var(--panel);

    border-top: 1px solid var(--border)
}



.icon-btn {

    border: 0;

    background: var(--panel);

    color: var(--text);

    width: 30px;

    height: 30px;

    display: grid;

    place-items: center;

    font-size: 20px;

    padding: 0;

    border-radius: 10px
}



.icon-btn.active {

    background: var(--primary);

    color: #fff;

    border-color: var(--primary)
}



.icon-btn:hover {

    background: var(--soft)
}



.icon-btn i {

    line-height: 1;

    font-size: 18px
}



.inputbar {

    position: sticky;

    bottom: 0;

    z-index: 10;

    display: flex;

    gap: 8px;

    align-items: center;

    padding: 10px;

    background: var(--panel);

    border-top: 1px solid var(--border);

    border-radius: 0 0 var(--radius) var(--radius);

    min-height: var(--inputbar-h);

}



.inputbar input {

    flex: 1;

    background: #f7faff;

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

    border-radius: 12px;

    padding: 12px 14px;

}



/* ====== Userlist ====== */

#userlist-sidebar,
#channel-sidebar {

    background: var(--panel);

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

    border-radius: 0px 0px 16px 16px;

    display: flex;

    flex-direction: column;

    min-height: 0;

    height: 100%;

    overflow: hidden;

}



#userlist-sidebar.hidden {

    display: none !important
}



.userlist-head,
#channel-sidebar .channel-head {

    position: sticky;

    top: 0;

    z-index: 1;

    background: var(--panel);

    display: flex;

    align-items: center;

    gap: 10px;

    justify-content: space-between;

    padding: 8px;

    border-bottom: 1px solid var(--border);

}



#userlist {

    list-style: none;

    margin: 0;

    padding: 8px;

    flex: 1 1 auto;

    min-height: 0;

    max-height: 100%;

    /*overflow-y: auto;*/

    overscroll-behavior: contain
}



#userlist li {

    padding: 2px 3px;

    border-radius: 1px;

    cursor: pointer;

    color: var(--col-user)
}



#userlist li:hover {

    background: var(--soft);

    filter: brightness(1.05);

    transform: translateX(1px)
}



#userlist::-webkit-scrollbar {

    width: 10px
}



#userlist::-webkit-scrollbar-thumb {

    background: #cbd5e1;

    border-radius: 8px
}



#userlist li[data-nick^="~"] {

    color: var(--col-founder);

    font-weight: 600
}



#userlist li[data-nick^="&"] {

    color: var(--col-admin);

    font-weight: 600
}



#userlist li[data-nick^="@"] {

    color: var(--col-op);

    font-weight: 600
}



#userlist li[data-nick^="%"] {

    color: var(--col-halfop);

    font-weight: 600
}



#userlist li[data-nick^="+"] {

    color: var(--col-voice);

    font-weight: 600
}



#userlist li.ul-item {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 4px 2px;

    line-height: 1.2
}



#userlist .ul-badge {

    flex: 0 0 24px;

    height: 20px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    border-radius: 6px;

    font-weight: 700;

    font-size: 12px;

    border: 1px solid transparent;

    background: transparent;

    color: var(--col-user);

}



#userlist .ul-name {

    flex: 1;

    min-width: 0;

    color: var(--col-user)
}



#userlist li.ul-item:hover .ul-name {

    text-decoration: underline
}



#userlist .ul-badge.founder {

    background: rgba(217, 119, 6, .12);

    color: var(--col-founder);

    border-color: rgba(217, 119, 6, .25)
}



#userlist .ul-badge.admin {

    background: rgba(124, 58, 237, .12);

    color: var(--col-admin);

    border-color: rgba(124, 58, 237, .25)
}



#userlist .ul-badge.op {

    background: rgba(11, 87, 208, .12);

    color: var(--col-op);

    border-color: rgba(11, 87, 208, .25)
}



#userlist .ul-badge.halfop {

    background: rgba(5, 150, 105, .12);

    color: var(--col-halfop);

    border-color: rgba(5, 150, 105, .25)
}



#userlist .ul-badge.voice {

    background: rgba(14, 165, 233, .12);

    color: var(--col-voice);

    border-color: rgba(14, 165, 233, .25)
}



#userlist .ul-badge.user {

    background: rgba(2, 6, 23, .06);

    border-color: rgba(2, 6, 23, .12);

    color: var(--col-user)
}



#userlist .ul-badge i {

    font-size: 14px;

    line-height: 1;

    display: inline-block;

    transform: translateY(1px)
}



/* ====== Overlay / Spinner ====== */

#connecting-overlay {

    position: fixed;

    inset: 0;

    background: rgba(255, 255, 255, .8);

    display: none;

    align-items: center;

    justify-content: center;

    z-index: 9999
}



.spinner {

    width: 56px;

    height: 56px;

    border-radius: 50%;

    border: 6px solid #cfe2ff;

    border-top-color: #3b82f6;

    animation: spin 1s linear infinite
}



@keyframes spin {

    to {

        transform: rotate(360deg)
    }

}



/* ====== Popup Notice ====== */

#popup-notice {

    position: fixed;

    right: 16px;

    bottom: 16px;

    background: #111;

    color: #fff;

    padding: 10px 12px;

    border-radius: 10px;

    opacity: 0;

    transform: translateY(10px);

    transition: .2s;

}



#popup-notice.show {

    opacity: 1;

    transform: none
}



/* ====== Emoji Menü ====== */

#emoji-menu .emoji-item {

    display: inline-block;

    padding: 4px 6px;

    cursor: pointer;

    border-radius: 8px
}



#emoji-menu .emoji-item:hover {

    background: var(--soft)
}



/* ====== Logo ====== */

.app-logo {

    display: block;

    margin: 6px;

    height: 30px;

    width: auto;

    object-fit: contain
}



/* ====== PM Üst Şerit ====== */

#private-user-info {

    gap: 12px;

    padding: 10px 12px;

    background: #68708033
}



.pm-head {

    display: flex;

    align-items: center;

    gap: 12px;

    width: 100%
}



.pm-avatar {

    width: 70px;

    height: 70px;

    border-radius: 50%;

    overflow: hidden;

    display: grid;

    place-items: center;

    background: #e5e7eb;

    color: #111827;

    font-weight: 700;

    box-shadow: 0 0 0 3px #fff, 0 0 0 4px #d1d5db;

}



.pm-avatar img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block
}



.pm-avatar .ini {

    font-size: 14px
}



.pm-actions {

    margin-left: auto;

    display: flex;

    gap: 8px;

    align-items: center
}



.pm-actions .btn {

    padding: 4px 10px
}


.emoji-img {

    height: 1em;

    width: 1em;

    vertical-align: -0.15em
}



/* Toolbar linkleri */

.chat-toolbar .sep {

    display: inline-block;

    padding: 0 6px;

    color: var(--muted);

    opacity: .7;

    user-select: none;

    font-weight: 600
}



.chat-toolbar .alt-link {

    margin-left: 4px;

    padding: 4px 10px;

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

    border-radius: 10px;

    text-decoration: none;

    font-size: 12px;

    line-height: 1.2
}



.chat-toolbar .alt-link:hover {

    background: var(--soft)
}



/* ====== PM Balonları (ince) ====== */

.pm-bubbles .bubble {

    position: relative;

    padding: var(--bubble-vpad, 6px) var(--bubble-hpad, 10px);

    border-radius: 10px;

    font-size: 13px;

    line-height: 1.2;

    max-width: min(72%, 620px);

}



.pm-bubbles .msg-row {

    margin: 4px 0
}



.pm-bubbles .msg-row.me .bubble {

    background: linear-gradient(180deg, #edf4ff 0%, #e3ecff 100%);

    border: 1px solid var(--bubble-me-border);

    box-shadow: 0 8px 18px rgba(11, 87, 208, .18);

}



.pm-bubbles .msg-row.you .bubble {

    background: var(--bubble-you);

    border: 1px solid var(--bubble-you-border);

    box-shadow: 0 8px 16px rgba(2, 12, 27, .08);

}



.pm-bubbles .bubble .time,

.pm-bubbles .bubble .nick {

    font-size: 12px;

    font-weight: 700;

    margin: 0;

    color: #50627a
}



.pm-bubbles .msg-row.me .bubble .time,

.pm-bubbles .msg-row.me .bubble .nick {

    color: #3e63a8
}



.pm-bubbles .bubble .sep,

.pm-bubbles .bubble .text {

    margin: 0
}



.pm-bubbles .bubble .text {

    display: inline;

    white-space: normal;

    word-break: break-word
}



.pm-bubbles .bubble::after {

    content: "";

    position: absolute;

    width: 8px;

    height: 8px;

    top: 8px;

    transform: rotate(45deg)
}



.pm-bubbles .msg-row.me .bubble::after {

    right: -6px;

    background: #e3ecff;

    border-right: 1px solid var(--bubble-me-border);

    border-top: 1px solid var(--bubble-me-border)
}



.pm-bubbles .msg-row.you .bubble::after {

    left: -6px;

    background: #ffffff;

    border-left: 1px solid var(--bubble-you-border);

    border-top: 1px solid var(--bubble-you-border)
}



/* Koyu tema */

body.dark {

    --bubble-me: #223154;

    --bubble-you: #151b27;

    --bubble-me-border: #2b3b66;

    --bubble-you-border: #242b38;

    --col-user: #e6edf6;

    --col-founder: #f59e0b;

    --col-admin: #a78bfa;

    --col-op: #60a5fa;

    --col-halfop: #34d399;

    --col-voice: #7dd3fc;

}



body.dark .pm-bubbles .msg-row.me .bubble {

    background: linear-gradient(180deg, #25395f 0%, #1f2f52 100%);

    box-shadow: 0 8px 20px rgba(0, 0, 0, .35)
}



body.dark .pm-bubbles .msg-row.you .bubble {

    background: var(--bubble-you);

    box-shadow: 0 8px 18px rgba(0, 0, 0, .3)
}



body.dark .pm-bubbles .bubble .time,

body.dark .pm-bubbles .bubble .nick {

    color: #a7b6d9
}



body.dark .pm-bubbles .bubble .sep {

    color: #7e8fb0
}



/* ====== Yardımcılar ====== */

@media (max-width:992px) {

    .app-grid {

        grid-template-columns: 1fr
    }

}



.hidden {

    display: none !important
}



#hearts-layer {

    pointer-events: none;

    position: fixed;

    inset: 0;

    z-index: 9999
}



/* Servis rozetleri */

.svc {

    display: inline-block;

    font-weight: 700;

    padding: 2px 6px;

    border-radius: 8px;

    border: 1px solid transparent;

    line-height: 1
}



.svc-nickserv {

    background: rgba(14, 165, 233, .12);

    color: #0ea5e9;

    border-color: rgba(14, 165, 233, .35)
}



.svc-chanserv {

    background: rgba(124, 58, 237, .12);

    color: #7c3aed;

    border-color: rgba(124, 58, 237, .30)
}



.svc-operserv {

    background: rgba(239, 68, 68, .12);

    color: #ef4444;

    border-color: rgba(239, 68, 68, .30)
}



.svc-memoserv {

    background: rgba(245, 158, 11, .14);

    color: #d97706;

    border-color: rgba(245, 158, 11, .32)
}



.svc-hostserv {

    background: rgba(34, 197, 94, .14);

    color: #16a34a;

    border-color: rgba(34, 197, 94, .30)
}



.svc-global {

    background: rgba(244, 63, 94, .14);

    color: #dc2626;

    border-color: rgba(244, 63, 94, .28)
}



body.dark .svc-nickserv {

    background: rgba(14, 165, 233, .18);

    border-color: rgba(14, 165, 233, .38)
}



body.dark .svc-chanserv {

    background: rgba(124, 58, 237, .18);

    border-color: rgba(124, 58, 237, .38)
}



body.dark .svc-operserv {

    background: rgba(239, 68, 68, .18);

    border-color: rgba(239, 68, 68, .40)
}



body.dark .svc-memoserv {

    background: rgba(245, 158, 11, .20);

    border-color: rgba(245, 158, 11, .42)
}



body.dark .svc-hostserv {

    background: rgba(34, 197, 94, .20);

    border-color: rgba(34, 197, 94, .40)
}



body.dark .svc-global {

    background: rgba(244, 63, 94, .20);

    border-color: rgba(244, 63, 94, .42)
}



/* Komut Paleti */

#modalPalette .modal-content {

    border-radius: 14px;

    box-shadow: var(--shadow)
}



#modalPalette .list-group-item {

    cursor: pointer
}



#modalPalette .list-group-item .hint {

    color: var(--muted);

    font-size: 12px
}



#modalPalette .list-group-item.active {

    background: var(--soft)
}



.modal-backdrop.show {

    background: rgba(10, 17, 30, .55);

    backdrop-filter: blur(4px)
}



.modal {

    z-index: 1060
}



.dropdown,

.tooltip,

.popover {

    z-index: 1070
}



.nice-modal .modal-content {

    border-radius: 16px;

    border: 1px solid rgba(0, 0, 0, .06)
}



.nice-modal .modal-header {

    padding: 14px 18px;

    background: linear-gradient(180deg, rgba(11, 87, 208, .10), rgba(11, 87, 208, .05));

    border-bottom: 1px solid rgba(0, 0, 0, .06)
}



.nice-modal .modal-body {

    padding: 18px 20px;

    font-size: 14.5px;

    line-height: 1.55;

    color: var(--text)
}



.nice-modal .modal-body h6 {

    font-weight: 700;

    margin: 16px 0 8px
}



.nice-modal .modal-body p,

.nice-modal .modal-body ul,

.nice-modal .modal-body ol {

    margin-bottom: 10px
}



.nice-modal .modal-body ul {

    padding-left: 1.1rem
}



.nice-modal .modal-body a {

    word-break: break-word;

    text-decoration: underline
}



@media (min-width:992px) {

    .nice-modal .modal-dialog {

        max-width: 860px
    }

}



body.dark .nice-modal .modal-content {

    background: #0f1420;

    border-color: rgba(255, 255, 255, .06)
}



body.dark .nice-modal .modal-header {

    background: linear-gradient(180deg, rgba(11, 87, 208, .15), rgba(11, 87, 208, .08));

    border-bottom-color: rgba(255, 255, 255, .06)
}



body.modal-open {

    overflow: hidden
}



/* Stickers */

.sticker-grid {

    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));

    gap: 12px
}



.sticker-item {

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

    background: var(--panel);

    border-radius: 12px;

    padding: 8px;

    cursor: pointer;

    text-align: center;

    transition: transform .08s ease, box-shadow .15s ease
}



.sticker-item:hover {

    transform: translateY(-2px);

    box-shadow: var(--shadow)
}



.sticker-item img {

    width: 100%;

    height: 72px;

    object-fit: contain;

    display: block
}



.msg-sticker {

    display: inline-flex;

    align-items: center;

    justify-content: left;

    max-width: 240px;

    max-height: 240px
}



.msg-sticker img {

    width: 20%;

    height: auto;

    display: block
}



/* ===================== MOBİL DÜZEN (≤576px) ===================== */

@media (max-width: 576px) {

    /* 1. Mavi Radyo Butonunu (Radio Toggle) küçültme */



    /* Eğer butonun kendisi #radio-toggle ise */

    #radio-toggle {

        padding: 8px 10px !important;
        /* Dikey/yatay boşlukları azalt */

        font-size: 14px;
        /* Metin varsa küçült */

        /* Metin varsa ve gizlemek istiyorsanız: */

        /* width: auto; max-width: 70px; gibi bir kısıtlama ekleyebilirsiniz */

    }



    /* Görseldeki "Radyo" metnini kapsayan öğeyi gizle (Örn: span) */

    #radio-toggle span {
        /* Lütfen bu selektörü HTML yapınıza göre kontrol edin */

        display: none;

    }



    /* Ikon boyutu ve butonu sıkıştır */

    #radio-toggle i {

        font-size: 18px;

    }

}

@media (max-width: 576px) {

    /* 2. Tema Butonunu Küçültme (Görüntüdeki Ay Ikonu) */

    .theme-btn-img {

        width: 38px;
        /* 44px'ten 38px'e düşür */

        height: 38px;

        /* Diğer stil kuralları otomatik olarak uygulanacaktır (border-radius, background) */

    }



    /* Üst çubuktaki (topbar) boşluğu da daralt */

    .topbar {

        gap: 4px;
        /* Öğeler arası boşluğu 0'dan 4px'e çıkar (biraz nefes alması için) */

        padding: 4px;
        /* Padding'i 4px'e çıkar */

    }

}

@media (max-width: 576px) {

    /* 3. Logonun Esnekliği */

    .topbar .logo-container {
        /* Logo ve başlığı içeren kapsayıcıyı hedefleyin */

        flex-shrink: 1;
        /* Sıkışmaya izin ver */

        min-width: 0;
        /* Gerekirse minimum genişliği sıfırla */

        overflow: hidden;
        /* Taşma olursa metni kes */

    }



    /* Metin taşarsa (örneğin h1), onu kes */

    .login-brand h1 {

        white-space: nowrap;

        overflow: hidden;

        text-overflow: ellipsis;
        /* Metin taşarsa üç nokta koy */

    }

}







@media (max-width:576px) {



    body,

    #main,

    .app-grid,

    .chat-card {

        overflow-x: hidden !important;

    }

    #main {

        padding: 0;
        /* Dış boşlukları kaldırın */

    }



    /* 0) Mobil tipografi: TEK KAYNAK */

    :root {

        --text-size: 13px;

    }



    /* beden metin */

    #messages {

        font-size: 13.5px;

        line-height: 1.45;

    }



    /* sohbet metni */

    #tabs button {

        font-size: 12.5px;

    }



    .inputbar input {

        font-size: 12px;

    }



    /* iOS zoom fix */



    /* 1) Grid → tek sütun */

    .app-grid {

        grid-template-columns: 1fr !important;

        gap: 10px;

        height: calc(100dvh - var(--topbar-h));

        padding: 8px;

    }



    /* 2) Topbar kompakt */

    .topbar {

        height: 51px;

        padding: 3px;

        gap: 0px;

        /* Yeni Kural: Esnekliği artır, sığmazsa küçülmesine izin ver */

        flex-shrink: 1;
        /* Öğelerin küçülmesine izin ver */

        min-width: 0;
        /* İçeriğin taşmasını engellemek için */

    }



    /* Öğelerin küçülmesine izin ver, minimum genişlik koyma */

    .topbar > * {

        min-width: 0;

        flex-shrink: 1;

    }

}



/* 3) Sekmeler: tek satır, yatay kaydırma */

#tabs {

    gap: 6px;

    padding: 6px 8px;

    max-height: 48px;

    overflow-y: hidden;

    overflow-x: auto;

    white-space: nowrap;

    scrollbar-width: thin;

}



#tabs button {

    padding: .38rem .6rem;

    max-width: none;

    flex: 0 0 auto;

}



/* 4) Mesaj alanı: tam yükseklik */

#messages {

    padding: 12px;


    height: calc(100dvh - var(--topbar-h) - 56px - 10px);

    /* 56: inputbar */

    min-height: 0;

}



/* 5) Input bar sabit + safe area */

.inputbar {

    position: sticky;

    bottom: 0;

    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));

    min-height: 56px;

    gap: 8px;

    border-radius: 0 0 var(--radius) var(--radius);

}



.icon-btn {

    width: 28px;

    height: 28px;

    font-size: 18px;

}



/* 6) PM üst şerit daha ince + avatar taşsın */

#private-user-info {

    padding: 8px 10px 6px 86px;

    min-height: 50px;

}



.pm-avatar {

    position: absolute;

    left: 10px;

    top: 0px;

    width: 50px;

    height: 50px;

}



.pm-head {

    min-height: 32px;

}



/* 7) Sağdan kayan kullanıcı listesi (off-canvas) */

#userlist-sidebar {

    position: fixed;



    right: 0;

    bottom: 0;



    transform: translateX(100%);

    transition: transform .25s ease;

    border-left: 1px solid var(--border);

    border-radius: 0 0 0 0;

    z-index: 1050;

}



body.userlist-open #userlist-sidebar {

    transform: translateX(0);

}



/* Karartma katmanı (opsiyonel) */

.userlist-dim {

    position: fixed;

    inset: 0;

    background: rgba(2, 6, 23, .45);

    backdrop-filter: blur(2px);

    opacity: 0;

    visibility: hidden;

    transition: .2s;

    z-index: 1045;

}



body.userlist-open .userlist-dim {

    opacity: 1;

    visibility: visible;

}



/* 8) Toolbar sadeleştir */

.chat-toolbar {

    padding: 6px;

    gap: 6px;

}



.chat-toolbar .sep,

.chat-toolbar .alt-link {

    display: none;

}

}



/* ===== Alt hızlı menü (opsiyonel) ===== */

@media (max-width:576px) {

    .bottom-quickbar {

        position: fixed;

        left: 0;

        right: 0;

        bottom: 0;

        height: calc(48px + env(safe-area-inset-bottom));

        padding-bottom: env(safe-area-inset-bottom);

        background: var(--panel);

        border-top: 1px solid var(--border);

        display: grid;

        grid-template-columns: repeat(4, 1fr);

        z-index: 1080;

    }



    .bottom-quickbar button {

        background: none;

        border: 0;

        padding: 6px 4px;

        font-size: 18px;

    }



    .inputbar {

        margin-bottom: 48px;

    }



    /* alt menü ile çakışmasın */

}





@media (max-width:576px) {



    /* Sekme şeridi daha sıkı */

    #tabs {

        gap: 4px;

        padding: 4px 6px;

        max-height: 42px;

        border-radius: 0 0 4px 4px;

        /* eskisi 48px idi */

        overflow-y: hidden;

        overflow-x: auto;

        scrollbar-width: thin;

    }



    /* Sekme butonları daha küçük */

    #tabs button {

        font-size: 12px;

        /* eskisi 13–14px */

        padding: .28rem .50rem;

        border-radius: 10px;

        /* daha ince görünüm */

        gap: .35rem;

        flex: 0 0 auto;

        /* shrink yok; yatay kaydır */

    }



    /* Kapat (X) düğmesi ufalt */

    #tabs .close-tab-button {

        font-size: 14px;

        margin-left: 2px;

        padding: 0 .15rem;

        opacity: .8;

    }



    /* Aktif sekmede gölgeyi azalt → daha kompakt */

    #tabs button.active {

        box-shadow: 0 3px 10px rgba(59, 130, 246, .18);

    }

}



/* Mobilde topic ve selamlama gizle (≤576px) */

@media (max-width:576px) {



    #topic-header,

    #greeting-message {

        display: none !important;

    }

}





/* ===== Dark mode: tüm ana token'ları değiştir ===== */

body.dark {

    /* Temel renkler */

    --bg: #0f1420;

    --panel: #0b1220;

    --soft: #121a28;

    --text: #e6edf6;

    --muted: #94a3b8;

    --border: #1f2a3a;

    --shadow: 0 8px 28px rgba(0, 0, 0, .35);

    /* İstersen bir tık koyu bir primary seçebilirsin */

    /* --primary: #3b82f6; (aynen kalabilir) */



    /* Balonlar zaten yukarıda override ediliyor, burada hatırlatma: */

    /* --bubble-me, --bubble-you vs. set edilmiş durumda */

}



/* Mesaj alanının arka planını gerçekten koyulaştır */

body.dark #messages {

    background: linear-gradient(180deg, #0f172a 0%, #0a0f1a 100%) !important;

    background-image: none !important;

    /* açık temadaki filigran/gradienti kapat */

    color: var(--text);

}



/* Kart/çerçeve yüzeyler koyu panellerle uyumlu olsun */

body.dark .chat-card,

body.dark .topbar,

body.dark #userlist-sidebar,

body.dark .dropdown-menu,

body.dark .modal-content {

    background: var(--panel);

    color: var(--text);

    border-color: var(--border);

}



/* Input ve küçük yüzeyler */

body.dark .inputbar,

body.dark .chat-toolbar {

    background: var(--panel);

    border-color: var(--border);

}



body.dark .inputbar input {

    background: #0f1725;

    border-color: var(--border);

    color: var(--text);

}



/* Sekmeler koyu görünüm */

body.dark #tabs {

    background: var(--panel);

    border-color: var(--border);

}



body.dark #tabs button {

    background: var(--soft);

    border-color: var(--border);

    color: var(--text);

}



body.dark #tabs button.active {

    color: #fff;

}



/* Login kartı koyu uyum (giriş ekranı da kararsın) */

body.dark .login-card {

    background: rgba(2, 6, 23, .55);

    border-color: rgba(148, 163, 184, .22);

    box-shadow: 0 20px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .05);

}



/* Alt linkler, ufak bordürlü elemanlar */

body.dark .alt-link {

    border-color: var(--border);

    color: var(--text);

}



.theme-btn-img {

    width: 35px;

    height: 35px;

    border-radius: 60%;

    border: none;

    outline: none;

    background: url('https://cdn-icons-png.flaticon.com/512/6714/6714978.png') center/60% no-repeat,

        rgba(255, 255, 255, .1);

    backdrop-filter: blur(6px);

    transition: all .3s ease;

    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);

}



.theme-btn-img:hover {

    transform: scale(1.05);

    background-color: rgba(255, 255, 255, .2);

}



body.dark .theme-btn-img {

    background-image: url('https://cdn-icons-png.flaticon.com/512/6714/6714985.png');

}



/* Mobilde tab bar: çok sekme olursa sadece tab alanı dikey scroll olsun */

@media (max-width:576px) {

    #tabs {

        display: flex;

        flex-wrap: wrap;

        /* çoksa 2+ satıra sarılsın */

        gap: 3px;

        padding: 5px 3px;



        max-height: 92px;

        /* görünür yükseklik (2 satır gibi) */

        overflow-y: auto;

        /* sadece tab alanı kayar */

        overflow-x: hidden;

        /* yatay kaydırma yok */

        -webkit-overflow-scrolling: touch;

        /* iOS akıcı scroll */

        background: var(--panel);

        border-bottom: 1px solid var(--border);

    }



    #tabs button {

        flex: 0 0 auto;

        max-width: none;

        font-size: 12.5px;

        padding: .35rem .6rem;

    }

}



/* Varsayılan: mobil buton gizli, desktop görünsün */

#toggle-userlist-mobile {

    display: none;

}



#toggle-userlist {

    display: inline-grid;

}



/* ≤576px: mobil buton görünsün, desktop gizlensin + off-canvas */

@media (max-width:576px) {

    #toggle-userlist-mobile {

        display: inline-grid;

    }



    #toggle-userlist {

        display: none;

    }



    #userlist-sidebar {

        position: fixed;



        right: 0;

        bottom: 0;

        width: min(50vw, 340px);

        transform: translateX(100%);

        transition: transform .25s ease;

        border-left: 1px solid var(--border, #e5e7eb);

        border-radius: 0 0 0 0;

        z-index: 1050;

        background: var(--panel, #fff);

        overflow-y: auto;

        -webkit-overflow-scrolling: touch;

        will-change: transform;

    }



    body.userlist-open #userlist-sidebar {

        transform: none;

    }



    .userlist-dim {

        position: fixed;

        inset: 0;

        background: rgba(2, 6, 23, .45);

        backdrop-filter: blur(2px);

        opacity: 0;

        visibility: hidden;

        transition: .2s;

        z-index: 1045;

    }



    body.userlist-open .userlist-dim {

        opacity: 1;

        visibility: visible;

    }

}



@media (max-width:576px) {

    #toggle-userlist-mobile {

        position: relative;

        z-index: 1101;

        /* sidebar(1050) ve dim(1045)’in üstünde */

        /* istersen küçük bir offset: */

        /* margin: 6px 8px; */

    }

}



/* ===================== MOBİL KULLANICI LİSTESİ GİZLEME MANTIĞI ===================== */

@media (max-width: 576px) {



    /* Varsayılan olarak mobil butonu Topbar içinde görünür yapalım */

    #toggle-userlist-mobile {

        display: block !important;
        /* Mobil butonu görünür yap */

        /* Buton için mobil boyutlandırma (eğer topbar içinde ise) */

        width: 38px;

        height: 38px;

        font-size: 20px;

        border-radius: 60%;

        color: var(--primary);

        background: var(--soft);

        padding: 0;

        cursor: pointer;

    }



    /* 1. Kural: PM (Özel Mesaj) açıkken gizle */

    /* Uygulamanız PM açıldığında body'ye 'pm-open' sınıfını ekliyorsa: */

    body.pm-open #toggle-userlist-mobile {

        display: none !important;

    }



    /* 2. Kural: Status (Durum/Servis Mesajı) açıkken gizle */

    /* Uygulamanız Status açıldığında body'ye 'status-open' sınıfını ekliyorsa: */

    body.status-open #toggle-userlist-mobile {

        display: none !important;

    }



    /* 💡 NOT: Kanal açıkken (body'de bu sınıflar yoksa) butonu göstermeye devam eder. */

}

/* =================================================================================== */


/* =========================================
   Modern Modal Tasarımı (nice-modal)
========================================= */

/* Arka planı biraz daha yumuşat */
.modal-backdrop.show {
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.9));
    opacity: 1;
}

/* Temel dialog boyutu ve animasyon */
.modal.fade.nice-modal .modal-dialog {
    margin: 1.5rem auto;
    transform: translateY(12px) scale(.96);
    opacity: 0;
    transition:
        transform 180ms ease-out,
        opacity 180ms ease-out;
}

.modal.show.nice-modal .modal-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* İç kart görünümü */
.nice-modal .modal-content {
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.45);
    overflow: hidden;
}

/* Başlık alanı */
.nice-modal .modal-header {
    border-bottom: none;
    padding: 1rem 1.3rem .4rem;
}

.nice-modal .modal-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .45rem;
}

/* Eğer ikon kullanmak istersen: <span class="modal-title-icon"><i ...> */
.nice-modal .modal-title-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: rgba(59, 130, 246, 0.14);
    color: #2563eb;
}

/* Başlık altı ince açıklama: <div class="modal-subtitle">... */
.nice-modal .modal-subtitle {
    font-size: .78rem;
    color: #6b7280;
    margin-top: .2rem;
}

/* Kapat butonu */
.nice-modal .btn-close {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background-color: rgba(148, 163, 184, 0.18);
    opacity: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nice-modal .btn-close:hover {
    background-color: rgba(148, 163, 184, 0.34);
}

/* İçerik */
.nice-modal .modal-body {
    padding: .6rem 1.3rem 1.1rem;
    font-size: .9rem;
}

/* Scrollable büyük modallar (gizlilik/sözleşme/sticker) daha ferah olsun */
.nice-modal.modal .modal-dialog.modal-lg .modal-body {
    max-height: min(70vh, 600px);
}

/* Form elemanları */
.nice-modal .form-control,
.nice-modal .form-select {
    border-radius: 10px;
    border-color: #e5e7eb;
    font-size: .9rem;
}

.nice-modal .form-control:focus,
.nice-modal .form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

/* Checkbox satırları */
.nice-modal .form-check {
    font-size: .88rem;
}

/* Alt kısım */
.nice-modal .modal-footer {
    border-top: none;
    padding: .7rem 1.3rem 1.1rem;
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
}

/* Butonlar (pill stil) */
.nice-modal .btn-primary,
.nice-modal .btn-secondary,
.nice-modal .btn-info,
.nice-modal .btn-outline-secondary {
    border-radius: 999px;
    padding: .45rem 1.2rem;
    font-size: .84rem;
    font-weight: 500;
}

/* Sticker grid örnek iyileştirme */
.nice-modal .sticker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: .5rem;
}

.nice-modal .sticker-grid button {
    border: none;
    background: transparent;
    padding: .35rem;
    border-radius: 12px;
    transition: transform 120ms ease-out, background-color 120ms ease-out;
}

.nice-modal .sticker-grid button img {
    display: block;
    width: 36px;
    height: 36px;
    margin: 0 auto;
}

.nice-modal .sticker-grid button:hover {
    background: rgba(148, 163, 184, 0.16);
    transform: translateY(-1px);
}

/* Küçük modallar (sm) */
.nice-modal .modal-dialog.modal-sm .modal-content {
    border-radius: 16px;
}

/* Mobilde boyutlar */
@media (max-width: 576px) {
    .nice-modal .modal-dialog {
        margin: 1rem;
        max-width: 100%;
    }

    .nice-modal .modal-content {
        border-radius: 16px;
    }
}

/* ============================
   Dark tema uyumu
============================ */

body.dark .nice-modal .modal-content {
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
    color: #e5e7eb;
    border-color: rgba(51, 65, 85, 0.9);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.8);
}

body.dark .nice-modal .modal-subtitle {
    color: #9ca3af;
}

body.dark .nice-modal .modal-title-icon {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

body.dark .nice-modal .btn-close {
    background-color: rgba(30, 64, 175, 0.85);
}

body.dark .nice-modal .btn-close:hover {
    background-color: rgba(30, 64, 175, 1);
}

body.dark .nice-modal .form-control,
body.dark .nice-modal .form-select {
    background-color: rgba(15, 23, 42, 0.96);
    border-color: #1f2937;
    color: #e5e7eb;
}

body.dark .nice-modal .form-control::placeholder,
body.dark .nice-modal .form-select::placeholder {
    color: #6b7280;
}

body.dark .nice-modal .sticker-grid button:hover {
    background: rgba(55, 65, 81, 0.7);
}

#userlist .ul-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

#userlist .ul-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

#userlist .ul-name {
    font-size: 13px;
    font-weight: 600;
}

#userlist .ul-role {
    font-size: 11px;
    opacity: .7;
    /* tema değişkenin varsa kullanabilirsin: */
    color: var(--muted, #6b7280);
}

/* Yazıyor... göstergesi */
.typing-indicator {
    flex: 0 0 auto;
    margin-left: 8px;
    font-size: 11px;
    line-height: 1.3;
    color: var(--muted, #6b7280);
    min-width: 80px;
    min-height: 14px;
    opacity: 0;
    transition: opacity 0.15s ease;
    white-space: nowrap;
}

.typing-indicator.active {
    opacity: 1;
}

/* === Bağlantı koptu overlay'i === */
.disconnect-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .75);
    /* koyu yarı saydam */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.disconnect-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 28px 32px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .35);
}

.disconnect-title {
    font-size: 20px;
    font-weight: 700;
    color: #4c1d95;
    /* mor ton, istersen var(--primary) yap */
    margin-bottom: 8px;
}

.disconnect-text {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 20px;
}

.disconnect-btn {
    display: inline-block;
    min-width: 180px;
    border-radius: 999px;
    font-weight: 600;
}

/* Karanlık tema uyumu */
body.dark .disconnect-card {
    background: var(--panel, #1f2937);
    color: var(--text, #e5e7eb);
}

body.dark .disconnect-text {
    color: var(--muted, #9ca3af);
}

/* ========= FX VIDEO OVERLAY ========= */
#fx-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    /* En üstte dursun */
    pointer-events: none;
    /* Tıklamalar alttaki chatte çalışsın */
    background: transparent;
    opacity: 0;
    transition: opacity 0.35s ease;
}

#fx-overlay.fx-visible {
    opacity: 1;
}

/* Artık kart değil, tüm ekranı kaplayan arka plan efekti */
#fx-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ekranı doldur */
    border-radius: 0;
    box-shadow: none;
    opacity: 0.4;
    /* Biraz şeffaf olsun ki chat okunabilsin */
    filter: blur(1px);
    /* İstersen sil, hafif flu hoş duruyor */
}

/* ===================================== */

/* Varsayılan (tüm ekranlar için küçük dokunuş) */
#channel-sidebar {
    padding: 8px 8px 8px 4px;
}

#channel-sidebar .channel-head {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted, #64748b);
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 4px;
}

/* 1) MOBİL / TABLET (≤ 991.98px)
   - Eski davranış: kanallar üstte yatay bar gibi
*/
@media (max-width: 991.98px) {
    .app-grid {
        display: flex;
        flex-direction: column;
    }

    /* Sıra: önce kanallar, sonra sohbet */
    #channel-sidebar {
        order: 1;
        /* YÜKSEKLİK PROBLEMİNİ ÇÖZEN KISIM */
        height: auto;
        /* 100%'ü boz */
        min-height: 0;
        flex: 0 0 auto;
        /* İçeriği kadar yer kaplasın */

        border: 0;
        border-radius: 0;
        background: transparent;
        padding: 0 8px 4px;
        max-height: none;
        margin-left: 0;
        margin-bottom: .5rem;
    }

    .chat-card {
        order: 2;
        flex: 1 1 auto;
        /* kalan tüm alan sohbet alanına */
    }

    #userlist-sidebar {
        order: 3;
    }

    /* Kanallar yatay sekme gibi */
    #channel-sidebar #tabs {
        display: flex;
        flex-direction: row;
        gap: 0px;
        overflow-x: auto;
        white-space: nowrap;
    }

    #channel-sidebar .channel-head {
        display: none;
        /* mobilde başlığı gizleyebilirsin */
    }
}


/* ===================== WEB DÜZEN – USERLIST + KANAL (≥992px) ===================== */
@media (min-width: 992px) {

    /* Ana grid: sohbet + userlist + kanal */
    .app-grid {
        display: flex;
        align-items: stretch;
    }

    /* Sol: sohbet kartı geniş */
    .chat-card {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
    }

    /* Orta: kullanıcı listesi */
    #userlist-sidebar {
        order: 2;
        flex: 0 0 240px;
        margin-left: 8px;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        position: static !important;
        transform: none !important;
        border-radius: 1px 1px 16px 16px;
        width: 240px;
        border-radius: 16px;
    }

    /* Sağ: kanal listesi – görünüm userlist gibi */
    #channel-sidebar {
        order: 3;
        flex: 0 0 220px;
        margin-left: 8px;
        border-left: 1px solid rgba(148, 163, 184, .35);
        display: flex;
        flex-direction: column;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        padding: 8px 8px 8px 4px;
    }

    #channel-sidebar .channel-head {
        font-size: 13px;
        font-weight: 600;
        color: var(--muted, #64748b);
        text-transform: uppercase;
        letter-spacing: .03em;
        margin-bottom: 4px;
    }

    /* Kanallar dikey liste */
    #channel-sidebar #tabs {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch;
        gap: 4px;
    }

    /* Kanal satırı – userlist satırı gibi */
    #channel-sidebar #tabs > * {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        padding: 6px 10px;
        margin: 2px 0;
        border-radius: 8px;
        border: 0;
        background: transparent;
        font-size: 14px;
        text-align: left;
        cursor: pointer;
        color: var(--muted, #64748b);
    }

    /* Aktif kanal */
    #channel-sidebar #tabs > *.active,
    #channel-sidebar #tabs > *[aria-selected="true"] {
        background: var(--soft, #eef3ff);
        color: var(--text, #0f172a);
        box-shadow: 0 0 0 1px rgba(59, 130, 246, .25);
    }
}

/* ===== KANAL LİSTESİNİ USERLIST GİBİ DİKEY YAP (MASAÜSTÜ) ===== */
@media (min-width: 992px) {

    /* Kanal paneli içindeki tabs konteyneri dikey liste olsun */
    #channel-sidebar #tabs {
        display: flex !important;
        flex-direction: column !important;
        /* yan yana değil, alt alta */
        align-items: stretch;
        gap: 4px;
        padding: 8px;
        overflow-y: auto;
        overflow-x: hidden;
        /* yatay scrollbar’ı kaldır */
    }

    /* Her kanal satırı – userlist satırı gibi */
    #channel-sidebar #tabs button {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        margin: 2px 0;
        padding: 6px 8px;

        border: 0;
        border-radius: 8px;
        background: transparent;
        box-shadow: none;

        font-size: 13px;
        color: var(--col-user, #0b1a2b);
        text-align: left;
        white-space: nowrap;
        /* isim uzun olursa da taşmasın */
    }

    /* Aktif kanal – userlist’te seçili satır gibi */
    #channel-sidebar #tabs button.active,
    #channel-sidebar #tabs button[aria-selected="true"] {
        background: var(--soft, #eef3ff);
        color: var(--text, #0f172a);
        box-shadow: 0 0 0 1px rgba(59, 130, 246, .25);
    }
}

/* ===== MASAÜSTÜNDE KANAL LİSTESİNİ USERLIST GİBİ DİKEY VE TAM BOY YAP ===== */
@media (min-width: 992px) {

    /* Kanal kolonunun iç düzeni */
    #channel-sidebar {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch;
    }

    /* Başlık sabit, sadece kendi yüksekliği kadar */
    #channel-sidebar .channel-head {
        flex: 0 0 auto;
    }

    /* Kanal listesi tüm kalan yüksekliği kullansın + dikey scroll olsun */
    #channel-sidebar #tabs {
        flex: 1 1 auto;
        min-height: 0;
        padding: 0px;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Her kanal satırı userlist satırı gibi, tam genişlikte olsun */
    #channel-sidebar #tabs > * {
        display: flex !important;
        align-items: center;
        width: 100% !important;
        max-width: none !important;
        margin: 2px 0;
        padding: 6px 8px;

        border-radius: 8px !important;
        border: 0 !important;
        box-shadow: none !important;
        background: transparent;
        color: var(--col-user, #0b1a2b);
        text-align: left;
        cursor: pointer;
    }

    /* Aktif kanal – userlist’te seçili satır gibi görünsün */
    #channel-sidebar #tabs > *.active,
    #channel-sidebar #tabs > *[aria-selected="true"] {
        background: var(--soft, #eef3ff) !important;
        color: var(--text, #0f172a) !important;
        box-shadow: 0 0 0 1px rgba(59, 130, 246, .25);
    }
}

/* ===== SAĞDAKİ KANAL PANELİ – MASAÜSTÜ (≥992px) ===== */
@media (min-width: 992px) {

    /* Kanal paneli kendi içinde kolon olsun */
    #channel-sidebar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        height: 100%;
    }

    /* Başlık sabit kalsın */
    #channel-sidebar .channel-head {
        flex: 0 0 auto;
        margin-bottom: 4px;
    }

    /* Asıl kanal listesi: tüm boşluğu doldursun + dikey scroll olsun */
    #channel-sidebar #tabs {
        flex: 1 1 auto;
        min-height: 0;
        padding: 8px;

        display: flex !important;
        flex-direction: column !important;
        /* alt alta */
        align-items: stretch;

        gap: 4px;
        overflow-y: auto;
        overflow-x: hidden;

        max-height: none !important;
        /* üstteki #tabs ayarını ez */
        white-space: normal;
    }

    /* Her kanal satırı tam genişlikte buton gibi olsun */
    #channel-sidebar #tabs > * {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;

        width: 100% !important;
        max-width: none !important;
        margin: 2px 0;
        padding: 6px 10px;

        border: 0 !important;
        border-radius: 8px !important;
        background: transparent;
        box-shadow: none !important;

        font-size: 13px;
        color: var(--col-user, #0b1a2b);
        text-align: left;
        cursor: pointer;
    }

    /* Aktif kanal vurgusu */
    #channel-sidebar #tabs > *.active,
    #channel-sidebar #tabs > *[aria-selected="true"] {
        background: var(--soft, #eef3ff) !important;
        color: var(--text, #0f172a) !important;
        box-shadow: 0 0 0 1px rgba(59, 130, 246, .25);
    }
}

/* ===== MASAÜSTÜ: KANAL LİSTESİNE MODERN GÖRÜNÜM ===== */
@media (min-width: 992px) {

    /* Panel iç padding + başlık */
    #channel-sidebar {
        padding: 2px 0px 0px;
    }

    #channel-sidebar .channel-head {
        flex: 0 0 auto;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .12em;
        text-transform: uppercase;
        color: var(--muted, #64748b);
        margin: 0 0 6px;
    }

    /* Liste tam boy + dikey scroll */
    #channel-sidebar #tabs {
        flex: 1 1 auto;
        min-height: 0;
        padding: 4px;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Her kanal satırı – “chip” tarzı buton */
    #channel-sidebar #tabs button {
        position: relative;
        display: flex !important;
        align-items: center;
        gap: 8px;

        width: 100% !important;
        max-width: none !important;
        margin: 2px 0;
        padding: 6px 10px 6px 30px;

        /*border-radius: 999px !important;*/
        border: 1px solid transparent !important;
        background: transparent;
        box-shadow: none !important;

        font-size: 13px;
        font-weight: 500;
        color: var(--col-user, #0b1a2b);
        text-align: left;
        cursor: pointer;

        transition:
            background .15s ease,
            border-color .15s ease,
            transform .08s ease;
    }

    /* Sol tarafta küçük ikon balonu (istersen # yaparsın) */
    #channel-sidebar #tabs button::before {
        /*content: "🌐"; /* dilersen "#" yapabilirsin */
        position: absolute;
        left: 8px;
        top: 50%;
        transform: translateY(-50%);

        width: 18px;
        height: 18px;
        border-radius: 999px;
        display: grid;
        place-items: center;

        font-size: 11px;
        background: rgba(59, 130, 246, .12);
        color: #2563eb;
    }

    /* Hover efekti */
    #channel-sidebar #tabs button:hover {
        background: rgba(148, 163, 184, .10);
        border-color: rgba(148, 163, 184, .55) !important;
        transform: translateX(1px);
    }

    /* Aktif kanal */
    #channel-sidebar #tabs button.active,
    #channel-sidebar #tabs button[aria-selected="true"] {
        background: var(--soft, #eef3ff) !important;
        border-color: rgba(59, 130, 246, .55) !important;
        color: var(--text, #0f172a) !important;
        box-shadow: 0 0 0 1px rgba(59, 130, 246, .30);
    }

    /* Sağdaki kırmızı X (close-tab-button) daha şık dursun */
    #channel-sidebar #tabs button .close-tab-button {
        margin-left: auto;
        padding-left: 6px;
        font-size: 13px;
        opacity: .5;
        transition:
            opacity .15s ease,
            transform .08s ease,
            color .15s ease;
    }

    #channel-sidebar #tabs button .close-tab-button:hover {
        opacity: 1;
        color: #ef4444;
        transform: scale(1.12);
    }
}

/* ===== KANALDA YENİ MESAJ VURGUSU (MASAÜSTÜ) ===== */
@keyframes channelPing {
    0% {
        transform: translateX(0);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, .65);
    }

    60% {
        transform: translateX(1px);
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
    }

    100% {
        transform: translateX(0);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

@media (min-width: 992px) {

    /* Aktif olmayan kanalda yeni mesaj varsa vursun / nabız atsın */
    #channel-sidebar #tabs button.new-message:not(.active):not([aria-selected="true"]) {
        background: rgba(59, 130, 246, .10) !important;
        border-color: rgba(59, 130, 246, .80) !important;
        color: var(--text, #0f172a) !important;
        animation: channelPing 1.2s ease-out infinite;
    }

    /* Küçük mavi nokta da olsun istersen */
    #channel-sidebar #tabs button.new-message:not(.active)::after {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: #3b82f6;
        margin-left: 6px;
        flex: 0 0 auto;
    }
}

@media (min-width: 992px) {
    #channel-sidebar #tabs .close-tab-button {
        margin-left: auto;
        padding-left: 6px;
        font-size: 14px;
        /* istersen 12–13 yap */
    }
}

/* ================== MOBİL KANAL GÖRÜNÜMÜNÜ ESKİ HALİNE ÇEVİR ================== */
@media (max-width: 991.98px) {

    /* Kanal panelini ayrı bir kutu gibi değil, üstteki tab bar gibi göster */
    #channel-sidebar {
        border: 0;
        border-radius: 0;
        background: transparent;
        padding: 0 8px 4px;
        max-height: none;
        margin-left: 0;
    }

    /* "KANALLAR" başlığını mobilde gizle */
    #channel-sidebar .channel-head {
        display: none !important;
    }

    /* Kanallar yatay şerit olsun (eski #tabs davranışı) */
    #channel-sidebar #tabs {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        gap: 6px;
        padding: 6px 0;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        scrollbar-width: thin;
    }

    /* Her kanal pill gibi dursun */
    #channel-sidebar #tabs > * {
        flex: 0 0 auto;
        border-radius: 999px !important;
        margin: 0;
    }

    /* Mobilde X sağa yapışmasın, normal dursun */
    #channel-sidebar #tabs .close-tab-button {
        margin-left: 4px;
        /* auto değil */
    }
}

/* Varsayılan: hepsi serbest (desktop/mobil kendi @media kuralların çalışıyor) */

/* Status veya PM sekmesi açıksa userlist butonlarını gizle */
body.mode-status #toggle-userlist,
body.mode-status #toggle-userlist-mobile,
body.mode-pm #toggle-userlist,
body.mode-pm #toggle-userlist-mobile {
    display: none !important;
}

/* Kanal sekmesindeyken userlist butonları aktif olsun */
body.mode-channel #toggle-userlist {
    display: inline-grid;
    /* senin desktop için kullandığın display neyse */
}

/* Mobilde de yalnız kanal açıkken görünsün */
@media (max-width:576px) {
    body.mode-channel #toggle-userlist-mobile {
        display: block !important;
    }
}

/* ===== Kullanıcı Aksiyon Menüsü ===== */

.user-action-menu {
    position: absolute;
    min-width: 180px;
    background: var(--panel, #fff);
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .20);
    border: 1px solid rgba(148, 163, 184, .35);
    z-index: 2500;
    padding: 6px 0;
    font-size: 13px;
}

.user-action-menu.hidden {
    display: none;
}

.user-action-menu .uam-header {
    padding: 6px 10px 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted, #6b7280);
    border-bottom: 1px solid rgba(148, 163, 184, .2);
}

.user-action-menu #uam-nick {
    font-weight: 700;
    text-transform: none;
}

.user-action-menu .uam-item {
    width: 100%;
    padding: 6px 10px;
    border: 0;
    background: transparent;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text, #0f172a);
}

.user-action-menu .uam-item i {
    font-size: 15px;
}

.user-action-menu .uam-item:hover {
    background: var(--soft, #eef3ff);
}

.user-action-menu .uam-sep {
    margin: 4px 0;
    border-top: 1px solid rgba(148, 163, 184, .25);
}

/* Dark uyumu */
body.dark .user-action-menu {
    background: var(--panel, #0b1220);
    border-color: var(--border, #1f2937);
}

body.dark .user-action-menu .uam-item:hover {
    background: rgba(31, 41, 55, .9);
}

/* 992px ve üzeri ekranlar için genel sekme kapatma butonu */
@media (min-width: 992px) {
    #tabs button .close-tab-button {
        /* Bu seçici, 'ID > Etiket > Sınıf' özgüllüğüne sahiptir ve çok güçlüdür. */
        margin-left: auto !important;
    }
}

/* ==== H-CHAT LIGHT THEME – RENK GÜNCELLEME ==== */
:root {
    /* Font değişkenlerini istersen aynen koru */
    --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", Helvetica, Arial, sans-serif;
    --font-jakarta: "Plus Jakarta Sans", var(--font-sans);
    --font-lexend: "Lexend", var(--font-sans);

    --text-size: 15px;
    --text-leading: 1.45;
    --text-track: .1px;

    /* ANA RENKLER */
    --bg: #e9f1ff;
    /* sayfa zemini */
    --panel: #ffffff;
    /* kartlar, topbar, yan paneller */
    --soft: #edf3ff;
    /* yumuşak doldurma alanları */
    --card: #ffffff;

    --text: #0b1220;
    --muted: #6b7280;
    --primary: #2563eb;
    /* ana mavi */
    --border: rgba(148, 163, 184, .45);
    --shadow: 0 18px 45px rgba(15, 23, 42, .08);

    --radius: 18px;
    --topbar-h: 56px;
    --inputbar-h: 56px;

    /* Bubble renkleri (PM) */
    --bubble-me: #e7f0ff;
    --bubble-you: #ffffff;
    --bubble-me-border: #bfd3ff;
    --bubble-you-border: #e2e8f0;

    /* Userlist renkleri aynı kalabilir ama hafif parlattım */
    --col-founder: #d97706;
    --col-admin: #7c3aed;
    --col-op: #2563eb;
    --col-halfop: #059669;
    --col-voice: #0ea5e9;
    --col-user: #0b1a2b;
}

/* Sayfa zemini – çok hafif gradient */
body {
    background:
        radial-gradient(1100px 600px at 10% -10%, rgba(129, 140, 248, .16), transparent 60%),
        radial-gradient(900px 500px at 110% 110%, rgba(45, 212, 191, .14), transparent 60%),
        linear-gradient(180deg, #f4f7ff 0%, #e9f1ff 40%, #f5f7ff 100%);
    color: var(--text);
    font-family: var(--font-sans);
}

/* Topbar hafif cam efekti */
.topbar {
    background: rgba(255, 255, 255, .95);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
    backdrop-filter: blur(10px);
}

/* Ana sohbet kartı + yan paneller aynı stile girsin */
.chat-card,
#userlist-sidebar,
#channel-sidebar {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

/* Input bar ve toolbar uyumlu olsun */
.chat-toolbar,
.inputbar {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(148, 163, 184, .25);
}

/* Alt hızlı menü varsa onun da panel rengi */
.bottom-quickbar {
    background: rgba(255, 255, 255, .98);
    border-top: 1px solid var(--border);
}

/* Üst sekmeler */
#tabs button {
    background: var(--soft);
    border-color: transparent;
    color: var(--text);
}

#tabs button.active {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(37, 99, 235, .28);
}

/* Küçük ikon butonlar (emoji, userlist vs.) */
.icon-btn {
    background: rgba(248, 250, 252, .9);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, .35);
}

.icon-btn:hover {
    background: #e5edff;
}

/* Aktif ikon */
.icon-btn.active {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    border-color: transparent;
}

/* ==== DARK THEME RENKLER ==== */
body.dark {
    --bg: #020617;
    --panel: #020617;
    --soft: #0b1120;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #1e293b;
    --shadow: 0 18px 48px rgba(0, 0, 0, .8);
    --primary: #60a5fa;

    --bubble-me: #1d2a4a;
    --bubble-you: #020617;
    --bubble-me-border: #2c3e72;
    --bubble-you-border: #111827;
}

/* Dark arka plan */
body.dark {
    background:
        radial-gradient(1200px 700px at 0% 0%, rgba(37, 99, 235, .22), transparent 60%),
        radial-gradient(1000px 600px at 100% 100%, rgba(45, 212, 191, .18), transparent 60%),
        linear-gradient(180deg, #020617 0%, #020617 100%);
}

/* Dark topbar & kartlar */
body.dark .topbar,
body.dark .chat-card,
body.dark #userlist-sidebar,
body.dark #channel-sidebar {
    background: rgba(15, 23, 42, .92);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .06);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .65);
    backdrop-filter: blur(6px);
}

/* Dark input & toolbar */
body.dark .chat-toolbar,
body.dark .inputbar {
    background: #020617;
    border-color: var(--border);
}

/* Dark sekmeler */
body.dark #tabs button {
    background: #020617;
    border-color: transparent;
    color: var(--muted);
}

body.dark #tabs button.active {
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #f9fafb;
}

.message-line.topic {
    background: rgba(255, 255, 255, .65);
    padding: 4px 8px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

#messages {
    opacity: .94;
    /* çok hafif şeffaflık */
}

/* ==== DARK TEMA: TOOLBAR ICON DÜZELTME ==== */

body.dark .chat-toolbar {
    background: #020617;
    /* alt bar koyu */
    border-top: 1px solid #1e293b;
}

/* Icon butonların kendisi */
body.dark .icon-btn {
    background: #0b1220;
    /* koyu lacivert */
    color: #e5e7eb;
    /* açık gri ikon rengi */
    border: 1px solid #1f2937;
    /* ince koyu kenar */
    box-shadow: 0 2px 6px rgba(0, 0, 0, .55);
}

/* Icon’un kendisi buton rengini kullansın */
body.dark .icon-btn i {
    color: inherit;
}

/* Hover efekti */
body.dark .icon-btn:hover {
    background: #111827;
    border-color: #334155;
}


/* ===== TOOLBAR – MODERN PREMIUM STİL ===== */

/* Genel (light + dark ortak baz) */
.chat-toolbar {
    padding: 6px 10px;
    gap: 6px;
    border-top: 1px solid rgba(15, 23, 42, .08);
    background: rgba(15, 23, 42, 0.02);
    backdrop-filter: blur(8px);
}

/* Varsayılan icon buton */
.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, .30);
    background: radial-gradient(circle at 30% 0%, rgba(255, 255, 255, .6), rgba(255, 255, 255, .2));
    box-shadow:
        0 10px 25px rgba(15, 23, 42, .18),
        inset 0 0 0 0 rgba(255, 255, 255, .4);
    display: grid;
    place-items: center;
    color: #0f172a;
    transition:
        background .16s ease,
        border-color .16s ease,
        box-shadow .16s ease,
        transform .08s ease;
}

.icon-btn i {
    font-size: 16px;
    line-height: 1;
}

/* Hover/active */
.icon-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 14px 30px rgba(15, 23, 42, .25),
        inset 0 0 0 1px rgba(255, 255, 255, .5);
}

.icon-btn:active {
    transform: translateY(0);
    box-shadow:
        0 6px 18px rgba(15, 23, 42, .22),
        inset 0 0 0 1px rgba(255, 255, 255, .4);
}

/* Aktif durumda (örn. emoji açık, radyo açık vs.) */
.icon-btn.active {
    border-color: rgba(59, 130, 246, .9);
    background: radial-gradient(circle at 30% 0%, rgba(59, 130, 246, .6), rgba(37, 99, 235, .35));
    color: #eff6ff;
}

/* ===== DARK MODE VARYASYONU ===== */

body.dark .chat-toolbar {
    background: linear-gradient(180deg, #020617 0%, #020617 45%, #020617 100%);
    border-top: 1px solid #020617;
    box-shadow: 0 -8px 20px rgba(0, 0, 0, .8);
}

body.dark .icon-btn {
    border-color: rgba(15, 23, 42, .9);
    background:
        radial-gradient(circle at 20% 0%, rgba(148, 163, 184, .28), transparent 55%),
        radial-gradient(circle at 80% 120%, rgba(56, 189, 248, .18), rgba(15, 23, 42, .95));
    color: #e5e7eb;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, .80),
        inset 0 0 0 0 rgba(148, 163, 184, .3);
}

body.dark .icon-btn:hover {
    box-shadow:
        0 16px 40px rgba(0, 0, 0, .9),
        0 0 0 1px rgba(59, 130, 246, .55);
    border-color: rgba(59, 130, 246, .85);
}

body.dark .icon-btn.active {
    background:
        radial-gradient(circle at 15% 0%, rgba(59, 130, 246, .75), transparent 55%),
        radial-gradient(circle at 80% 120%, rgba(56, 189, 248, .35), #020617);
    border-color: rgba(96, 165, 250, 1);
    color: #dbeafe;
}

/* ===== LIGHT TEMA – PREMIUM ICON BUTTON ===== */

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;

    background:
        radial-gradient(circle at 30% 0%, rgba(255, 255, 255, .85), rgba(255, 255, 255, .55)),
        linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(240, 244, 255, .7));
    border: 1px solid rgba(148, 163, 184, .35);

    box-shadow:
        0 6px 16px rgba(15, 23, 42, .15),
        inset 0 0 0 0 rgba(255, 255, 255, .4);

    backdrop-filter: blur(6px);
    color: #1e293b;
    /* ikon daha görünür */
    transition: .15s ease;
}

.icon-btn i {
    font-size: 15px;
    color: inherit;
}

/* Hover */
.icon-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 10px 24px rgba(15, 23, 42, .22),
        inset 0 0 0 1px rgba(255, 255, 255, .7);
    border-color: rgba(148, 163, 184, .55);
    background:
        radial-gradient(circle at 30% 0%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .65)),
        linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(235, 240, 255, .75));
}

/* Aktif icon (emoji açık, ayarlar açık vs.) */
.icon-btn.active {
    background:
        radial-gradient(circle at 20% 0%, rgba(59, 130, 246, .8), rgba(59, 130, 246, .45)),
        linear-gradient(180deg, rgba(59, 130, 246, .95), rgba(96, 165, 250, .65));
    border-color: rgba(59, 130, 246, .9);
    color: #f0f6ff;
    box-shadow:
        0 12px 26px rgba(59, 130, 246, .38),
        inset 0 0 0 1px rgba(255, 255, 255, .25);
}

#channel-sidebar {
    background: rgba(255, 255, 255, .75);
    backdrop-filter: blur(12px);
    border-radius: 5px 5px 18px 18px;
    border: 1px solid rgba(148, 163, 184, .28);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .10);
}

/* =========================================
   Mobil Üst Sekme Switcher
========================================= */

.mobile-top-switcher {
    display: none;
    /* sadece mobilde açılacak */
    padding: 4px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    background: var(--card);
}

.mts-btn {
    flex: 1;
    border: none;
    outline: none;
    border-radius: 999px;
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
}

.mts-btn i {
    font-size: 14px;
}

.mts-btn-current {
    background: rgba(59, 130, 246, .08);
    /* primary-soft */
    color: var(--primary);
    font-weight: 600;
}

/* Liste paneli */

.mobile-list-panel {
    display: none;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    max-height: 40vh;
    overflow-y: auto;
    font-size: 13px;
    -webkit-overflow-scrolling: touch;
}

.mobile-list-panel.open {
    display: block;
}

.mobile-list-panel ul {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.mobile-list-panel li {
    padding: 6px 12px;
    cursor: pointer;
}

.mobile-list-panel li:hover {
    background: var(--soft);
}

.mobile-list-panel li.active {
    font-weight: 600;
}

.mobile-list-panel .mlp-empty {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--muted);
}

/* Sadece mobilde göster */
@media (max-width: 768px) {
    .mobile-top-switcher {
        display: flex;
    }
}

/* ================================
   MOBİL ÜST MENÜ (Kanallar / Aktif / Özeller)
   + Liste paneli + scroll + X kapatma
================================== */

.mobile-top-switcher {
    display: none;
}

.mobile-top-switcher .mts-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 4px;
    border: 1px solid var(--border, #e5e7eb);
    background: var(--soft, #eef3ff);
    color: var(--text, #0f172a);
    border-radius: 12px;
    font-weight: 500;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
}

.mobile-top-switcher .mts-btn i {
    font-size: 18px;
}

.mobile-top-switcher .mts-btn-current {
    background: var(--primary, #3b82f6);
    color: #fff;
    border-color: transparent;
}

.mobile-list-panel {
    display: none;
    margin-top: 6px;
    border-radius: 12px;
    background: var(--panel, #fff);
    border: 1px solid var(--border, #e5e7eb);
    box-shadow: var(--shadow, 0 6px 20px rgba(0, 0, 0, .08));
    max-height: 45vh;
    /* çok tab olunca scroll */
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.mobile-list-panel.open {
    display: block;
}

.mobile-list-panel .mlp-list {
    list-style: none;
    padding: 6px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-list-panel .mlp-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    background: transparent;
}

.mobile-list-panel .mlp-item:hover {
    background: var(--soft, #eef3ff);
}

.mobile-list-panel .mlp-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 28px);
    font-size: 14px;
}

.mobile-list-panel .mlp-close {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #ef4444;
    font-size: 18px;
    line-height: 1;
    padding: 0 4px;
}

.mobile-list-panel .mlp-empty {
    padding: 8px 10px;
    font-size: 12px;
    opacity: .7;
}

@media (max-width:576px) {
    .mobile-top-switcher {
        display: flex;
        gap: 8px;
        padding: 5px;
        margin: 0px 0 0;
        background: var(--panel, #fff);
        border: 1px solid var(--border, #e5e7eb);
        border-radius: 0px;
    }

    /* MOBİLDE ESKİ TAB BAR (SAĞ SİDEBAR) GİZLENSİN */
    #channel-sidebar {
        display: none !important;
    }
}

/* =========================
   PM BUBBLE HİZALAMA (sağ/sol)
   ========================= */
.pm-bubbles .msg-row {
    display: flex;
    width: 100%;
    margin: 6px 0;
}

.pm-bubbles .msg-row.me {
    justify-content: flex-end;
    /* benim mesajım sağda */
}

.pm-bubbles .msg-row.you {
    justify-content: flex-start;
    /* karşı taraf solda */
}

/* balon yazıya göre büyüsün, full-width olmasın */
.pm-bubbles .msg-row .bubble {
    display: inline-block;
    width: fit-content;
    max-width: min(78%, 620px);
    word-break: break-word;
}

/* =========================
   PM BUBBLE HİZALAMA (sağ/sol)
   ========================= */
.pm-bubbles .msg-row {
    display: flex;
    width: 100%;
    margin: 6px 0;
}

.pm-bubbles .msg-row.me {
    justify-content: flex-end;
    /* benim mesajım sağda */
}

.pm-bubbles .msg-row.you {
    justify-content: flex-start;
    /* karşı taraf solda */
}

/* balon yazıya göre büyüsün, full-width olmasın */
.pm-bubbles .msg-row .bubble {
    display: inline-block;
    width: fit-content;
    max-width: min(78%, 620px);
    word-break: break-word;
}

/* =========================
   PM ÜST AKSİYON BUTONLARI - MOBİL KÜÇÜLT
   ========================= */
@media (max-width: 576px) {
    .pm-actions {
        gap: 4px;
        flex-wrap: wrap;
        /* dar ekranda alt satıra geçsin */
    }

    .pm-actions .btn {
        padding: 2px 6px !important;
        font-size: 12px !important;
        line-height: 1.1;
        border-radius: 8px;
    }

    .pm-actions .btn i {
        font-size: 14px;
        margin-right: 4px;
    }
}
#popup-notice{
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 99999;
  background: rgba(15, 23, 42, .95);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  opacity: 0;
  transform: translateY(-10px) scale(.98);
  pointer-events: none;
  transition: all .25s ease;
}

#popup-notice.show{
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* küçük “pop” efekti */
#popup-notice.show{
  animation: popIn .25s ease;
}
@keyframes popIn{
  from{ opacity:0; transform: translateY(-12px) scale(.95); }
  to{ opacity:1; transform: translateY(0) scale(1); }
}


/* =========================
   Mini Toast (Hook bildirimleri)
========================= */
:root {
  --toast-bg: #0f172a;          /* koyu zemin */
  --toast-text: #f8fafc;
  --toast-border: rgba(255,255,255,.08);
  --toast-shadow: 0 8px 24px rgba(0,0,0,.18);

  --toast-success: #22c55e;
  --toast-error:   #ef4444;
  --toast-info:    #3b82f6;
  --toast-warn:    #f59e0b;
}

body.dark {
  --toast-bg: #0b1220;
  --toast-text: #e5e7eb;
  --toast-border: rgba(255,255,255,.06);
  --toast-shadow: 0 10px 28px rgba(0,0,0,.35);
}

.toast-stack{
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.toast{
  pointer-events: auto;
  width: auto;
  max-width: 260px;     /* küçük */
  min-width: 180px;
  padding: 8px 10px;    /* küçük */
  border-radius: 10px;
  background: var(--toast-bg);
  color: var(--toast-text);
  border: 1px solid var(--toast-border);
  box-shadow: var(--toast-shadow);
  font-size: 13px;      /* küçük font */
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  animation: toast-in .18s ease-out forwards;
}

.toast .t-ico{
  width: 18px; height: 18px;
  display:flex; align-items:center; justify-content:center;
  font-size: 14px;
}

.toast.success{ border-left: 3px solid var(--toast-success); }
.toast.error  { border-left: 3px solid var(--toast-error); }
.toast.info   { border-left: 3px solid var(--toast-info); }
.toast.warn   { border-left: 3px solid var(--toast-warn); }

.toast .t-msg{
  flex: 1;
  word-break: break-word;
}

.toast .t-close{
  background: transparent;
  border: 0;
  color: inherit;
  opacity: .6;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}
.toast .t-close:hover{ opacity: 1; }

@keyframes toast-in{
  to { opacity:1; transform: translateY(0) scale(1); }
}
@keyframes toast-out{
  to { opacity:0; transform: translateY(-6px) scale(.98); }
}


/* ===== TOAST MINI OVERRIDE (en alta ekle) ===== */
.toast-stack{
  top: 8px !important;
  right: 8px !important;
  gap: 4px !important;
}

.toast{
  max-width: 210px !important;   /* daha dar */
  min-width: 0 !important;       /* min genişliği kaldır */
  padding: 6px 8px !important;   /* daha küçük */
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  gap: 6px !important;
}

.toast .t-ico{
  width: 14px !important;
  height: 14px !important;
  font-size: 12px !important;    /* ikon küçülsün */
}

.toast .t-close{
  font-size: 14px !important;
  padding: 0 1px !important;
}

/* Mobilde daha da minik */
@media (max-width:576px){
  .toast{
    max-width: 180px !important;
    padding: 5px 7px !important;
    font-size: 11.5px !important;
  }
  .toast .t-ico{
    width: 12px !important;
    height: 12px !important;
    font-size: 11px !important;
  }
}


/* ===== POPUP NOTICE MINI OVERRIDE (en alta) ===== */
#popup-notice{
  position: fixed;
  top: 10px !important;
  right: 10px !important;
  z-index: 99999;

  /* boyut */
  padding: 6px 8px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;

  /* daha mini görünüm */
  max-width: 220px !important;
  min-width: 0 !important;

  /* renk/doku */
  background: rgba(15, 23, 42, .90) !important;  /* koyu ama yumuşak */
  color: #f8fafc !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.20) !important;

  /* animasyon başlangıcı */
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  pointer-events: none;
  transition: all .22s ease !important;
}

#popup-notice.show{
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: popInMini .22s ease;
}

@keyframes popInMini{
  from{ opacity:0; transform: translateY(-8px) scale(.96); }
  to  { opacity:1; transform: translateY(0) scale(1); }
}

/* Mobilde daha da küçük */
@media (max-width:576px){
  #popup-notice{
    top: 8px !important;
    right: 8px !important;
    padding: 5px 7px !important;
    font-size: 11.5px !important;
    max-width: 180px !important;
    border-radius: 8px !important;
  }
}
/* =========================
   POPUP NOTICE (küçük + tek konum)
   ========================= */
#popup-notice{
  position: fixed;
  right: 12px;
  bottom: 12px;

  /* ÜSTTEN gelen eski top kuralını öldür */
  top: auto !important;
  left: auto !important;

  z-index: 99999;
  width: fit-content;
  max-width: 220px;

  background: rgba(15, 23, 42, .92);
  color: #fff;

  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.25;

  box-shadow: 0 8px 20px rgba(0,0,0,.22);
  opacity: 0;
  transform: translateY(8px) scale(.98);   /* alttan çıkış hissi */
  pointer-events: none;
  transition: all .2s ease;
}

#popup-notice.show{
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: popIn .2s ease;
}

@keyframes popIn{
  from{ opacity:0; transform: translateY(10px) scale(.96); }
  to  { opacity:1; transform: translateY(0) scale(1); }
}

.topic-line{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  margin:6px 0;
  background: var(--soft, #eef3ff);
  border-left:3px solid var(--primary, #3b82f6);
  border-radius:8px;
  font-weight:600;
}
.topic-line .topic-label{ opacity:.7; }
.topic-line .topic-text{
  font-weight:500;
  word-break:break-word;
}

.topic-meta{
  margin:-2px 0 6px 22px;
  font-size:12px;
  opacity:.7;
}
.topic-box{
  background: var(--soft, #eef3ff);
  border: 1px solid var(--border, #e5e7eb);
  padding: 6px 12px;
  border-radius: 0px 0px 15px 15px;
  margin: 0px 0 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
}
.topic-box-title{
  display:flex; align-items:center; gap:8px;
  font-weight:700; margin-bottom:6px;
}
.topic-box-text{
  font-size: 14px;
  line-height:1.45;
  word-break: break-word;
}
.topic-box-meta{
  margin-top:6px;
  font-size:12px;
  color: var(--muted, #6b7280);
  display:flex; align-items:center; gap:6px;
}

/* ===== HCHAT logo üste gelsin (EN SON'a ekle) ===== */
#messages{
  /* 1) LOGO en üst katman, 2) desen, 3) zemin */
  background-image:
    url("https://harabe.org/hchatv4/assets/icons/HCHAT.png"),
    url("https://harabe.org/hchatv4/assets/icons/arka.png"),
    linear-gradient(180deg, #f7faff 0%, #ffffff 100%) !important;

  background-repeat:
    no-repeat,
    repeat,
    no-repeat !important;

  background-position:
    right 24px top 16px,  /* logo */
    center center,        /* desen */
    center top            /* zemin */
    !important;

  background-size:
    120px auto,           /* logo boyutu */
    420px auto,           /* desen boyutu */
    cover                 /* zemin */
    !important;

  background-attachment: scroll, scroll, scroll !important;
}

/* Mobilde logo küçülsün */
@media (max-width:768px){
  #messages{
    background-size:
      85px auto,
      360px auto,
      cover !important;

    background-position:
      right 12px top 10px,
      center center,
      center top !important;
  }
}

/* Dark mode’da da logo görünsün istiyorsan */
body.dark #messages{
  background-image:
    url("https://harabe.org/hchatv4/assets/icons/HCHAT.png"),
    url("https://harabe.org/hchatv4/assets/icons/arka.png"),
    linear-gradient(180deg, #0f172a 0%, #0a0f1a 100%) !important;

  background-repeat: no-repeat, repeat, no-repeat !important;
  background-position: right 24px top 16px, center center, center top !important;
  background-size: 110px auto, 420px auto, cover !important;
  opacity: 1 !important;
}
body.dark #messages{
  /* darkta biraz daha silik olsun */
  background-blend-mode: normal !important;
}
body.dark #messages{
  /* logoya hafif solukluk */
  filter: none !important;
}
body.dark #messages{
  /* sadece logonun opaklığını düşürmek için */
}
body.dark #messages{
  /* logoyu karartmak istersen */
}
#topic-header,
.topic-box{
  padding-right: 140px;
}
/* Nick renkleri */
.nick-colored{
  font-weight: 700;
}

/* ================================
   NICE BOOTSTRAP MODAL THEME
================================== */

.modal.nice-modal .modal-dialog{
  max-width: 560px;
  margin: 1.2rem auto;
}

.modal.nice-modal .modal-content{
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel, #fff);
  color: var(--text, #0f172a);
  box-shadow: 0 18px 55px rgba(0,0,0,.28);
}

body.dark .modal.nice-modal .modal-content{
  background: #0f172a;
  color: #e5e7eb;
}

.modal.nice-modal .modal-header{
  border: 0;
  padding: 12px 14px;
  background: linear-gradient(135deg,
    rgba(59,130,246,.18),
    rgba(16,185,129,.12)
  );
}
body.dark .modal.nice-modal .modal-header{
  background: linear-gradient(135deg,
    rgba(59,130,246,.22),
    rgba(16,185,129,.18)
  );
}

.modal.nice-modal .modal-title{
  font-weight: 800;
  letter-spacing: .2px;
  display:flex; align-items:center; gap:8px;
}

.modal.nice-modal .btn-close{
  filter: none;
  opacity: .8;
  border-radius: 10px;
  padding: 8px;
}
.modal.nice-modal .btn-close:hover{ opacity: 1; }

.modal.nice-modal .modal-body{
  padding: 14px;
  max-height: 70vh;
  overflow: auto;
}

.modal.nice-modal .modal-footer{
  border: 0;
  padding: 10px 14px 14px;
  gap: 8px;
  display:flex;
  justify-content:flex-end;
}

/* Mobilde bottom-sheet gibi aç */
@media (max-width: 576px){
  .modal.nice-modal .modal-dialog{
    margin: 0;
    position: fixed;
    left:0; right:0; bottom:0;
    max-width: 100%;
    transform: translateY(100%);
    transition: .2s ease;
  }
  .modal.show.nice-modal .modal-dialog{
    transform: translateY(0);
  }
  .modal.nice-modal .modal-content{
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
}
/* ==== PANEL KÖŞE + SİLİK UÇ EFEKTİ (en sona) ==== */
#userlist-sidebar,
#channel-sidebar,
.chat-card {
  border-radius: 0px 0px 15px 15px !important;

  box-shadow:
    0 0 0 1px rgba(15, 23, 42, .06),   /* o silik dış hat */
    0 8px 22px rgba(15, 23, 42, .06) !important;  /* derinlik */

  overflow: hidden;
}

/* Dark modda hat biraz farklı dursun */
body.dark #userlist-sidebar,
body.dark #channel-sidebar,
body.dark .chat-card {
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06),
    0 10px 26px rgba(0,0,0,.55) !important;
}


#userlist-sidebar{
  min-height: 0 !important;
}

#userlist{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;   /* <-- scroll burada */
  overflow-x: hidden !important;
  scrollbar-gutter: stable;
}


@media (min-width:992px){
  #userlist-sidebar{
    overflow: hidden !important;
  }
}
/* =======================================================
   1) MOBİL TOPIC BOX KÜÇÜLTME + CLAMP
======================================================= */
@media (max-width:576px){

  /* Topic alanı daha ince görünsün */
  #topic-header,
  .topic-box{
    padding: 6px 8px !important;
    margin: 4px 0 8px !important;
    border-radius: 0 0 12px 12px !important;
    padding-right: 12px !important; /* logodan dolayı verdiğin 140px'i mobilde iptal */
  }

  .topic-box-title{
    font-size: 12px !important;
    font-weight: 700 !important;
    margin-bottom: 4px !important;
    gap: 6px !important;
  }

  .topic-box-text{
    font-size: 12.5px !important;
    line-height: 1.35 !important;

    /* Çok uzunsa 2 satır göster, fazlasını kes */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .topic-box-meta{
    margin-top: 4px !important;
    font-size: 11px !important;
    gap: 4px !important;
    opacity: .75 !important;
  }
}

/* =======================================================
   2) MOBİLDE SAYFA OYNAMA / ROOT SCROLL KİLİT
   - Body sabit
   - Scroll sadece #messages içinde
======================================================= */
html, body{
  height: 100%;
  overflow: hidden !important;           /* sayfa scroll’u kapat */
  overscroll-behavior: none;             /* Android/Chrome bounce engel */
  touch-action: manipulation;            /* gereksiz bounce azalır */
}

/* Ana uygulama da sabit yükseklik */
#main{
  height: 100dvh;
  height: 100svh; /* iOS adres bar dalgalanmasına karşı */
  overflow: hidden !important;
}

/* Grid/kartlar da taşmasın */
.app-grid,
.chat-card{
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

/* Asıl scroll alanı mesajlar olsun */
#messages{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;  /* sadece mesaj içinde scroll */
  -webkit-overflow-scrolling: touch;
}

/* Input bar sabit dursun */
.inputbar{
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 10;
}
