/* ═══════════════════════════════════════════════════════════
   GoChat — スタイルシート
   カラーパレット: ダークモード + パープルアクセント
═══════════════════════════════════════════════════════════ */

/* ── CSS変数（デザイントークン） ─────────────────────────── */
:root {
  color-scheme: dark;
  --bg-primary:      #080810;
  --bg-glass:        rgba(15, 15, 25, 0.7);
  --bg-glass-heavy:  rgba(10, 10, 20, 0.9);
  --bg-card:         rgba(25, 25, 45, 0.5);
  --bg-input:        rgba(255, 255, 255, 0.05);
  --bg-hover:        rgba(255, 255, 255, 0.1);
  --border:          rgba(255, 255, 255, 0.08);
  --border-light:    rgba(255, 255, 255, 0.12);

  --accent:          #8b5cf6; /* 紫 */
  --accent-hover:    #a78bfa;
  --accent-dim:      rgba(139, 92, 246, 0.2);
  --accent-dimmer:   rgba(139, 92, 246, 0.08);

  --text-primary:    #ffffff;
  --text-secondary:  #e2e8f0;
  --text-muted:      #94a3b8;

  --my-bubble-bg:    linear-gradient(135deg, #8b5cf6, #6366f1);
  --my-bubble-text:  #ffffff;
  --other-bubble-bg: rgba(255, 255, 255, 0.07);
  --other-bubble-border: rgba(255, 255, 255, 0.1);

  --system-text:     #94a3b8;
  --system-bg:       rgba(255, 255, 255, 0.05);

  --success:         #10b981;
  --error:           #ef4444;
  --warning:         #f59e0b;
  --interviewer-accent: #f59e0b;
  --interviewer-dim:    rgba(245, 158, 11, 0.15);

  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg:  0 12px 64px rgba(0,0,0,0.6);

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── リセット & ベース ───────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.1px;
  background: 
    radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
    var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow-y: auto;
}

.hidden { display: none !important; }

/* ── スクロールバー ─────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ════════════════════════════════════════════════════════════
   入室画面
════════════════════════════════════════════════════════════ */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* 上端から配置しつつmargin:autoで中央に寄せる */
  background: radial-gradient(ellipse at 60% 20%, #1a1040 0%, var(--bg-primary) 70%);
  z-index: 100;
  padding: 40px 16px;
  overflow-y: auto;
}

.login-card {
  margin-top: auto;
  margin-bottom: auto;
  flex-shrink: 0;
  position: relative; /* 右上への絶対配置用 */
  background: rgba(15, 15, 25, 0.95); /* 視認性向上のため不透明度を大幅にアップ */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.15); /* 境界線を強調 */
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6); /* 影をより深く */
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ログイン画面の管理パスワード入力欄（右上絶対配置） */
.login-admin-pass-wrap {
  position: absolute;
  top: 16px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 5px 9px;
  transition: border-color 0.2s, background 0.2s;
  z-index: 1;
}
.login-admin-pass-wrap:focus-within {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.08);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo-icon { font-size: 48px; display: block; margin-bottom: 8px; }

.login-title {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 4px;
}

.login-form { display: flex; flex-direction: column; gap: 20px; }

/* ── フォーム共通 ────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-label {
  font-size: 13px;
  font-weight: 700; /* さらに太く */
  color: var(--text-primary); /* より明るく */
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.form-input, .form-select {
  background: rgba(0, 0, 0, 0.4); /* より濃い背景でテキストを際立たせる */
  border: 2px solid var(--border-light); /* 境界線を太く */
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  padding: 14px 16px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  width: 100%;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 0 4px var(--accent-dim); /* フォーカスをより際立たせる */
}

.form-input::placeholder { color: var(--text-secondary); } /* プレースホルダーを少し濃く */
.form-select { cursor: pointer; appearance: none; }
.form-select option {
  background-color: #ffffff; /* ライト背景を想定 */
  color: #000000; /* 文字を黒に固定して確実に読めるようにする */
}

.form-error {
  font-size: 12px;
  color: var(--error);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── フォームヒント ─────────────────────────────────────── */
.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: -2px;
}

.form-label-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

/* ── モード選択カード ────────────────────────────────────── */
.mode-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mode-card {
  position: relative;
  background: rgba(255, 255, 255, 0.08); /* 背景を少し濃く */
  border: 2px solid var(--border-light); /* 境界線を太く */
  border-radius: var(--radius-md);
  padding: 18px 10px; /* パディングを拡大 */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.mode-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.mode-card:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.mode-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 2px var(--accent), 0 8px 24px rgba(139, 92, 246, 0.3); /* 選択状態を強力に強調 */
}

.mode-icon { font-size: 32px; } /* アイコンを拡大 */

.mode-name {
  font-size: 13px; /* 文字を少し大きく */
  font-weight: 700; /* 文字を太く */
  color: var(--text-primary);
}

.mode-desc {
  font-size: 10px;
  color: var(--text-muted);
}

/* ── 入室ボタン ──────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #9d6aff 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 24px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(124, 106, 255, 0.5);
  filter: brightness(1.1);
}

.btn-primary:active { transform: translateY(0); }

/* ════════════════════════════════════════════════════════════
   チャット画面レイアウト
════════════════════════════════════════════════════════════ */
.chat-screen {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: var(--bg-primary);
  overflow: hidden;
}

/* ── ヘッダー ─────────────────────────────────────────────── */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 64px;
  min-height: 64px;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo { font-size: 22px; }

.header-app-name {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.3px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* ── 管理パスワード入力欄（ヘッダー右上） ──────────────────── */
.header-admin-pass-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 4px 8px;
  transition: border-color 0.2s, background 0.2s;
}
.header-admin-pass-wrap:focus-within {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.08);
}
.header-admin-pass-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: 0.6;
  pointer-events: none;
}
.header-admin-pass-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  width: 80px;
  min-width: 0;
  padding: 0;
  letter-spacing: 0.1px;
}
.header-admin-pass-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.header-username {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 200px; /* 拡大 */
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  }

@media (max-width: 768px) {
  .chat-header {
    padding: 0 12px;
    height: 56px;
    min-height: 56px;
  }
  .header-app-name {
    font-size: 14px;
    /* display: none を削除してスマホでも表示 */
  }
  .header-right {
    gap: 4px;
    flex: 1;
    justify-content: flex-end;
  }
  .header-username {
    max-width: 80px;
    font-size: 11px;
  }
  .btn-switch-mode span, .btn-ghost-toggle span {
    display: none;
  }
  .btn-switch-mode, .btn-ghost-toggle, .user-profile {
    padding: 6px;
    min-width: 36px;
    height: 36px;
    justify-content: center;
    border-radius: 10px;
  }
  .header-badges {
    display: flex;
    gap: 2px;
  }
  .badge {
    padding: 2px 6px;
    font-size: 9px;
  }
  .header-admin-pass-input {
    width: 52px;
    font-size: 11px;
  }
  .header-admin-pass-wrap {
    padding: 3px 6px;
  }
}

/* ── バッジ ───────────────────────────────────────────────── */
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.badge:empty { display: none !important; }

.badge-mode {
  background: var(--accent-dim);
  color: var(--accent-hover);
  border: 1px solid var(--accent);
}

.badge-role {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.badge-accent {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.badge-interviewer {
  background: var(--interviewer-dim);
  color: var(--interviewer-accent);
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
}

/* ── 参加者サイドバー ─────────────────────────────────────── */
.sidebar-users {
  width: 220px;
  min-width: 180px;
  flex-shrink: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 20;
}

.sidebar-users-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-users-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.user-count-badge {
  background: var(--accent-dim);
  color: var(--accent-hover);
  border: 1px solid var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}

.user-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  list-style: none;
}

.user-list-empty {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* スマホ時はサイドバーを非表示（タブで制御） */
@media (max-width: 768px) {
  .sidebar-users {
    display: none;
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100%;
    z-index: 100;
    background: var(--bg-primary) !important;
    opacity: 1 !important;
  }
  .sidebar-users.active {
    display: flex;
  }
  .sidebar-users-header {
    background: var(--bg-glass-heavy);
    padding: 16px 20px;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
  }

  /* モバイルタブの横スクロール対応 */
  .mobile-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    background: var(--bg-glass-heavy);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    padding: 0 4px;
    height: 48px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-tabs::-webkit-scrollbar {
    display: none;
  }
  .tab-btn {
    flex: 0 0 auto !important;
    min-width: 100px; /* 少し広げて押しやすく */
    padding: 0 12px;
    font-size: 13px;
    white-space: nowrap;
    height: 100%;
    border-bottom: 2px solid transparent;
  }
  .tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: var(--accent-dimmer);
  }
}

/* ── スマホタブ ───────────────────────────────────────────── */

.user-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: var(--radius-md);
  margin: 2px 6px;
  transition: var(--transition);
  position: relative;
}

.user-list-item:hover {
  background: var(--bg-hover);
}

.user-list-item.is-me {
  background: var(--accent-dimmer);
}

.user-list-item.offline {
  opacity: 0.5;
}

.user-status-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  flex-shrink: 0;
}

.user-list-item.offline .user-status-dot {
  background: var(--text-muted);
}

.user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--accent-dim);
  color: var(--accent-hover);
  border: 1px solid rgba(139, 92, 246, 0.3);
  display: inline-block;
  width: fit-content;
}

.user-status-offline-tag {
  font-size: 10px;
  color: var(--text-muted);
}

.btn-dm-open {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s;
  flex-shrink: 0;
}

.user-list-item:hover .btn-dm-open {
  opacity: 1;
  border-color: var(--border-light);
  color: var(--accent-hover);
}

.unread-badge {
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  flex-shrink: 0;
}


.tab-btn {
  flex: 1;
  padding: 0 5px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(124, 106, 255, 0.05);
}

/* パネルコンテナのモバイル制御 */
@media (max-width: 768px) {
  .panel-sub {
    width: 100% !important;
    position: absolute;
    inset: 0;
    z-index: 90;
    background: var(--bg-primary);
    display: none; /* JSで制御 */
  }
  .panel-chat {
    width: 100%;
    flex: 1;
  }
  .chat-main {
    position: relative;
    overflow: hidden;
  }
}

/* ── メインエリア ─────────────────────────────────────────── */
.chat-main {
  display: flex;
  flex: 1;
  width: 100%;
  overflow: hidden;
  gap: 0;
  background: var(--bg-primary);
}

/* ── パネル共通 ───────────────────────────────────────────── */
.panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.panel-chat {
  flex: 1;
  border-right: 1px solid var(--border);
}

.panel-sub {
  width: 380px;
  min-width: 320px;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-card);
}

.panel-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* カスタムドロップダウン (ルーム切替) */
.custom-dropdown {
  position: relative;
  min-width: 140px;
}

.dropdown-trigger {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition);
  outline: none;
}

.dropdown-trigger:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 100%;
  min-width: 160px;
  background: #1a1a2e; /* 確実に視認できる濃い背景色 */
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  list-style: none;
  padding: 4px;
  z-index: 2100; /* ヘッダーやモーダルの上に表示 */
  transform-origin: top right;
  animation: dropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.dropdown-item {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff !important; /* 文字を白に固定して確実に読めるようにする */
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown-item:hover {
  background: var(--accent);
  color: #fff !important;
}

.dropdown-item.active {
  background: var(--accent-dim);
  color: var(--accent) !important;
}

.dropdown-arrow {
  transition: transform 0.2s ease;
}

.custom-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

/* シークレットルームの未読ドット（ドロップダウン用） */
.unread-dot-badge {
  width: 8px;
  height: 8px;
  background: #ff453a;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 69, 58, 0.5);
}

/* シークレットルームのメッセージエリア */
.messages-secret {
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 12px,
    rgba(16, 185, 129, 0.02) 12px,
    rgba(16, 185, 129, 0.02) 24px
  );
  border-top: 1px solid rgba(16, 185, 129, 0.15);
}

.panel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.sub-content { display: flex; flex-direction: column; height: 100%; }

/* 強制非表示ルール (核爆弾修正) */
#panel-sub .sub-content.hidden {
  display: none !important;
}

/* ── メッセージ一覧 ───────────────────────────────────────── */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
  width: 100%; /* 幅をいっぱいに広げる */
}

/* ── メッセージ吹き出し ───────────────────────────────────── */
.msg {
  display: flex;
  max-width: 85%;
  animation: msgIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  margin-bottom: 0;
  gap: 8px; /* ボタンと吹き出しの間隔 */
  align-items: flex-end;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.msg-mine { 
  align-self: flex-end !important;
  flex-direction: row; 
  margin-left: auto;
  align-items: flex-end;
}

.msg-mine .msg-content-wrap {
  align-items: flex-end;
}

.msg-theirs { 
  align-self: flex-start !important;
  flex-direction: row;
  margin-right: auto;
  align-items: flex-start;
}

.msg-theirs .msg-content-wrap {
  align-items: flex-start;
}

.msg-content-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px; /* 余白を微調整 */
  min-width: 0;
  width: fit-content !important;
  flex: none;
}


.msg-bubble {
  width: fit-content !important;
  padding: 8px 12px; /* 余白を微調整 */
  border-radius: var(--radius-lg);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
  box-shadow: var(--shadow-sm);
  flex: none;
  align-self: inherit; /* 親のalign-itemsに従う */
}

.msg-mine .msg-bubble {
  background: var(--my-bubble-bg);
  color: var(--my-bubble-text);
  border-bottom-right-radius: 4px;
}

.msg-theirs .msg-bubble {
  background: var(--other-bubble-bg);
  border: 1px solid var(--other-bubble-border);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.msg-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.msg-mine .msg-meta { justify-content: flex-end; }
.msg-meta-name { font-weight: 600; color: var(--accent-hover); }


/* ── 画像メッセージ ───────────────────────────────────────── */
.msg-image {
  max-width: 240px;
  max-height: 240px;
  width: 100%;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: block;
  transition: transform var(--transition), box-shadow var(--transition);
  object-fit: cover;
}

.msg-image:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

/* ── メッセージアクション ────────────────────────────────── */
.msg-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1 !important; /* 常に表示 */
}

.btn-delete-msg {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
  border: 1px solid transparent;
}


.btn-delete-msg:hover {
  background: rgba(255, 106, 106, 0.1);
  color: #ff6a6a;
  border-color: rgba(255, 106, 106, 0.2);
}

/* ───────────────────────────────────────────────────────── */

.msg-system {
  align-self: center;
  background: var(--system-bg);
  color: var(--system-text);
  font-size: 12px;
  padding: 4px 16px;
  border-radius: 99px;
  border: 1px solid rgba(102,102,170,0.2);
  text-align: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── 面接官専用メッセージ ────────────────────────────────── */
.msg-interviewer-chat .msg-bubble {
  background: var(--interviewer-dim);
  border: 1px solid rgba(255,106,106,0.3);
  color: var(--text-primary);
}

/* ── 接続ステータス ───────────────────────────────────────── */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-connecting { background: var(--warning); animation: pulse 1.4s infinite; }
.status-connected   { background: var(--success); }
.status-disconnected { background: var(--error); }

@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* ── GD共有メモ ───────────────────────────────────────────── */
.gd-note {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-field { display: flex; flex-direction: column; gap: 6px; }

.note-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.note-textarea {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  padding: 10px 12px;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  min-height: 48px;
  overflow-y: hidden;
  line-height: 1.6;
  width: 100%;
  box-sizing: border-box;
}

.note-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.note-textarea::placeholder { color: var(--text-muted); }
.note-textarea:disabled { opacity: 0.5; cursor: not-allowed; }

/* 編集権限コントロール */
.gd-panel-header {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

#note-edit-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.edit-mode-label { font-size: 11px; color: var(--text-muted); }

.btn-sm {
  padding: 4px 12px;
  background: var(--accent-dim);
  color: var(--accent-hover);
  border: 1px solid var(--accent);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  font-family: inherit;
}

.btn-sm:hover { background: var(--accent); color: #fff; }
.btn-sm:disabled {
  opacity: 0.8 !important;
  cursor: default;
  filter: grayscale(0.5);
  background: var(--bg-hover) !important;
  color: var(--text-muted) !important;
  border-color: var(--border) !important;
}

#note-edit-control .btn-sm:not(.btn-danger):disabled {
  background: var(--bg-hover) !important;
  color: #fff !important;
  opacity: 0.9 !important;
  border-color: var(--accent) !important;
}

/* ── 入力エリア ───────────────────────────────────────────── */
.chat-footer {
  flex-shrink: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  position: relative;
  z-index: 100; /* モバイルのpanel-sub(z-index: 5)より前面へ */
}

.input-area { display: flex; flex-direction: column; gap: 8px; }

/* 送信先セレクター */
.input-target-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-label-sm {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.target-btns { display: flex; gap: 6px; }

.target-btn {
  padding: 4px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.target-btn.active {
  background: var(--accent-dim);
  color: var(--accent-hover);
  border-color: var(--accent);
}

.target-btn[data-target="sub"].active {
  background: var(--interviewer-dim);
  color: var(--interviewer-accent);
  border-color: var(--interviewer-accent);
}

/* 入力行 */
.input-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.btn-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dimmer);
}

.text-input-wrapper {
  flex: 1;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
  overflow: hidden;
}

.text-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.textarea-message {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  padding: 10px 14px;
  resize: none;
  outline: none;
  max-height: 120px;
  overflow-y: auto;
  line-height: 1.5;
}

.textarea-message::placeholder { color: var(--text-muted); }

/* 画像プレビュー */
.image-preview-area {
  padding: 8px 12px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--border);
}

.image-preview-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.preview-item {
  position: relative;
  flex-shrink: 0;
}

.preview-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.btn-remove-single {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  background: var(--error);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.btn-remove-all {
  align-self: flex-end;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
}

.btn-remove-all:hover { color: var(--error); }

.btn-remove-image:hover { background: rgba(248, 113, 113, 0.4); }

/* 送信ボタン */
.btn-send {
  width: 42px;
  height: 42px;
  min-width: 42px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}

.btn-send:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(124,106,255,0.5);
}

.btn-send:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ════════════════════════════════════════════════════════════
   モーダル（画像拡大）
════════════════════════════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000 !important; /* 管理者パネル(500)より前面に */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  z-index: 201;
  max-width: min(90vw, 900px);
  max-height: 90dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

.modal-image {
  max-width: 100%;
  max-height: 85dvh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: block;
}

.modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 30px;
  height: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 202;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.dm-overlay .modal-close,
.dm-panel-header .modal-close {
  position: static !important; /* DMパネル内では必ずインライン配置 */
  top: unset !important;
  right: unset !important;
  margin-left: 4px;
  flex-shrink: 0;
}

/* IDセレクターでspecificityを上げて強制的に上書き */
#btn-close-dm {
  position: static !important;
  top: unset !important;
  right: unset !important;
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--error);
  color: #fff;
  border-color: var(--error);
}

/* ── トースト通知 ─────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 20px;
  color: var(--warning);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: 300;
  animation: slideUp 0.3s ease;
}

/* ════════════════════════════════════════════════════════════
   レスポンシブ: PC（768px超）
════════════════════════════════════════════════════════════ */
@media (min-width: 769px) {
  .mobile-tabs { display: none !important; }

  .panel-sub { display: flex !important; }

  /* チャット画面をフル幅で表示 */
  .chat-screen { max-width: 100%; width: 100%; height: 100vh; margin: 0; }
}

/* ════════════════════════════════════════════════════════════
   レスポンシブ: スマホ（768px以下）
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  html, body { overflow: hidden; }

  .login-card { padding: 28px 20px; }

  .mode-cards { grid-template-columns: repeat(3, 1fr); }
  .mode-card { padding: 10px 6px; }
  .mode-icon { font-size: 20px; }
  .mode-name { font-size: 11px; }
  .mode-desc { font-size: 9px; }

  .panel-sub {
    position: absolute;
    top: 0 !important;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    background: var(--bg-secondary);
    z-index: 5;
    height: 100% !important;
    display: none; /* 初期状態は非表示（モバイルタブで制御） */
    overflow-y: auto;
  }

  /* タブで選択されたパネルを表示 */
  .panel-sub.active-mobile-panel {
    display: block !important;
  }
  .sidebar-users.active-mobile-panel {
    display: block !important;
  }
  .panel-chat.active-mobile-panel {
    display: flex !important;
  }

  /* GD版ヘッダーのスマホ調整 */
  .gd-panel-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 0 !important;
    border-bottom: none !important;
    background: transparent !important;
  }
  
  #gd-panel .panel-title,
  .panel-sub .panel-header {
    display: none !important;
  }

  #gd-panel {
    display: block !important;
    overflow-y: auto !important;
    height: 100% !important;
    -webkit-overflow-scrolling: touch;
  }

  .gd-note {
    display: block !important;
    overflow: visible !important;
    height: auto !important;
    padding: 16px !important;
  }

  #note-edit-control {
    position: static !important;
    width: 100% !important;
    justify-content: flex-start;
    padding: 12px 0; /* paddingを調整 */
    background: transparent !important;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px 0 !important;
    display: flex !important;
  }

  .edit-mode-label {
    display: inline-block;
    margin-right: 4px;
    font-size: 11px;
    color: var(--text-muted);
  }
}

/* ════════════════════════════════════════════════════════════
   その他
════════════════════════════════════════════════════════════ */

/* ローディングスピナー */
.uploading .btn-send {
  animation: spin 1s linear infinite;
  opacity: 0.7;
  pointer-events: none;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* エラーフラッシュ */
.input-error {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2) !important;
}

/* ════════════════════════════════════════════════════════════
   モード切替ボタン（ヘッダー）
════════════════════════════════════════════════════════════ */
.btn-switch-mode {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--accent-dimmer);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-switch-mode:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
  background: var(--accent-dim);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124,106,255,0.25);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.1) !important;
  color: var(--error) !important;
  border: 1px solid rgba(248, 113, 113, 0.4) !important;
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.2) !important;
  color: var(--error) !important;
  border-color: rgba(248, 113, 113, 0.6) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.btn-danger:active {
  transform: translateY(0);
}

/* ════════════════════════════════════════════════════════════
   モード切替パネル（オーバーレイ）
════════════════════════════════════════════════════════════ */
.mode-switch-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 16px;
  overflow-y: auto;
}

.mode-switch-backdrop {
  position: fixed; /* absoluteからfixedに変更してスクロール追従 */
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.mode-switch-panel {
  position: relative;
  z-index: 301;
  margin-top: auto;
  margin-bottom: auto;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-lg);
  animation: panelIn 0.25s cubic-bezier(0.34, 1.36, 0.64, 1);
}

@keyframes panelIn {
  from { opacity: 0; transform: scale(0.93) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.mode-switch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mode-switch-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

/* スマホ対応 */
@media (max-width: 768px) {
  .btn-switch-mode span { display: none; }  /* ラベルを隠してアイコンのみ */
  .btn-switch-mode { padding: 5px 8px; }
  .mode-switch-panel { padding: 22px 18px 18px; }
}

/* ════════════════════════════════════════════════════════════
   送信取り消しボタン
════════════════════════════════════════════════════════════ */
.msg-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
  opacity: 0;
  transition: opacity var(--transition);
}

.msg:hover .msg-actions { opacity: 1; }

.btn-delete-msg {
  width: 22px;
  height: 22px;
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 50%;
  color: var(--error);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  padding: 0;
  line-height: 1;
}

.btn-delete-msg:hover {
  background: rgba(248, 113, 113, 0.45);
  transform: scale(1.15);
}

/* ── 取り消し済みメッセージ ──────────────────────────────── */
.msg-bubble-deleted {
  background: transparent !important;
  border: 1.5px dashed var(--border-light) !important;
  color: var(--text-muted) !important;
  font-style: italic;
  font-size: 13px !important;
  opacity: 0.7;
}

/* ── 履歴区切りライン ────────────────────────────────────── */
.history-sep {
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  padding: 6px 0;
  white-space: nowrap;
}

.history-sep::before,
.history-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ════════════════════════════════════════════════════════════
   オンラインユーザーサイドバー
════════════════════════════════════════════════════════════ */
.sidebar-users {
  width: 250px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.sidebar-users-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-users-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
}

.user-count-badge {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.user-list {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  overflow-y: auto;
  flex: 1;
}

.user-list-item {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  position: relative; /* バッジの絶対配置用 */
}

.user-list-item:hover {
  background: var(--bg-surface-hover);
  border-left-color: var(--accent-dim);
}

.user-list-item.is-me {
  cursor: default;
  background: rgba(124, 106, 255, 0.05);
  border-left-color: var(--accent);
}

.user-list-item.offline {
  opacity: 0.5;
  filter: grayscale(0.8);
  cursor: default;
}

.user-list-item.offline:hover {
  background: transparent;
  border-left-color: transparent;
}

.user-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981; /* オンライン色 */
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.offline .user-status-dot {
  background: #6b7280; /* グレー */
  box-shadow: none;
}


.user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.user-status-offline-tag {
  font-size: 10px;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.05);
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 400;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.05);
}

.user-role-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dimmer);
  padding: 1px 6px;
  border-radius: 4px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid var(--accent-dim);
}

.btn-dm-open {
  margin-left: 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: none; /* hover時に表示 */
}
.user-list-item:hover .btn-dm-open {
  display: block;
}
.btn-dm-open:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary);
}

/* 未読バッジ (絶対配置でPC/モバイル両対応) */
.unread-badge {
  position: absolute;
  top: 10px;
  right: 15px;
  background: var(--accent);
  color: white;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  padding: 0 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 10;
  pointer-events: none;
}
.unread-badge.hidden { display: none; }

.user-list-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ════════════════════════════════════════════════════════════
   DMパネル (フローティング)
════════════════════════════════════════════════════════════ */
.dm-overlay {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 440px;
  height: 560px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  transition: opacity 0.2s, transform 0.2s;
}

.dm-overlay.hidden {
  display: none; /* JSで切り替え */
}

.dm-panel-header {
  padding: 16px 20px;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dm-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: var(--bg-glass);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dm-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-glass-heavy);
}

.dm-footer-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* DM画像プレビュー */
.dm-image-preview-area {
  padding: 4px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dm-textarea {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-primary);
  resize: none;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.dm-textarea:focus {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.btn-dm-send {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn-dm-send svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .chat-footer {
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .chat-footer.hidden {
    display: none;
  }

  .mobile-tabs {
    display: flex;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 0 10px;
    gap: 10px;
    height: 48px; /* 固定の高さを確保 */
    align-items: stretch;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  }
  .mobile-tabs.hidden {
    display: none;
  }
  
  /* タブの下のコンテンツが重ならないよう調整 */
  .chat-main {
    padding-top: 0;
  }
  .panel-header {
    flex-wrap: wrap; /* ボタンが溢れないよう折り返し */
    padding: 12px 16px;
    gap: 10px;
  }
  .panel-main {
    display: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100% - 114px) !important;
  }

  .sidebar-users {
    display: none;
    width: 100% !important;
    max-width: 100% !important;
    border-right: none;
    background: var(--bg-surface);
    height: 100% !important;
    overflow-y: auto;
    position: absolute;
    top: 0 !important;
    z-index: 10;
  }
  .panel-sub {
    display: none;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    border-left: none;
    position: absolute;
    top: 0 !important;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100% !important;
    background: var(--bg-secondary);
    z-index: 20;
    overflow-y: auto;
  }
  .sidebar-users.active {
    display: flex;
  }
  .dm-overlay {
    bottom: 0;
    right: 0;
    width: 100vw;
    height: 85vh;
    border-radius: 20px 20px 0 0;
  }
}

/* 通知トースト */
.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999; /* 確実に最前面 */
  width: 90%;
  max-width: 420px;
  pointer-events: none;
}

.dm-toast {
  background: #1e1e2e;
  border: 1px solid var(--accent);
  border-left: 6px solid var(--accent); /* より強調 */
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  color: #ffffff;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideDown 0.3s ease forwards, fadeOut 0.3s ease 4.7s forwards;
  pointer-events: auto;
  cursor: pointer;
}

@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* タイムキーパータイマー (コンパクトな横長デザイン) */
.tk-timer-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* モード切替（カード内部のコンパクトなタブ） */
.tk-mode-switch {
  display: flex;
  justify-content: center;
  background: var(--bg-input);
  padding: 2px;
  border-radius: 8px;
  gap: 2px;
}

.tk-mode-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.tk-mode-btn.active {
  background: var(--bg-hover);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.tk-dot-indicator {
  width: 5px;
  height: 5px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 5px var(--success);
}

/* 表示エリアとコントロールの並び */
.tk-timer-setup,
.tk-timer-running,
.tk-sw-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tk-timer-display-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  margin-bottom: 0;
  flex: 1;
}

.tk-timer-display {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 300;
  color: #ffffff;
  letter-spacing: -1px;
  line-height: 1;
}

/* タイマー設定（ピッカー） */
.tk-timer-pickers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.picker-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.tk-picker-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: #ffffff;
  padding: 4px 6px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  width: 54px;
  text-align: center;
  cursor: pointer;
  appearance: none;
  outline: none;
}

.tk-picker-select option {
  background: #ffffff;
  color: #000000;
}

.picker-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* ボタンの小型化 */
.tk-timer-controls {
  display: flex;
  gap: 6px;
}

.btn-tk-round {
  width: auto;
  height: 32px;
  min-width: 64px;
  padding: 0 10px;
  border-radius: 8px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  position: relative;
}

/* 疑似要素の削除（円形ボタン用の影など） */
.btn-tk-round::after { display: none; }

.btn-tk-round:active { transform: translateY(1px); }

/* Colors */
.btn-tk-gray {
  background: rgba(255,255,255,0.1);
  color: #ccc;
}
.btn-tk-gray:hover:not(:disabled) { background: rgba(255,255,255,0.15); color: #fff; }

.btn-tk-green {
  background: rgba(29, 209, 88, 0.15);
  color: #30d158;
}
.btn-tk-green:hover { background: rgba(29, 209, 88, 0.25); }

.btn-tk-orange {
  background: rgba(255, 159, 10, 0.15);
  color: #ff9f0a;
}
.btn-tk-orange:hover { background: rgba(255, 159, 10, 0.25); }

.btn-tk-red {
  background: rgba(255, 69, 58, 0.15);
  color: #ff453a;
}
.btn-tk-red:hover { background: rgba(255, 69, 58, 0.25); }

/* ログイン画面のエラー表示 */
.login-error {
  margin-top: 16px;
  padding: 12px;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-md);
  color: #f43f5e;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ユーザープロフィールエリア (Header) */
.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  font-family: inherit;
  position: relative;
  z-index: 100; /* ヘッダー内の他の要素より前面に */
  min-width: 0;
}

.user-profile:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.user-profile:active {
  transform: translateY(0);
}

/* 権限別の枠線スタイル (user-profile用) */
.user-profile.border-admin {
  border-color: #a855f7 !important;
  border-width: 1.5px !important;
}

.user-profile.border-mentor {
  border-color: #22c55e !important;
  border-width: 1.5px !important;
}

.user-profile.border-both {
  position: relative;
  border-color: transparent !important;
  background-clip: padding-box;
}

.user-profile.border-both::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: 99px;
  padding: 1.5px; 
  background: linear-gradient(180deg, var(--accent-magenta, #a855f7) 50%, var(--success, #22c55e) 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.user-avatar-icon {
  font-size: 14px;
  opacity: 0.8;
}

.header-username {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  max-width: 120px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ログアウトボタン */
.btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(244, 63, 94, 0.1);
  border: 1.5px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-md);
  color: #f43f5e;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-left: 8px;
}

.btn-logout:hover {
  background: #f43f5e;
  color: #fff;
  border-color: #f43f5e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3);
}

.btn-logout:active {
  transform: translateY(0);
}

/* ════════════════════════════════════════════════════════════
   面接練習モード: 部屋コードバッジ
════════════════════════════════════════════════════════════ */
.badge-room {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.note-sep {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 24px 0 16px;
}

.note-hint {
  font-size: 11px;
  font-weight: normal;
  color: var(--text-muted);
  margin-left: 8px;
}

.note-private {
  background: rgba(124, 106, 255, 0.03) !important;
  border-color: rgba(124, 106, 255, 0.2) !important;
}

.note-private:focus {
  background: rgba(124, 106, 255, 0.08) !important;
  border-color: var(--accent) !important;
}

/* ════════════════════════════════════════════════════════════
   ログアウト確認モーダル (iOS風プレミアムデザイン)
   優先度を上げるため .modal を含めて定義
════════════════════════════════════════════════════════════ */
.modal .logout-confirm-content {
  background: #1c1c1e !important;
  color: #f8fafc !important;
  border-radius: 16px;
  padding: 0 !important;
  width: 280px !important;
  max-width: 90%;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: modalScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(1.1); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.logout-confirm-body {
  padding: 24px 16px 20px;
  text-align: center;
  background: #1c1c1e;
}

.logout-confirm-text {
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: #f8fafc !important;
  margin: 0 !important;
  white-space: normal !important;
}

.logout-confirm-footer {
  display: flex !important;
  flex-direction: row !important;
  border-top: 0.5px solid rgba(255, 255, 255, 0.15) !important;
  width: 100% !important;
  background: #1c1c1e;
}

.btn-logout-dialog {
  flex: 1 !important;
  background: transparent !important;
  border: none !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  padding: 14px 8px !important;
  cursor: pointer !important;
  color: #0a84ff !important;
  transition: background 0.2s !important;
  font-family: inherit !important;
  text-align: center !important;
  display: block !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

.btn-logout-dialog:active {
  background: rgba(255, 255, 255, 0.1) !important;
}

.btn-logout-cancel {
  border-right: 0.5px solid rgba(255, 255, 255, 0.15) !important;
}

.btn-logout-ok {
  font-weight: 700 !important;
}

/* ════════════════════════════════════════════════════════════
   汎用アラートモーダル (ユーザー名重複エラー等)
════════════════════════════════════════════════════════════ */
.modal .alert-modal-content {
  background: #1c1c1e !important;
  color: #f8fafc !important;
  border-radius: 16px;
  padding: 0 !important;
  width: 280px !important;
  max-width: 90%;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: modalScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.alert-modal-body {
  padding: 24px 20px 20px;
  text-align: center;
  background: #1c1c1e;
}

.alert-modal-text {
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  color: #f8fafc !important;
  margin: 0 !important;
  white-space: normal !important;
}

.alert-modal-footer {
  display: flex !important;
  border-top: 0.5px solid rgba(255, 255, 255, 0.15) !important;
  width: 100% !important;
  background: #1c1c1e;
}

.btn-alert-dialog {
  flex: 1 !important;
  background: transparent !important;
  border: none !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  padding: 14px 8px !important;
  cursor: pointer !important;
  color: #0a84ff !important;
  transition: background 0.2s !important;
  font-family: inherit !important;
  text-align: center !important;
  display: block !important;
}

.btn-alert-dialog:active {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* モーダル基本スタイル (既存のモーダルの整合性のために維持/追加) */
.modal {
  position: fixed;
  inset: 0;
  z-index: 10000 !important; /* 最前面に */
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* ── 管理者・ゴーストモード ─────────────────────────────── */
.btn-ghost-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-ghost-toggle:empty { display: none !important; }

.btn-ghost-toggle.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent);
  color: var(--accent-hover);
}

.admin-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--accent-dim);
  color: var(--accent-hover);
  padding: 1px 6px;
  border-radius: 99px;
  border: 1px solid var(--accent);
  display: inline-block;
  margin-left: 2px;
}

/* ── キック・通知 ───────────────────────────────────────── */
.kick-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.kick-card {
  max-width: 320px;
  padding: 40px;
}

.kick-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.kick-title {
  font-size: 24px;
  color: #fff;
  margin-bottom: 12px;
}

.kick-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 30px;
  line-height: 1.6;
}

.btn-kick-ok {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
}

/* ── サーバー管理パネル ──────────────────────────────────── */
.sidebar-admin {
  width: 280px;
  background: var(--bg-glass-heavy);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .sidebar-admin {
    position: absolute;
    inset: 0;
    width: 100% !important; /* 全画面表示に */
    height: 100% !important;
    z-index: 500;
    border-left: none;
    background: #121214 !important; /* 透過をやめて完全に塗りつぶす */
    opacity: 1 !important;
    padding-bottom: 0px !important;
  }
}

.admin-room-list-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.admin-room-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
}

.admin-room-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.admin-room-pass {
  font-size: 13px;
  font-weight: 700;
}

.admin-room-count {
  font-size: 11px;
  color: var(--text-muted);
}

.admin-room-actions {
  display: flex;
  gap: 6px;
}

.btn-admin-action {
  flex: 1;
  padding: 10px 6px; /* 拡大 */
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-admin-peek:hover, .btn-admin-join:hover { 
  background: var(--accent); 
  color: #fff; 
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(10, 132, 255, 0.3);
}
.btn-admin-peek:active, .btn-admin-join:active {
  transform: translateY(1px);
  box-shadow: none;
}
.btn-admin-delete:hover { 
  background: #ef4444; 
  color: #fff; 
  border-color: #ef4444; 
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}
.btn-admin-delete:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* 覗き見コンテナ */
.modal-card {
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 210;
  animation: modalScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-large {
  width: 800px;
  max-width: 95vw;
  height: 600px;
  max-height: 85vh;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-icon-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}

.btn-icon-close:hover {
  color: var(--error);
}

.peek-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  scrollbar-width: thin;
}

/* ── その他管理者操作 ─────────────────────────────────────── */
.btn-kick-user, .btn-rename-user {
  padding: 6px 12px; /* タッチ用に拡大 */
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-kick-user:hover { background: rgba(239, 68, 68, 0.2); color: #ef4444; border-color: #ef4444; }
.btn-rename-user:hover { background: var(--accent-dim); color: var(--accent-hover); border-color: var(--accent); }

@media (max-width: 768px) {
  .admin-user-actions {
    width: 100%;
    justify-content: stretch;
  }
  .btn-kick-user, .btn-rename-user {
    flex: 1;
    text-align: center;
    padding: 8px;
  }
}

.admin-controls-room {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.btn-room-reset {
  width: 100%;
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-room-reset:hover {
  background: #ef4444;
  color: #fff;
}

/* サーバー管理パネル：全体通知セクション */
.admin-broadcast-section {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  margin-top: auto;
}

.admin-sub-title {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-broadcast-textarea {
  width: 100%;
  height: 80px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.5;
  resize: none;
  margin-bottom: 8px;
  font-family: inherit;
}

.admin-broadcast-textarea:focus {
  outline: none;
  border-color: #0a84ff;
  background: rgba(0, 0, 0, 0.4);
}

.btn-admin-broadcast-send {
  width: 100%;
  background: linear-gradient(135deg, #0a84ff 0%, #0070e3 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}

.btn-admin-broadcast-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(10, 132, 255, 0.4);
}

.btn-admin-broadcast-send:active {
  transform: translateY(0);
}
