﻿/* ==================== 全局重置 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: #333;
  background: #f5f7fa;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* 禁止 iOS 横屏/聚焦时自动调整字号 */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* 防止 iOS 橡皮筋效果 */
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

body {
  /* 安全区域适配 */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* iOS Safari 修复：可输入元素字号小于 16px 时，聚焦会自动放大整个页面
   （新版 iOS 会忽略 viewport 的 user-scalable=no）。统一保证 >=16px 即可杜绝 */
input, textarea, select {
  font-size: 16px;
}

input, button, textarea {
  font-family: inherit;
  outline: none;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

#app {
  width: 100%;
  height: 100%;
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  background: #f5f7fa;
  overflow: hidden;
}

.page {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: #f5f7fa;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 60px;
  padding-bottom: calc(60px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: fadeIn 0.25s ease-out;
  /* 防止 iOS 页面内橡皮筋 */
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== 登录页 ==================== */
.login-page {
  background: linear-gradient(180deg, #4facfe 0%, #00f2fe 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  min-height: 100%;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
  flex-shrink: 0;
}

.logo-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.logo-icon {
  font-size: 48px;
}

.app-title {
  font-size: 28px;
  color: #fff;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.app-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 1px;
}

.login-form {
  width: 85%;
  max-width: 340px;
  background: #fff;
  border-radius: 20px;
  padding: 30px 25px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.form-group {
  position: relative;
  margin-bottom: 18px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.form-group:focus-within {
  border-bottom-color: #4facfe;
}

.form-icon {
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  opacity: 0.5;
}

.form-group input {
  width: 100%;
  padding: 10px 10px 10px 35px;
  font-size: 16px;
  color: #333;
  background: transparent;
  -webkit-user-select: text;
  user-select: text;
}

.form-group input::placeholder {
  color: #bbb;
  font-size: 14px;
}

.btn-login {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: 24px;
  margin-top: 10px;
  letter-spacing: 4px;
  box-shadow: 0 5px 20px rgba(79, 172, 254, 0.4);
  transition: all 0.2s;
}

.btn-login:active {
  transform: scale(0.98);
  box-shadow: 0 3px 10px rgba(79, 172, 254, 0.3);
}

.login-footer {
  text-align: center;
  margin-top: 15px;
  font-size: 12px;
  color: #999;
}

/* ==================== 主应用 ==================== */
.main-app {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.page-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* 状态栏 */
.status-bar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #fff;
  font-size: 12px;
  color: #333;
  font-weight: 500;
}

.status-left, .status-right {
  width: 80px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-right {
  justify-content: flex-end;
}

.status-center {
  font-weight: 600;
  font-size: 14px;
}

/* ==================== 拨号页 ==================== */
.dialer-page {
  display: flex;
  flex-direction: column;
  background: #fff;
  height: 100%;
  overflow: hidden;
}

.dialer-header {
  padding: 10px 16px;
  background: #fff;
  flex-shrink: 0;
}

.balance-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 14px 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.balance-card::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 100px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.balance-label {
  font-size: 12px;
  opacity: 0.9;
  margin-bottom: 6px;
}

.balance-amount {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: baseline;
}

.balance-unit {
  font-size: 14px;
  margin-left: 6px;
  font-weight: 400;
  opacity: 0.9;
}

.balance-tip {
  font-size: 11px;
  opacity: 0.85;
}

.dialer-display {
  flex: 0 0 auto;
  padding: 15px 20px 10px;
  text-align: center;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
}

.phone-number-display {
  font-size: 32px;
  font-weight: 400;
  color: #222;
  letter-spacing: 1px;
  min-height: 42px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.phone-number-hint {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

.dialer-keypad {
  flex: 1;
  padding: 8px 30px 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 0;
}

.keypad-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.key-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #f2f3f7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.key-btn:active {
  background: #e0e2e8;
  transform: scale(0.95);
}

.key-num {
  font-size: 24px;
  font-weight: 400;
  color: #333;
  line-height: 1;
}

.key-letters {
  font-size: 9px;
  color: #999;
  margin-top: 2px;
  letter-spacing: 1px;
}

.key-btn-special .key-num {
  font-size: 28px;
}

.dial-row {
  margin-top: 4px;
}

.key-empty {
  visibility: hidden;
}

.key-delete {
  background: transparent;
}

.key-delete:active {
  background: #f2f3f7;
}

.delete-icon {
  font-size: 24px;
  color: #666;
}

.call-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00c853 0%, #00e676 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 200, 83, 0.35);
  transition: all 0.15s;
  flex-shrink: 0;
}

.call-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(0, 200, 83, 0.3);
}

.call-icon {
  font-size: 24px;
}

/* ==================== 底部导航 ==================== */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid #eee;
  z-index: 999;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
  transition: all 0.2s;
  position: relative;
}

.nav-item.active .nav-icon {
  transform: scale(1.1);
}

.nav-item.active .nav-text {
  color: #4facfe;
  font-weight: 500;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: #4facfe;
  border-radius: 3px;
}

.nav-icon {
  font-size: 22px;
  margin-bottom: 2px;
  transition: transform 0.2s;
}

.nav-text {
  font-size: 11px;
  color: #999;
}

/* ==================== 页面头部 ==================== */
.page-header {
  padding: 15px 20px 0;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
  transition: box-shadow 0.2s;
}

.page-header.scrolled {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.page-header h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-right {
  display: flex;
  align-items: center;
}

.edit-btn {
  font-size: 15px;
  color: #4facfe;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 10px;
}

.edit-btn:active {
  opacity: 0.7;
}

.header-tabs {
  display: flex;
  gap: 20px;
  padding: 0 20px;
  background: #fff;
  position: sticky;
  top: 60px;
  z-index: 9;
}

.tab-item {
  font-size: 14px;
  color: #666;
  padding: 10px 0;
  position: relative;
  cursor: pointer;
}

.tab-item.active {
  color: #4facfe;
  font-weight: 600;
}

.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: #4facfe;
  border-radius: 2px;
}

/* 编辑模式底部栏 */
.edit-bottom-bar {
  position: absolute;
  bottom: 60px;
  left: 0;
  right: 0;
  background: #fff;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.btn-select-all {
  font-size: 15px;
  color: #4facfe;
  background: none;
  cursor: pointer;
  padding: 8px 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-delete-selected {
  background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 22px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
  transition: all 0.2s;
}

.btn-delete-selected:active {
  transform: scale(0.96);
}

.btn-delete-selected:disabled {
  background: #e0e0e0;
  color: #999;
  box-shadow: none;
}

/* 通话记录编辑模式 */
.call-item.edit-mode {
  padding-left: 16px;
}

.call-item.edit-mode .call-avatar-small {
  margin-right: 12px;
}

.call-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid #ddd;
  border-radius: 50%;
  margin-right: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  transition: all 0.2s;
}

.call-checkbox.checked {
  background: #4facfe;
  border-color: #4facfe;
}

/* ==================== 通话记录 ==================== */
.calls-page {
  background: #fff;
  position: relative;
}

.call-list {
  padding: 0;
}

.call-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #f5f5f5;
  position: relative;
  transition: background 0.15s;
}

.call-item:active {
  background: #f7f8fa;
}

.call-avatar-small {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
}

.call-info {
  flex: 1;
  min-width: 0;
}

.call-number-main {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.call-type-icon {
  font-size: 12px;
}

.call-type-icon.missed {
  color: #ff4757;
}

.call-item.missed .call-number-main {
  color: #ff4757;
}

.call-detail {
  font-size: 12px;
  color: #999;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.call-time {
  color: #bbb;
  font-size: 12px;
  flex-shrink: 0;
  margin-left: 10px;
}

.call-duration-text {
  color: #666;
}

.call-more-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 22px;
  font-weight: 300;
  margin-left: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  transition: background 0.15s;
}

.call-more-btn:active {
  background: #f0f0f0;
  color: #666;
}

/* 通话记录空状态 */
.call-empty {
  padding: 80px 20px;
  text-align: center;
  color: #999;
}

.call-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.call-empty-text {
  font-size: 14px;
  color: #bbb;
}

/* ==================== 充值页 ==================== */
.recharge-page {
  background: #f5f7fa;
  padding-bottom: 20px;
}

.recharge-balance-card {
  margin: 15px 20px;
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  border-radius: 16px;
  padding: 25px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.recharge-balance-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
}

.recharge-label {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.recharge-balance {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 6px;
}

.recharge-symbol {
  font-size: 20px;
  margin-right: 4px;
  opacity: 0.9;
}

.recharge-rate {
  font-size: 12px;
  opacity: 0.85;
}

.recharge-section {
  margin: 15px 20px 0;
  background: #fff;
  border-radius: 14px;
  padding: 18px;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 14px;
}

.recharge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.recharge-item {
  background: #f7f8fa;
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}

.recharge-item.active {
  background: rgba(79, 172, 254, 0.08);
  border-color: #4facfe;
}

.recharge-item .amount {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 3px;
}

.recharge-item.active .amount {
  color: #4facfe;
}

.recharge-item .amount-tip {
  font-size: 11px;
  color: #999;
}

.pay-method-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pay-method-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 10px;
  background: #f7f8fa;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.pay-method-item.active {
  border-color: #4facfe;
  background: rgba(79, 172, 254, 0.05);
}

.pay-icon {
  font-size: 24px;
  margin-right: 12px;
}

.pay-name {
  flex: 1;
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.pay-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4facfe;
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.pay-method-item.active .pay-check {
  opacity: 1;
}

.btn-recharge {
  width: calc(100% - 40px);
  height: 50px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: 25px;
  margin: 20px 20px 0;
  letter-spacing: 2px;
  box-shadow: 0 5px 20px rgba(79, 172, 254, 0.4);
  transition: all 0.2s;
}

.btn-recharge:active {
  transform: scale(0.98);
}

.recharge-record-list {
  display: flex;
  flex-direction: column;
}

.recharge-record-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
}

.recharge-record-item:last-child {
  border-bottom: none;
}

.record-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.record-type {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.record-time {
  font-size: 12px;
  color: #999;
}

.record-amount {
  font-size: 15px;
  font-weight: 600;
}

.record-amount.positive {
  color: #00c853;
}

.record-amount.negative {
  color: #ff4757;
}

.record-amount.neutral {
  color: #ff9f43;
}

/* ==================== 通讯录 ==================== */
.contacts-page {
  background: #fff;
}

.search-bar {
  padding: 10px 20px;
  background: #f5f7fa;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 20px;
  padding: 8px 16px;
}

.search-icon {
  margin-right: 8px;
  font-size: 14px;
  opacity: 0.6;
}

.search-input-wrap input {
  flex: 1;
  font-size: 14px;
  color: #333;
  background: none;
  border: none;
  outline: none;
}

.contact-list {
  padding: 0;
}

.contact-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: background 0.15s;
}

.contact-item:active {
  background: #f7f8fa;
}

.contact-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  font-size: 16px;
  color: #fff;
  font-weight: 600;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.contact-info {
  flex: 1;
  min-width: 0;
}

.contact-name {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
}

.contact-phone {
  font-size: 13px;
  color: #999;
}

.contact-call-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(79, 172, 254, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.contact-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 14px;
}

/* ==================== 个人中心 ==================== */
.profile-page {
  background: #f5f7fa;
  padding-bottom: 20px;
}

.profile-header {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  padding: 40px 20px 50px;
  display: flex;
  align-items: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.profile-header::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  top: -80px;
  right: -50px;
}

.profile-header::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  bottom: -40px;
  left: 30%;
}

.avatar-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  z-index: 1;
}

.avatar-emoji {
  font-size: 32px;
}

.profile-info {
  flex: 1;
  z-index: 1;
}

.profile-name {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
}

.profile-phone {
  font-size: 13px;
  opacity: 0.85;
}

.profile-edit {
  padding: 6px 14px;
  background: rgba(255,255,255,0.2);
  border-radius: 14px;
  font-size: 13px;
}

.profile-stats {
  background: #fff;
  margin: -25px 20px 15px;
  border-radius: 16px;
  padding: 22px 15px;
  display: flex;
  align-items: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  position: relative;
  z-index: 5;
}

.stat-item {
  flex: 1;
  text-align: center;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  margin-bottom: 6px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.stat-label {
  font-size: 12px;
  color: #999;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: #f0f0f0;
}

.menu-list {
  margin: 0 20px;
}

.menu-group {
  background: #fff;
  border-radius: 14px;
  margin-bottom: 15px;
  overflow: hidden;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: background 0.15s;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:active {
  background: #f7f8fa;
}

.menu-icon {
  font-size: 20px;
  margin-right: 12px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fa;
  border-radius: 8px;
}

.menu-text {
  flex: 1;
  font-size: 15px;
  color: #333;
}

.menu-arrow {
  font-size: 14px;
  color: #ccc;
  margin-left: 8px;
}

.btn-logout {
  width: calc(100% - 40px);
  height: 48px;
  background: #fff;
  color: #ff4757;
  font-size: 15px;
  font-weight: 500;
  border-radius: 12px;
  margin: 20px 20px 0;
  border: none;
  transition: all 0.2s;
  display: block;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.btn-logout:active {
  background: #fff5f5;
  transform: scale(0.98);
}

/* ==================== 通话中界面 ==================== */
.call-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: #1a1a2e;
}

.call-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, #16213e 0%, #0f3460 100%);
}

.call-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 30px 40px;
  color: #fff;
  max-width: 480px;
  margin: 0 auto;
}

.call-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.3), rgba(0, 242, 254, 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

.call-avatar-icon {
  font-size: 48px;
}

.call-number {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 10px;
}

.call-status {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 15px;
}

.call-timer {
  font-size: 36px;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.call-cost {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 30px;
}

.call-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  width: 100%;
  max-width: 320px;
}

.control-row {
  display: flex;
  justify-content: space-around;
}

.control-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.control-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  backdrop-filter: blur(10px);
  transition: all 0.2s;
}

.control-btn.active .control-icon {
  background: #fff;
  color: #0f3460;
}

.control-label {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

.end-call-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4757 0%, #ff6b7a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 25px rgba(255, 71, 87, 0.5);
  margin-top: 20px;
  transition: all 0.15s;
}

.end-call-btn:active {
  transform: scale(0.95);
}

.end-call-icon {
  font-size: 30px;
  transform: rotate(135deg);
}

/* ==================== Toast ==================== */
.toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  max-width: 80%;
  text-align: center;
}

/* ==================== Loading ==================== */
.loading-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: #fff;
  font-size: 14px;
}

/* ==================== Modal ==================== */
.modal-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  padding: 20px;
}

.modal-container {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  padding: 20px 20px 10px;
  text-align: center;
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
  color: #333;
}

.modal-body {
  padding: 10px 20px 20px;
}

.modal-input {
  width: 100%;
  height: 42px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  margin-bottom: 12px;
  -webkit-user-select: text;
  user-select: text;
}

.modal-input:focus {
  border-color: #4facfe;
}

.modal-footer {
  display: flex;
  border-top: 1px solid #f0f0f0;
}

.modal-btn {
  flex: 1;
  height: 50px;
  font-size: 16px;
  background: none;
  cursor: pointer;
  border-right: 1px solid #f0f0f0;
  color: #666;
}

.modal-btn:last-child {
  border-right: none;
  color: #4facfe;
  font-weight: 600;
}

.modal-btn.danger {
  color: #ff4757;
}

.modal-btn:active {
  background: #f9f9f9;
}

.modal-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}


/* ==================== 空状态 ==================== */
.empty-state {
  padding: 80px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-text {
  font-size: 15px;
  color: #666;
  margin-bottom: 6px;
  font-weight: 500;
}

.empty-desc {
  font-size: 13px;
  color: #999;
}

