/* ==========================================================================
   即讯会议 Jixun Meeting
   全局样式 - 兼容桌面 + 移动端 H5
   ========================================================================== */

:root {
  --jx-primary: #2563eb;
  --jx-primary-dark: #1d4ed8;
  --jx-primary-light: #60a5fa;
  --jx-success: #10b981;
  --jx-danger: #ef4444;
  --jx-warning: #f59e0b;
  --jx-text: #0f172a;
  --jx-text-muted: #64748b;
  --jx-bg: #f8fafc;
  --jx-card: #ffffff;
  --jx-border: #e2e8f0;
  --jx-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  --jx-radius: 12px;
  --jx-radius-sm: 8px;
  --jx-radius-lg: 20px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  color: var(--jx-text);
  background: var(--jx-bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--jx-primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

button {
  font-family: inherit;
  cursor: pointer;
}

input, button, textarea, select { font-family: inherit; font-size: 14px; }

/* 容器 */
.jx-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.jx-container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

.jx-container--sm { max-width: 420px; }

/* 顶部导航 */
.jx-nav {
  background: linear-gradient(135deg, var(--jx-primary) 0%, var(--jx-primary-dark) 100%);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.jx-nav__brand {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.jx-nav__brand-mark {
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.jx-nav__user { font-size: 13px; opacity: 0.95; }
.jx-nav__link {
  color: #fff;
  opacity: 0.9;
  margin-left: 12px;
  font-size: 13px;
}
.jx-nav__link:hover { opacity: 1; text-decoration: none; }

/* 卡片 */
.jx-card {
  background: var(--jx-card);
  border-radius: var(--jx-radius);
  box-shadow: var(--jx-shadow);
  padding: 24px;
  margin-bottom: 16px;
}
.jx-card--center {
  text-align: center;
}
.jx-card__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--jx-text);
}

/* 表单 */
.jx-form-item {
  margin-bottom: 16px;
}
.jx-form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--jx-text-muted);
  font-weight: 500;
}
.jx-input,
.jx-textarea,
.jx-select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--jx-border);
  border-radius: var(--jx-radius-sm);
  background: #fff;
  color: var(--jx-text);
  transition: all 0.2s;
  outline: none;
}
.jx-input:focus,
.jx-textarea:focus,
.jx-select:focus {
  border-color: var(--jx-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.jx-textarea { min-height: 80px; resize: vertical; }

/* 按钮 */
.jx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: var(--jx-radius-sm);
  border: 0;
  background: var(--jx-primary);
  color: #fff;
  font-weight: 500;
  transition: all 0.18s;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  gap: 6px;
}
.jx-btn:hover { background: var(--jx-primary-dark); text-decoration: none; }
.jx-btn:active { transform: translateY(1px); }
.jx-btn--block { width: 100%; }
.jx-btn--lg { padding: 14px 28px; font-size: 16px; }
.jx-btn--ghost {
  background: transparent;
  color: var(--jx-primary);
  border: 1px solid var(--jx-primary);
}
.jx-btn--ghost:hover { background: var(--jx-primary); color: #fff; }
.jx-btn--danger { background: var(--jx-danger); }
.jx-btn--danger:hover { background: #dc2626; }
.jx-btn--success { background: var(--jx-success); }
.jx-btn--success:hover { background: #059669; }
.jx-btn--warning { background: var(--jx-warning); }
.jx-btn--warning:hover { background: #d97706; }
.jx-btn--sm { padding: 6px 12px; font-size: 12px; }
.jx-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* 提示信息 */
.jx-alert {
  padding: 10px 14px;
  border-radius: var(--jx-radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
}
.jx-alert--error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.jx-alert--success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.jx-alert--info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* 居中表单布局（登录/注册） */
.jx-auth {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow: hidden;
}
.jx-auth__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=modern%20minimalist%20abstract%20gradient%20background%2C%20soft%20blue%20and%20purple%20tones%2C%20smooth%20mesh%20gradient%2C%20clean%20professional%20tech%20atmosphere%2C%20no%20text%2C%20no%20people&image_size=landscape_16_9');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.jx-auth__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(37, 99, 235, 0.45) 100%);
}
.jx-auth__box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
}
.jx-auth__logo {
  text-align: center;
  margin-bottom: 24px;
}
.jx-auth__title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  letter-spacing: 1px;
}
.jx-auth__subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.jx-auth .jx-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.25);
}

/* 列表 */
.jx-list { list-style: none; padding: 0; margin: 0; }
.jx-list__item {
  padding: 14px 0;
  border-bottom: 1px solid var(--jx-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.jx-list__item:last-child { border-bottom: 0; }
.jx-list__title { font-weight: 500; color: var(--jx-text); }
.jx-list__meta { font-size: 12px; color: var(--jx-text-muted); margin-top: 4px; }

.jx-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: #e0e7ff;
  color: #4338ca;
}
.jx-tag--success { background: #dcfce7; color: #166534; }
.jx-tag--danger  { background: #fee2e2; color: #b91c1c; }
.jx-tag--warning { background: #fef3c7; color: #92400e; }
.jx-tag--muted   { background: #f1f5f9; color: #475569; }

/* 空状态 */
.jx-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--jx-text-muted);
}

/* 会议中布局 */
.jx-meeting {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
}
.jx-meeting__header {
  padding: 12px 16px;
  background: rgba(15,23,42,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.jx-meeting__title { font-size: 16px; font-weight: 600; margin: 0; }
.jx-meeting__meta { font-size: 12px; color: #94a3b8; }
.jx-meeting__body {
  flex: 1;
  display: flex;
  overflow: hidden;
}
.jx-meeting__main {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.jx-meeting__side {
  width: 300px;
  background: rgba(15,23,42,0.7);
  border-left: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
}
.jx-meeting__footer {
  padding: 12px 16px;
  background: rgba(15,23,42,0.85);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* 成员卡片网格 */
.jx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.jx-member {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--jx-radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.2s;
}
.jx-member.is-active {
  border-color: var(--jx-primary-light);
  background: rgba(96,165,250,0.15);
  box-shadow: 0 0 0 2px rgba(96,165,250,0.25);
}
.jx-member.is-speaking {
  border-color: #34d399;
  background: rgba(52, 211, 153, 0.10);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25);
}
.jx-member__avatar-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.jx-member__avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--jx-primary), var(--jx-primary-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  color: #fff;
  position: relative;
  z-index: 2;
  transition: transform 0.1s;
}
.jx-member.is-speaking .jx-member__avatar {
  transform: scale(1.05);
  background: linear-gradient(135deg, #10b981, #059669);
}
.jx-member__ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(52, 211, 153, 0.6);
  pointer-events: none;
  z-index: 1;
  transition: transform 0.08s ease-out;
}
.jx-member__mic-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #10b981;
  color: #fff;
  font-size: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  border: 2px solid #1e293b;
  animation: jx-pulse-mic 1.2s infinite;
}
@keyframes jx-pulse-mic {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}
.jx-member__name {
  font-size: 13px;
  font-weight: 500;
  word-break: break-all;
}

/* "我"的标识 */
.jx-member.is-me {
  border-color: var(--jx-primary-light);
  box-shadow: 0 0 0 2px var(--jx-primary-light);
  background: rgba(96, 165, 250, 0.08);
}
.jx-member__me-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--jx-primary);
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* 右上角角色徽章 */
.jx-member__role-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
  color: #cbd5e1;
}
.jx-member__role-tag--host { background: var(--jx-primary); color: #fff; font-weight: 600; }
.jx-member__role-tag--speaker { background: var(--jx-success); color: #fff; }

/* 听筒按钮 */
.jx-member__listen-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  z-index: 4;
}
.jx-member__listen-btn:hover { background: rgba(255,255,255,0.22); }
.jx-member__listen-btn.is-listening {
  background: var(--jx-success);
  border-color: var(--jx-success);
}
.jx-member__role {
  font-size: 11px;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
}
.jx-member__role--host { background: var(--jx-primary); color: #fff; }
.jx-member__role--speaker { background: var(--jx-success); color: #fff; }
.jx-member__role--listener { background: rgba(255,255,255,0.1); color: #cbd5e1; }
.jx-member__hand {
  position: absolute;
  top: 6px; right: 6px;
  font-size: 14px;
  animation: jx-pulse 1s infinite;
}
.jx-member__hand-host {
  position: absolute;
  top: 6px; left: 6px;
  font-size: 12px;
  background: var(--jx-primary);
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
}

@keyframes jx-pulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* 发言申请列表 */
.jx-hand-list { display: flex; flex-direction: column; gap: 6px; }
.jx-hand-item {
  background: rgba(245,158,11,0.18);
  color: #fbbf24;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(245,158,11,0.35);
}
.jx-hand-item__name {
  font-weight: 500;
  word-break: break-all;
  flex: 1;
}

/* 浮动待审核面板（主持人右下角） */
.jx-hand-float {
  position: fixed;
  right: 16px;
  bottom: 80px;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(245,158,11,0.4);
  border-radius: 10px;
  padding: 12px;
  min-width: 220px;
  max-width: 280px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 200;
  animation: jx-pulse-float 2s infinite;
}
.jx-hand-float__title {
  font-size: 13px;
  color: #fbbf24;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.jx-hand-float__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.jx-hand-item--compact {
  padding: 6px 8px;
  font-size: 11px;
}
@keyframes jx-pulse-float {
  0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
  50% { box-shadow: 0 8px 24px rgba(245,158,11,0.4); }
}

/* 控制按钮 */
.jx-ctrl {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.08);
  color: #f8fafc;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  min-width: 70px;
  transition: all 0.2s;
}
.jx-ctrl:hover { background: rgba(255,255,255,0.15); }
.jx-ctrl.is-active { background: var(--jx-primary); border-color: var(--jx-primary); }
.jx-ctrl.is-danger { background: var(--jx-danger); border-color: var(--jx-danger); }
.jx-ctrl__icon { font-size: 22px; }

/* 聊天 */
.jx-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.jx-chat__msgs {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}
.jx-chat__msg {
  margin-bottom: 8px;
  font-size: 13px;
}
.jx-chat__name { color: #93c5fd; font-weight: 500; margin-right: 6px; }
.jx-chat__time { color: #64748b; font-size: 11px; margin-left: 4px; }
.jx-chat__text { color: #e2e8f0; word-break: break-word; }
.jx-chat__input {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 10px;
  display: flex;
  gap: 6px;
}
.jx-chat__input input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  border: 0;
  background: rgba(255,255,255,0.08);
  color: #fff;
  outline: none;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .jx-meeting__body { flex-direction: column; }
  .jx-meeting__side {
    width: 100%;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    height: 280px;
    flex-shrink: 0;
  }
  .jx-meeting__main {
    flex: 1;
    min-height: 0;
  }
  .jx-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
  .jx-nav__user { display: none; }
  .jx-card { padding: 16px; }
}

/* Toast */
.jx-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
}
.jx-toast__item {
  background: rgba(15,23,42,0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  margin-bottom: 8px;
  font-size: 14px;
  animation: jx-toast-in 0.25s;
}
.jx-toast__item--error { background: var(--jx-danger); }
.jx-toast__item--success { background: var(--jx-success); }
.jx-toast__item--warning { background: var(--jx-warning); }
@keyframes jx-toast-in {
  from { transform: translateY(-12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* 模态 */
.jx-modal {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 16px;
}
.jx-modal.is-open { display: flex; }
.jx-modal__panel {
  background: #fff;
  border-radius: var(--jx-radius);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
}
.jx-modal__header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--jx-border);
  font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
}
.jx-modal__body { padding: 16px; }
.jx-modal__footer { padding: 12px 16px; border-top: 1px solid var(--jx-border); text-align: right; display: flex; gap: 8px; justify-content: flex-end; }

/* 主持人提示卡 */
.jx-banner {
  padding: 10px 14px;
  border-radius: var(--jx-radius-sm);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

/* 帮助文本 */
.jx-help {
  font-size: 12px;
  color: var(--jx-text-muted);
  margin-top: 4px;
}

/* 分隔线 */
.jx-divider {
  height: 1px;
  background: var(--jx-border);
  margin: 16px 0;
}

/* 文字工具 */
.jx-text-center { text-align: center; }
.jx-text-right { text-align: right; }
.jx-mt-8 { margin-top: 8px; }
.jx-mt-16 { margin-top: 16px; }
.jx-mt-24 { margin-top: 24px; }
.jx-mb-8 { margin-bottom: 8px; }
.jx-mb-16 { margin-bottom: 16px; }
.jx-flex { display: flex; }
.jx-flex-1 { flex: 1; }
.jx-flex-center { display: flex; align-items: center; justify-content: center; }
.jx-gap-8 { gap: 8px; }
.jx-gap-12 { gap: 12px; }

/* 加载 */
.jx-loading {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: jx-spin 0.8s linear infinite;
  vertical-align: middle;
}
@keyframes jx-spin { to { transform: rotate(360deg); } }