/* ============================================
 * 电话闹钟 · 液态玻璃 · 随机配色版
 * 版式：A · 单卡片居中
 * ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC',
               'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: #1d1d1f;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: linear-gradient(135deg, #ffd6e8 0%, #c5e3ff 40%, #d4f4dd 100%);
  transition: background 1.2s ease;
}

/* === 漂浮光斑 === */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  transition: background 1.2s ease;
}
.bg-blob.b1 { width: 520px; height: 520px; top: -120px; left: -100px; opacity: 0.6; animation: float-a 18s ease-in-out infinite; }
.bg-blob.b2 { width: 600px; height: 600px; bottom: -200px; right: -150px; opacity: 0.55; animation: float-b 22s ease-in-out infinite; }
.bg-blob.b3 { width: 480px; height: 480px; top: 40%; left: 55%; opacity: 0.4; animation: float-c 25s ease-in-out infinite; }

@keyframes float-a { 0%,100% {transform:translate(0,0) scale(1);} 50%{transform:translate(80px,60px) scale(1.1);} }
@keyframes float-b { 0%,100% {transform:translate(0,0) scale(1);} 50%{transform:translate(-90px,-70px) scale(1.15);} }
@keyframes float-c { 0%,100% {transform:translate(0,0) scale(1);} 50%{transform:translate(-40px,-60px) scale(1.1);} }

/* === 容器 === */
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 24px 20px;
  position: relative;
  z-index: 2;
}

/* === 玻璃通用 === */
.glass {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* === 通用 input === */
input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  color: #1d1d1f;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s;
}
input::placeholder { color: rgba(0, 0, 0, 0.35); }
input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

/* === 通用 button === */
button {
  background: var(--accent-grad);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 8px 20px var(--accent-shadow);
}
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px var(--accent-shadow);
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ===============================
 *  登录页
 * =============================== */
.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
  text-align: center;
}
.logo {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 22px;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  box-shadow: 0 8px 24px var(--accent-shadow);
  color: #fff;
  transition: background 1.2s ease, box-shadow 1.2s ease;
}
.logo i { color: #fff; }

h1 {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
  color: #1d1d1f;
}
.subtitle {
  color: rgba(0, 0, 0, 0.55);
  font-size: 14px;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}
label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.7);
  font-weight: 500;
  letter-spacing: 0.3px;
}
.login-card button {
  width: 100%;
  margin-top: 4px;
}

.error-message {
  background: rgba(248, 113, 113, 0.15);
  color: #b91c1c;
  border: 1px solid rgba(248, 113, 113, 0.4);
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 16px;
  display: none;
  font-size: 13px;
}

/* ===============================
 *  仪表盘 · 版式 A · 单卡片居中
 * =============================== */
.app-card {
  width: 100%;
  max-width: 580px;
  padding: 28px 30px;
}

/* 顶部品牌行 */
.app-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.brand-mini {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-shadow);
  transition: background 1.2s ease, box-shadow 1.2s ease;
  flex-shrink: 0;
}
.brand-text h2 {
  font-size: 17px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0;
  letter-spacing: -0.2px;
}
.brand-text p {
  font-size: 10px;
  color: rgba(0, 0, 0, 0.45);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}
.spacer { flex: 1; }

/* 小按钮（顶部退出） */
.btn-mini {
  width: auto;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: none;
}
.btn-mini:hover { transform: none; box-shadow: none; }
.btn-danger {
  background: rgba(248, 113, 113, 0.15);
  color: #b91c1c;
  border: 1px solid rgba(248, 113, 113, 0.4);
}
.btn-danger:hover { background: rgba(248, 113, 113, 0.25); }

/* 公告按钮 */
.btn-info {
  background: rgba(255, 255, 255, 0.5);
  color: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.btn-info:hover { background: rgba(255, 255, 255, 0.8); color: var(--accent-color); }
.btn-info i { color: var(--accent-color); transition: color 1.2s ease; }

/* 账户 chips */
.account-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.acc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.7);
}
.acc-chip i {
  color: var(--accent-color);
  font-size: 11px;
  transition: color 1.2s ease;
}
.acc-chip strong {
  color: #1d1d1f;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 600;
  font-size: 12px;
}

/* 拨号区块 */
.dialer-block { margin-bottom: 18px; }
.section-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title i {
  color: var(--accent-color);
  transition: color 1.2s ease;
}

/* 电话号码输入 */
.phone-input {
  width: 100%;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  color: #1d1d1f;
  font-size: 22px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 500;
  letter-spacing: 2px;
  text-align: center;
}
.phone-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

/* 验证码行：图片 | 刷新 | 输入框 */
.captcha-row {
  display: grid;
  grid-template-columns: 110px 44px 1fr;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}
/* 验证码图片 + 骨架屏 */
.captcha-img-wrap {
  position: relative;
  width: 110px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(135deg, #f5f5f7, #e0e0e6);
}
.captcha-img-wrap.loading::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0.2) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.captcha-img-wrap.loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  transition: border-top-color 1.2s ease;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
#captcha-img {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.captcha-img-wrap:not(.loading) #captcha-img {
  opacity: 1;
}
#captcha-refresh {
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: rgba(0, 0, 0, 0.7);
  font-size: 14px;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: normal;
}
#captcha-refresh:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent-color);
  transform: none;
  box-shadow: none;
}
.captcha-input {
  height: 44px;
  padding: 0 14px;
  text-align: center;
  letter-spacing: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 10px;
}

/* 操作按钮行：模式 | 呼叫 */
.action-buttons {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  margin-top: 12px;
}
.select-container { width: 100%; }
.mode-select {
  width: 100%;
  height: 48px;
  padding: 0 36px 0 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  color: #1d1d1f;
  font-size: 14px;
  font-family: inherit;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: all 0.2s;
}
.mode-select:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.8);
  border-color: var(--accent-border);
}
.call-button {
  height: 48px;
  padding: 0 20px;
  background: var(--accent-grad);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 20px var(--accent-shadow);
}

/* 呼叫列表 */
.phone-list-container {
  margin-top: 6px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
}
.list-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.list-label {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.65);
  font-weight: 500;
}
.count-pill {
  display: inline-block;
  padding: 3px 9px;
  background: var(--accent-soft);
  color: var(--accent-color);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 11px;
  transition: background 1.2s ease, color 1.2s ease;
}

.phone-list {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.phone-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 11px;
  padding: 11px 14px;
}
.phone-list-item-number {
  font-size: 14px;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1px;
  color: #1d1d1f;
  display: flex;
  align-items: center;
  gap: 10px;
}
.phone-list-item-number::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-color);
  animation: pulse 1.4s ease-in-out infinite;
  transition: background 1.2s ease, box-shadow 1.2s ease;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.7); opacity: 0.6; }
}

.phone-list-item-cancel {
  background: transparent;
  color: #b91c1c;
  border: 1px solid rgba(185, 28, 28, 0.3);
  padding: 5px 10px;
  font-size: 11px;
  width: auto;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: none;
  font-weight: 500;
}
.phone-list-item-cancel:hover {
  background: rgba(248, 113, 113, 0.12);
  transform: none;
  box-shadow: none;
}
.phone-list-item-cancel:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===============================
 *  公告弹窗
 * =============================== */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal-content {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  overflow: auto;
  animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  padding: 20px 24px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.modal-header i {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-color);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: background 1.2s ease, color 1.2s ease;
}
.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: #1d1d1f;
}
.modal-body {
  padding: 20px 24px;
  max-height: 50vh;
  overflow-y: auto;
}
.modal-body p {
  margin: 0;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.75);
}
.modal-footer {
  padding: 14px 24px 20px;
  display: flex;
  justify-content: flex-end;
}
.modal-button {
  background: var(--accent-grad);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: auto;
  box-shadow: 0 6px 16px var(--accent-shadow);
}
.modal-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px var(--accent-shadow);
}

/* === 响应式 === */
@media (max-width: 600px) {
  .container { padding: 12px; }
  .app-card { padding: 22px 20px; }
  .phone-input { font-size: 18px; letter-spacing: 1px; }
  .action-buttons { grid-template-columns: 1fr; }
  .select-container { width: 100%; }
  .captcha-row { grid-template-columns: 100px 44px 1fr; }
  .login-card { padding: 28px 24px; }
}

/* Turnstile 兼容 */
.turnstile-container {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}
.turnstile-error {
  color: #b91c1c;
  margin-top: 8px;
  font-size: 13px;
  text-align: center;
}
