* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  height: 100vh;
  display: flex;
  overflow: hidden;
  transition: background 0.3s, color 0.3s;
}

.info-roblox-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

/* ── ТЕМЫ ── */
.theme-dark {
  --bg: #0d1117; --surface: #161b22; --surface2: #1c2333;
  --border: rgba(255,255,255,0.08); --text: #e6edf3; --muted: #7d8590;
  --accent: #58a6ff; --accent-hover: #79b8ff;
  --green: #3fb950; --red: #f85149; --purple: #bc8cff; --orange: #ffa657;
  background: var(--bg); color: var(--text);
}
.theme-light {
  --bg: #f6f8fa; --surface: #ffffff; --surface2: #f0f2f5;
  --border: rgba(0,0,0,0.1); --text: #1f2328; --muted: #57606a;
  --accent: #0969da; --accent-hover: #0550ae;
  --green: #1a7f37; --red: #cf222e; --purple: #8250df; --orange: #bc4c00;
  background: var(--bg); color: var(--text);
}
.theme-ocean {
  --bg: #0a1628; --surface: #0d2137; --surface2: #112845;
  --border: rgba(0,200,255,0.1); --text: #cde8ff; --muted: #6b9ab8;
  --accent: #00c8ff; --accent-hover: #33d4ff;
  --green: #00e5a0; --red: #ff5370; --purple: #c792ea; --orange: #ffcb6b;
  background: var(--bg); color: var(--text);
}
.theme-purple {
  --bg: #13001f; --surface: #1e0033; --surface2: #2a0045;
  --border: rgba(180,100,255,0.12); --text: #e8d5ff; --muted: #9b72cf;
  --accent: #c084fc; --accent-hover: #d8b4fe;
  --green: #86efac; --red: #fca5a5; --purple: #f0abfc; --orange: #fcd34d;
  background: var(--bg); color: var(--text);
}
.theme-forest {
  --bg: #0d1a0f; --surface: #142416; --surface2: #1a2e1c;
  --border: rgba(100,200,100,0.1); --text: #d4edda; --muted: #6a9f6e;
  --accent: #56d364; --accent-hover: #7ee787;
  --green: #3fb950; --red: #f85149; --purple: #bc8cff; --orange: #ffa657;
  background: var(--bg); color: var(--text);
}
.theme-sunset {
  --bg: #1a0a00; --surface: #2d1200; --surface2: #3d1a00;
  --border: rgba(255,150,50,0.12); --text: #ffe5cc; --muted: #b07040;
  --accent: #ff7b35; --accent-hover: #ff9a5e;
  --green: #7ee787; --red: #ff6b6b; --purple: #d8b4fe; --orange: #fcd34d;
  background: var(--bg); color: var(--text);
}

/* ── SIDEBAR ── */
.sidebar {
  width: 72px; background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 0; gap: 8px; flex-shrink: 0;
  transition: width 0.3s ease; overflow: hidden;
}
.sidebar:hover { width: 220px; }

.brand {
  font-size: 24px; font-weight: 700; letter-spacing: -1px;
  padding: 0 0 20px; border-bottom: 1px solid var(--border);
  width: 100%; text-align: center; white-space: nowrap;
}
.brand-g { color: var(--accent); }
.brand-rest { color: var(--text); opacity: 0; transition: opacity 0.2s; }
.sidebar:hover .brand-rest { opacity: 1; }

nav { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 8px; }

.nav-btn {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px;
  background: transparent; border: none; color: var(--muted);
  font-size: 14px; font-weight: 500; cursor: pointer; border-radius: 10px;
  white-space: nowrap; overflow: hidden; transition: background 0.15s, color 0.15s;
}
.nav-btn svg { width: 20px; height: 20px; flex-shrink: 0; fill: currentColor; }
.nav-btn span { opacity: 0; transition: opacity 0.2s; }
.sidebar:hover .nav-btn span { opacity: 1; }
.nav-btn:hover { background: var(--surface2); color: var(--text); }
.nav-btn.active { background: rgba(88,166,255,0.12); color: var(--accent); }

/* ── MAIN ── */
.main { flex: 1; overflow-y: auto; background: var(--bg); }
.page { display: none; padding: 40px 48px; }
.page.active { display: block; }
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 24px; font-weight: 600; }
.page-header p { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ── CALLS GRID ── */
.calls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.call-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.call-card:hover { transform: translateY(-4px); }

.call-card.legend { border-color: rgba(255,215,0,0.25); }
.call-card.new    { border-color: rgba(86,211,100,0.2); }
.call-card.private{ border-color: rgba(248,81,73,0.2); }

.call-card-top {
  padding: 16px 20px 0;
  display: flex; justify-content: space-between; align-items: center;
}

.call-badge {
  font-size: 12px; font-weight: 600; padding: 4px 10px;
  border-radius: 20px; background: rgba(255,215,0,0.12); color: #ffd700;
  border: 1px solid rgba(255,215,0,0.2);
}
.new-badge     { background: rgba(86,211,100,0.12); color: var(--green); border-color: rgba(86,211,100,0.2); }
.private-badge { background: rgba(248,81,73,0.12);  color: var(--red);   border-color: rgba(248,81,73,0.2); }

.call-live {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted); font-weight: 500;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); animation: pulse 2s infinite;
}
.live-dot.red { background: var(--red); animation: none; }
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.4; transform:scale(0.8); }
}

.call-card-body {
  padding: 24px 20px 20px; text-align: center; flex: 1;
}
.call-avatar { font-size: 48px; margin-bottom: 12px; }
.call-card-body h2 { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.call-card-body p  { font-size: 13px; color: var(--muted); line-height: 1.5; }

.btn-join {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0 20px 20px; padding: 13px;
  border: none; border-radius: 12px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s, transform 0.1s; color: #fff;
  background: var(--accent);
}
.btn-join svg { width: 16px; height: 16px; fill: currentColor; }
.btn-join:hover  { opacity: 0.88; transform: translateY(-1px); }
.btn-join:active { transform: scale(0.97); }

.legend-btn  { background: linear-gradient(135deg, #ffd700, #ff8c00); color: #000; }
.new-btn     { background: linear-gradient(135deg, #56d364, #0d9e3e); }
.private-btn { background: linear-gradient(135deg, #f85149, #b91c1c); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; padding: 36px; width: 360px; text-align: center;
  transform: scale(0.93) translateY(12px); transition: transform 0.25s;
}
.modal-wide { width: 480px; text-align: left; }
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-icon { font-size: 40px; margin-bottom: 12px; }
.modal h3   { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.modal p    { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

.modal input[type="password"],
.modal input[type="text"] {
  width: 100%; padding: 12px 16px; text-align: center;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text); font-size: 15px;
  outline: none; transition: border-color 0.15s; letter-spacing: 2px;
}
.modal input:focus { border-color: var(--accent); }

.error-msg {
  margin-top: 8px; font-size: 13px; color: var(--red);
  animation: shake 0.3s;
}
@keyframes shake {
  0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)}
}

.modal-btns { display: flex; gap: 10px; margin-top: 16px; }
.btn-primary {
  flex: 1; padding: 12px; background: var(--accent); border: none;
  border-radius: 12px; color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.85; }
.btn-secondary {
  flex: 1; padding: 12px; background: transparent;
  border: 1px solid var(--border); border-radius: 12px;
  color: var(--muted); font-size: 14px; cursor: pointer; transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--text); color: var(--text); }

/* ── CUSTOM GRID ── */
.custom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.field input[type="color"] {
  width: 100%; height: 44px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); cursor: pointer; padding: 4px;
}
.field input[type="range"] { width: 100%; accent-color: var(--accent); }

/* ── SETTINGS ── */
.settings-layout { display: grid; grid-template-columns: 180px 1fr; gap: 24px; }
.settings-nav { display: flex; flex-direction: column; gap: 4px; }
.sub-btn {
  padding: 11px 16px; background: transparent; border: none;
  color: var(--muted); font-size: 14px; font-weight: 500;
  cursor: pointer; border-radius: 10px; text-align: left; transition: all 0.15s;
}
.sub-btn:hover  { background: var(--surface2); color: var(--text); }
.sub-btn.active { background: rgba(88,166,255,0.12); color: var(--accent); }
.sub-btn.reset  { color: var(--red); }
.sub-btn.reset:hover { background: rgba(248,81,73,0.08); }

.settings-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 28px;
}
.settings-panel h2 { font-size: 17px; font-weight: 600; margin-bottom: 20px; }
.sub-page        { display: none; }
.sub-page.active { display: block; }

/* ── THEMES GRID ── */
.themes-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.theme-card {
  border: 2px solid var(--border); border-radius: 14px; overflow: hidden;
  cursor: pointer; transition: border-color 0.15s, transform 0.15s; text-align: center;
}
.theme-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.theme-card.active { border-color: var(--accent); }
.theme-card span { display: block; padding: 8px; font-size: 12px; font-weight: 500; }

.theme-preview {
  height: 72px; display: flex; gap: 4px; padding: 8px;
}
.prev-sidebar { width: 20px; border-radius: 4px; }
.prev-content { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.prev-card    { flex: 1; border-radius: 4px; }

.dark-prev   { background: #0d1117; }
.dark-prev   .prev-sidebar { background: #161b22; }
.dark-prev   .prev-card    { background: #1c2333; }

.light-prev  { background: #f6f8fa; }
.light-prev  .prev-sidebar { background: #ffffff; }
.light-prev  .prev-card    { background: #e9ecef; }

.ocean-prev  { background: #0a1628; }
.ocean-prev  .prev-sidebar { background: #0d2137; }
.ocean-prev  .prev-card    { background: #112845; }

.purple-prev { background: #13001f; }
.purple-prev .prev-sidebar { background: #1e0033; }
.purple-prev .prev-card    { background: #2a0045; }

.forest-prev { background: #0d1a0f; }
.forest-prev .prev-sidebar { background: #142416; }
.forest-prev .prev-card    { background: #1a2e1c; }

.sunset-prev { background: #1a0a00; }
.sunset-prev .prev-sidebar { background: #2d1200; }
.sunset-prev .prev-card    { background: #3d1a00; }


/* ── CUSTOM PREVIEW ── */
.custom-preview { display: flex; flex-direction: column; gap: 10px; }
.preview-card {
  padding: 16px; background: var(--surface2);
  border-radius: var(--custom-radius, 10px); border: 1px solid var(--border);
  font-size: var(--custom-font, 14px); color: var(--text);
}
.preview-btn {
  padding: 12px; background: var(--accent); border: none;
  border-radius: var(--custom-radius, 10px); color: #fff;
  font-size: var(--custom-font, 14px); font-weight: 600; cursor: pointer;
}

/* ── INFO PAGE ── */
.info-version-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 48px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.info-version-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.info-version-number {
  font-size: 72px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -3px;
  line-height: 1;
}

.info-cards-row {
  display: grid;
  grid-template-columns: 180px 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.info-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.info-stat-icon { font-size: 32px; margin-bottom: 4px; }
.info-stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.info-stat-number { font-size: 48px; font-weight: 700; color: var(--accent); line-height: 1; }
.info-stat-sub { font-size: 12px; color: var(--muted); }

.info-mono-block {
  background: var(--surface);
  border: 1px solid rgba(255,215,0,0.2);
  border-radius: 20px;
  overflow: hidden;
}
.info-mono-btn {
  display: inline-flex;
  margin: 0;
  width: auto;
  padding: 13px 28px;
  text-decoration: none;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #000 !important;
}

@media (max-width: 768px) {
  .info-cards-row { grid-template-columns: 1fr; }
}


.info-roblox-card {

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 20px;

    overflow: hidden;

    max-width: 480px;

}

.info-roblox-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.roblox-favicon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}
.info-roblox-body {
  padding: 24px;
}
.roblox-group-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.info-roblox-desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.5;
}
.info-roblox-btn {
  display: inline-flex;
  margin: 0;
  width: auto;
  padding: 13px 28px;
  text-decoration: none;
}

/* ── VERSION ── */
.version-tag {
  position: fixed; bottom: 15px; right: 15px;
  color: var(--muted); font-size: 12px;
  opacity: 0.6; pointer-events: none; z-index: 1000;
}

/* ── COPY ── */
.btn-copy {
  background: transparent; border: 1px solid var(--accent);
  color: var(--accent); padding: 8px; border-radius: 6px;
  cursor: pointer; font-size: 12px; margin-top: 10px; transition: 0.3s;
}
.btn-copy:hover { background: var(--accent); color: white; }
.btn-copy.copied { background: #238636; border-color: #238636; color: white; }


/* ════════════════════════════════════════
   ── МОБИЛЬНАЯ ВЕРСИЯ ──
   ════════════════════════════════════════ */

/* Планшеты (до 768px) */
@media (max-width: 768px) {
  body {
    flex-direction: column;
    height: 100dvh; /* dvh учитывает адресную строку браузера на телефоне */
    overflow: hidden;
  }

  /* Сайдбар превращается в нижнюю навигацию */
  .sidebar {
    width: 100% !important;
    height: 64px;
    flex-direction: row;
    padding: 0 16px;
    border-right: none;
    border-top: 1px solid var(--border);
    order: 2; /* идёт после .main */
    gap: 0;
    justify-content: space-around;
    overflow: visible;
  }

  /* Бренд прячем на мобиле — нет места */
  .brand { display: none; }

  nav {
    flex-direction: row;
    width: 100%;
    padding: 0;
    gap: 0;
    justify-content: space-around;
  }

  .nav-btn {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    font-size: 11px;
    border-radius: 8px;
    flex: 1;
  }

  /* На мобиле текст всегда виден */
  .nav-btn span {
    opacity: 1 !important;
    font-size: 11px;
  }

  .nav-btn svg { width: 22px; height: 22px; }

  /* Основной контент занимает всё место сверху */
  .main {
    flex: 1;
    order: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* плавный скролл на iOS */
  }

  /* Меньше отступы на мобиле */
  .page { padding: 20px 16px 16px; }

  .page-header { margin-bottom: 20px; }
  .page-header h1 { font-size: 20px; }

  /* Карточки в 1 колонку */
  .calls-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Настройки — вертикально */
  .settings-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .settings-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
  }

  .sub-btn {
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Темы — 2 колонки вместо 3 */
  .themes-grid { grid-template-columns: repeat(2, 1fr); }

  /* Модалки на всю ширину */
  .modal { width: calc(100vw - 32px) !important; padding: 24px 20px; }
  .modal-wide { width: calc(100vw - 32px) !important; }

  /* Кнопки крупнее для пальца */
  .btn-join { padding: 15px; font-size: 15px; }
  .btn-copy { padding: 10px; font-size: 13px; width: calc(100% - 40px); margin: 0 20px 16px; }

  /* Версия — подальше от нижней панели */
  .version-tag { bottom: 74px; right: 12px; }
}

/* Телефоны (до 480px) — дополнительные правки */
@media (max-width: 480px) {
  .call-avatar { font-size: 36px; }
  .call-card-body h2 { font-size: 16px; }
  .settings-panel { padding: 16px; }
  .themes-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .custom-grid { grid-template-columns: 1fr; } /* цвета в 1 колонку */
}

/* ═══════════════════════════════
   LOGIN
═══════════════════════════════ */

.login-screen {

    position: fixed;

    inset: 0;

    z-index: 999999;

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        radial-gradient(
            circle at top,
            rgba(88,166,255,.12),
            transparent 40%
        ),
        var(--bg);
}

.login-card {

    width: 440px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 32px;

    padding: 54px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    box-shadow:
        0 0 50px rgba(0,0,0,.25);

    backdrop-filter:
        blur(20px);
}

.login-logo {

    font-size: 48px;

    font-weight: 700;

    text-align: center;

    margin-bottom: 18px;

    line-height: 1;
}

.login-logo .brand-g {

    display: inline-block;

    transform-origin: center;
}

.logo-jump .brand-g {

    animation:
        logoJump
        .45s
        cubic-bezier(.2,.8,.2,1);
}

@keyframes logoJump {

    0% {

        transform:
            translateY(0);

    }

    45% {

        transform:
            translateY(-14px);

    }

    100% {

        transform:
            translateY(0);

    }

}

#authContent {

    transition:
        opacity .20s ease;

}

#authContent.switching {

    opacity: 0;

}

.title-animate {

    animation:
        titleSwitch
        .28s ease;
}

@keyframes titleSwitch {

    0% {

        opacity: 0;

        letter-spacing: 12px;

    }

    100% {

        opacity: 1;

        letter-spacing: 0;

    }

}

#authTitle {

    text-align: center;

    font-size: 28px;

    margin-bottom: 18px;
}

#authFields {

    display: flex;

    flex-direction: column;

}

.login-input {

    width: 100%;

    height: 56px;

    margin-bottom: 14px;

    padding: 0 18px;

    border-radius: 16px;

    border: 1px solid var(--border);

    background: var(--bg);

    color: var(--text);

    font-size: 15px;

    outline: none;

    transition:
        border .15s,
        transform .15s;
}

.login-input:focus {

    border-color:
        var(--accent);

    transform:
        translateY(-1px);
}

.login-btn {

    width: 100%;

    height: 56px;

    border: none;

    border-radius: 16px;

    background:
        var(--accent);

    color: white;

    font-size: 16px;

    font-weight: 700;

    cursor: pointer;

    transition:
        transform .15s,
        opacity .15s;
}

.login-btn:hover {

    opacity: .9;

}

.login-btn:active {

    transform:
        scale(.98);
}

.login-footer {

    margin-top: 16px;

    margin-bottom: 12px;

    text-align: center;

    color:
        var(--muted);

    font-size: 13px;
}

.register-btn {

    width: 100%;

    height: 52px;

    border-radius: 16px;

    background: transparent;

    border: 1px solid var(--border);

    color: var(--text);

    cursor: pointer;

    transition:
        background .15s;
}

.register-btn:hover {

    background:
        var(--surface2);
}

@media (max-width:520px) {

    .login-card {

        width:
            calc(100vw - 28px);

        padding:
            32px;
    }

    .login-logo {

        font-size:
            42px;
    }

}

#authError {

    min-height: 22px;

    color: #ff5b5b;

    font-size: 14px;

    margin-bottom: 12px;

    text-align: center;
}

.login-input.error {

    border-color: #ff5b5b;
}

#profileBar {

position: fixed;

top: 18px;

right: 18px;

display: flex;

align-items: center;

gap: 12px;

padding: 10px 16px;

border-radius: 999px;

background: rgba(20,25,40,.95);

border: 1px solid rgba(255,255,255,.08);

backdrop-filter: blur(20px);

z-index: 9999;
}

#profileName {

font-size: 14px;

font-weight: 700;

color: white;
}

#profileAvatar {

width: 42px;

height: 42px;

border-radius: 50%;

background: linear-gradient(
135deg,
#57a5ff,
#236fff
);

display: flex;

align-items: center;

justify-content: center;

font-size: 20px;

font-weight: 800;

color: white;

user-select: none;
}






.messages-app {

    display: flex;

    height: calc(100dvh - 220px);

    min-height: 0;

    overflow: hidden;

    border-radius: 34px;

    background: rgba(255,255,255,.02);

    backdrop-filter: blur(30px);

}

.chat {

    flex: 1;

    display: flex;

    flex-direction: column;

    min-height: 0;

}

.chat-messages {

    flex: 1;

    min-height: 0;

    overflow-y: auto;

    overflow-x: hidden;

    padding: 26px;

    display: flex;

    flex-direction: column;

    gap: 16px;

}

.chat-send {

    flex-shrink: 0;

    padding: 20px;

    display: flex;

    gap: 12px;

}


.dialogs{

width:320px;

padding:18px;

display:flex;

flex-direction:column;

gap:10px;

border-right:

1px solid
rgba(255,255,255,.05);

}

.dialog{

padding:16px;

border-radius:20px;

cursor:pointer;

}

.dialog.active{

background:

rgba(88,166,255,.12);

}

.chat{

flex:1;

display:flex;

flex-direction:column;

}

.chat-messages{

flex:1;

padding:26px;

overflow:auto;

display:flex;

flex-direction:column;

gap:16px;

}

.msg{

max-width:65%;

padding:16px;

border-radius:22px;

}

.msg.left{

align-self:flex-start;

background:

rgba(255,255,255,.04);

}

.msg.right{

align-self:flex-end;

background:

var(--accent);

color: #000;

}

.msg-sender {

font-size: 11px;
font-weight: 600;
color: var(--accent);
margin-bottom: 4px;
opacity: 0.8;

}

.msg.left .msg-sender {

color: var(--accent);

}

.chat-send{

padding:20px;

display:flex;

gap:12px;

}

.chat-send input{

flex:1;

height:60px;

padding:0 20px;

border-radius:999px;

border:none;

background:

rgba(255,255,255,.04);

color:white;

}

.chat-send button{

width:60px;

border:none;

border-radius:50%;

background:

var(--accent);

color:white;

font-size:22px;

}

.chat-user{

display:flex;

gap:14px;

padding:16px;

cursor:pointer;

border-radius:18px;

}

.chat-user:hover{

background:

rgba(255,255,255,.04);

}

.chat-avatar{

width:44px;

height:44px;

border-radius:50%;

background:

var(--accent);

display:flex;

align-items:center;

justify-content:center;

}

.chat-small{

opacity:.5;

font-size:12px;

}

/* ===========================
   MOBILE FIX CHAT + LOGIN
=========================== */

@media (max-width: 768px) {

    .messages-app {

        flex-direction: column;

        height: calc(100dvh - 150px);

        border-radius: 18px;

    }

    .dialogs {

        width: 100%;

        max-height: 170px;

        overflow-y: auto;

        border-right: none;

        border-bottom: 1px solid var(--border);

    }

    .chat {

        flex: 1;

        min-height: 0;

    }

    .chat-messages {

        padding: 14px;

        gap: 10px;

    }

    .msg {

        max-width: 92%;

        padding: 12px;

        border-radius: 16px;

        font-size: 14px;

    }

    .chat-send {

        padding: 12px;

        gap: 8px;

    }

    .chat-send input {

        height: 48px;

        font-size: 16px;

        min-width: 0;

    }

    .chat-send button {

        width: 48px;

        height: 48px;

        flex-shrink: 0;

    }

    .login-card {

        width: calc(100vw - 24px);

        max-width: 420px;

        padding: 28px;

        border-radius: 24px;

    }

    .login-logo {

        font-size: 38px;

    }

    .login-input {

        height: 52px;

    }

    .login-btn,
    .register-btn {

        height: 52px;

    }

}

/* ===========================
   CHAT SCROLLBAR
=========================== */

.chat-messages {

    scrollbar-width: thin;

    scrollbar-color:
        rgba(255,140,60,.65)
        transparent;

}

/* Chrome / Edge */

.chat-messages::-webkit-scrollbar {

    width: 12px;

}

.chat-messages::-webkit-scrollbar-track {

    background:
        transparent;

    margin: 12px;

}

.chat-messages::-webkit-scrollbar-thumb {

    background:
        linear-gradient(
            180deg,
            rgba(255,140,60,.95),
            rgba(255,110,40,.8)
        );

    border-radius: 999px;

    border: 3px solid transparent;

    background-clip: padding-box;

}

.chat-messages::-webkit-scrollbar-thumb:hover {

    background:
        linear-gradient(
            180deg,
            rgba(255,170,90,1),
            rgba(255,130,60,1)
        );

    background-clip: padding-box;

}

.chat-messages::-webkit-scrollbar-corner {

    background:
        transparent;

}

.brand::before {

    content: "";

    display: inline-block;

    width: 42px;

    height: 42px;

    margin-right: 4px;

    background-image:
        url("icon.ico");

    background-size:
        contain;

    background-repeat:
        no-repeat;

    vertical-align:
        middle;

    transform:
        translateY(2px);

}

.admin-call-actions {

    display: flex;

    gap: 10px;

    margin-top: 14px;

}

.admin-call-actions button {

    flex: 1;

}

.btn-copy{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
}

.copy-icon{
    width:18px;
    height:18px;
    flex-shrink:0;
}

.copy-icon path{
    stroke:currentColor;
}

.call-avatar{
    display:flex;
    align-items:center;
    justify-content:center;
}

.call-icon{
    width:42px;
    height:42px;

    stroke:currentColor;
}