/* 全局样式文件 */
/* 包含整个应用的通用样式 */

/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100%; /* 改为min-height，允许内容超出时滚动 */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #e0e0e0;
  /* 背景图片设置 */
  background-image: url('../assets/images/app.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  /* 保留渐变作为fallback，如果图片加载失败 */
  background-color: #1a1a2e;
  overflow-x: hidden; /* 只隐藏横向滚动 */
  overflow-y: auto !important; /* 强制允许纵向滚动 */
  height: auto !important; /* 强制允许高度自适应 */
}

/* 隐藏滚动条 */
body::-webkit-scrollbar {
  display: none;
}

/* 主容器 */
#app {
  min-height: 100vh;
  background: rgba(25, 15, 10, 0.5); /* 深棕色系，与橙色背景协调 */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 0; /* 移除圆角，让内容填满屏幕 */
  box-shadow: none; /* 移除阴影 */
  margin: 0;
  padding: 0;
  margin-bottom: 70px; /* 为底部导航栏留出空间 */
  overflow-y: visible !important; /* 强制允许内容超出时显示 */
  overflow-x: hidden; /* 隐藏横向滚动 */
  width: 100%;
  box-sizing: border-box;
}

/* 底部导航栏 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(30, 20, 15, 0.85); /* 深棕色系，与橙色背景协调，稍微提高不透明度 */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 2px solid rgba(255, 255, 255, 0.4); /* 白色边框，更粗更明显 */
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  z-index: 9999;
  margin: 0 15px;
  border-radius: 12px 12px 0 0;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7); /* 改为白色半透明，更协调 */
  font-size: 12px;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 8px;
}

.nav-item.active {
  color: rgba(255, 200, 100, 1); /* 淡金色激活状态，与橙色背景呼应 */
  font-weight: 600;
}

.nav-item:hover {
  background: rgba(255, 200, 100, 0.15); /* 淡金色悬停效果 */
  color: rgba(255, 255, 255, 0.9);
}

.nav-icon {
  font-size: 20px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(0.7); /* 默认半透明白色 */
  transition: all 0.3s ease;
}

.nav-item.active .nav-icon img {
  filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(20deg); /* 激活状态：淡金色 */
}

.nav-item:hover .nav-icon img {
  filter: brightness(0) invert(0.9); /* 悬停状态：更亮的白色 */
}

/* 通用按钮样式 */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #e083eb 0%, #e5475c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, #33d96b 0%, #28e9c7 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
  color: white;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #ff5b5b 0%, #ff7e43 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

.btn-block {
  display: block;
  width: 100%;
}

/* 通用卡片样式 */
.card {
  background: rgba(30, 20, 15, 0.65) !important; /* 深棕色系，与橙色背景更协调 */
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); /* 增强阴影以提升层次感 */
  padding: 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.4) !important; /* 白色边框，更粗更明显 */
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #ffffff;
}

/* 通用表单样式 */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #bbbbbb;
  font-size: 16px;
}

.form-control {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 16px;
  line-height: 1.5;
  color: #e0e0e0;
  background: rgba(50, 50, 70, 0.8);
  background-clip: padding-box;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  /* 关键修复：确保输入框可以正常选择和粘贴 */
  user-select: auto;
  -webkit-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
  touch-action: auto;
}

.form-control:focus {
  border-color: #667eea;
  outline: 0;
  box-shadow: 0 6px 8px rgba(102, 126, 234, 0.3);
  background: rgba(60, 60, 80, 1);
}

.form-control::placeholder {
  color: #888888;
}

/* 滑动验证码样式 */
.slide-captcha-container {
  width: 100%;
  margin: 10px 0;
}

.slide-captcha {
  position: relative;
  width: 100%;
  height: 40px;
  background: #2d2d44;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.slide-captcha-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: #4caf50;
  transition: width 0.3s;
}

.slide-captcha-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 100%;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #666666;
  user-select: none;
}

.slide-captcha-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  color: #cccccc;
  pointer-events: none;
}

.slide-captcha-success {
  background: #4caf50 !important;
}

.slide-captcha-success .slide-captcha-text {
  color: #ffffff;
}

/* 通用工具类 */
.text-center {
  text-align: center;
}

.text-muted {
  color: #888888;
}

.text-success {
  color: #43e97b;
}

.text-danger {
  color: #ff6b6b;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.d-flex {
  display: flex;
}

.justify-content-between {
  justify-content: space-between;
}

.align-items-center {
  align-items: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
  #app {
    margin: 0;
    padding: 0;
    border-radius: 0;
    margin-bottom: 70px; /* 为底部导航栏留出空间 */
  }
  
  .bottom-nav {
    margin: 0;
    border-radius: 0;
  }
  
  .nav-item {
    font-size: 10px;
    padding: 6px 12px;
  }
  
  .nav-icon {
    font-size: 18px;
  }
  
  .nav-icon img {
    width: 20px;
    height: 20px;
  }
}

/* ===== Proxy Management Page Styles (from css/proxy.css) ===== */
.proxy-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  padding-bottom: 100px;
  overflow-y: visible !important; /* 允许内容超出，不限制滚动 */
  overflow-x: hidden; /* 隐藏横向滚动 */
  width: 100%; /* 确保容器占满宽度 */
  max-width: 100%; /* 防止溢出 */
  box-sizing: border-box; /* 确保padding计算在宽度内 */
}

.proxy-container .header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  background: rgba(30, 20, 15, 0.7);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  padding: 20px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.4); /* 白色边框，更粗更明显 */
}

.proxy-container .header-center {
  text-align: center;
}

.proxy-container .header-title {
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin: 0;
  text-align: center !important;
}

.proxy-container .stats-card {
  margin-bottom: 30px;
  background: rgba(30, 20, 15, 0.65) !important; /* 深棕色系，与橙色背景协调 */
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.4) !important; /* 白色边框，更粗更明显 */
}

.proxy-container .stats-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 10px;
}

.proxy-container .stat-item {
  text-align: center;
  padding: 10px;
  flex: 1;
}

.proxy-container .stat-label {
  font-size: 14px;
  color: #bdc3c7; /* Adjusted for better contrast on dark bg */
  margin-bottom: 5px;
}

.proxy-container .stat-value {
  font-size: 24px;
  font-weight: 700;
}

.proxy-container .stat-total {
  color: #3498db;
}

.proxy-container .stat-valid {
  color: #2ecc71;
}

.proxy-container .stat-invalid {
  color: #e74c3c;
}

.ip-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* 从300px减小到280px */
  gap: 15px;
  overflow-y: visible !important; /* 允许内容超出，不限制滚动 */
  width: 100%; /* 确保容器占满宽度 */
  max-width: 100%; /* 防止溢出 */
  box-sizing: border-box; /* 确保padding计算在宽度内 */
}

@media (max-width: 480px) {
  .ip-cards-container {
    grid-template-columns: 1fr; /* 超小屏幕单列显示 */
    gap: 12px;
  }
}

.ip-card {
  background: rgba(30, 20, 15, 0.65);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  padding: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.4); /* 白色边框，更粗更明显 */
  transition: all 0.3s ease;
  width: 100%; /* 确保卡片占满容器宽度 */
  max-width: 100%; /* 防止溢出 */
  box-sizing: border-box; /* 确保padding计算在宽度内 */
}

.ip-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.ip-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: 8px; /* 从10px减小到8px */
  min-width: 0; /* 允许flex子元素收缩 */
  width: 100%; /* 确保header占满宽度 */
  max-width: 100%; /* 防止溢出 */
  box-sizing: border-box; /* 确保padding计算在宽度内 */
}

.ip-address {
  font-size: 16px; /* 从18px减小到16px */
  font-weight: 600;
  color: #ffffff;
  flex: 1 1 auto; /* 允许IP地址占据剩余空间并可收缩 */
  min-width: 0; /* 允许收缩 */
  max-width: 100%; /* 防止溢出 */
  overflow: hidden; /* 隐藏溢出 */
  text-overflow: ellipsis; /* 显示省略号 */
  white-space: nowrap; /* 不换行 */
  word-break: break-all; /* 如果必须换行，允许在任意字符处断开 */
}

.ip-protocol {
  font-size: 12px; /* 从14px减小到12px */
  color: #43e97b;
  background: rgba(67, 233, 123, 0.2);
  padding: 4px 6px; /* 从8px减小到6px */
  border-radius: 4px;
  flex-shrink: 0; /* 协议标签不收缩 */
  white-space: nowrap; /* 不换行 */
  max-width: fit-content; /* 根据内容自适应宽度 */
}

.ip-card-body {
  margin-bottom: 15px;
}

.ip-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ip-info-label {
  font-size: 14px;
  color: #aaaaaa;
}

.ip-info-value {
  font-size: 14px;
  color: #ffffff;
  font-weight: 500;
}

.ip-status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.ip-status-badge.pending {
  background-color: rgba(241, 196, 15, 0.2);
  color: #f1c40f;
}

.ip-status-badge.valid {
  background-color: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
}

.ip-status-badge.invalid {
  background-color: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

.ip-card-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.ip-actions {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
}

.ip-actions .btn {
  font-size: 14px;
  padding: 8px 16px;
}

#ipInput {
  font-size: 12px !important;
  font-family: 'Courier New', monospace;
  line-height: 1.4;
  white-space: pre;
  overflow-wrap: normal;
  word-wrap: normal;
}

.proxy-container .progress-container {
    margin-top: 20px;
    text-align: center;
}

.proxy-container .progress-bar {
  width: 100%;
  height: 8px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.proxy-container .progress-fill {
  height: 100%;
  background-color: #3498db;
  transition: width 0.3s ease;
}

.proxy-container .progress-text {
  font-size: 14px;
  color: #e0e0e0;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999; /* 确保在最顶层 */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-content {
  background: #2c2c3e;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 90%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1; /* 确保内容在遮罩之上 */
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #ffffff;
}

.modal-message {
  margin-bottom: 25px;
  color: #e0e0e0;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* --- Settings Page Styles --- */

/* 设置容器 */
.settings-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  padding-bottom: 100px; /* 为底部导航栏留出空间 */
}

/* 顶部导航栏 */
.settings-container .header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  background: rgba(30, 20, 15, 0.7);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  padding: 20px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.4); /* 白色边框，更粗更明显 */
}

.settings-container .header-center {
  text-align: center;
}

.settings-container .header-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff; /* 纯白色粗体 */
  margin: 0;
}

.settings-container .header-placeholder {
  width: 32px; /* 与返回按钮宽度相同，用于平衡布局 */
}

/* 信息项 */
.settings-container .info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-container .info-item:last-child {
  border-bottom: none;
}

.settings-container .info-label {
  font-size: 16px;
  color: #aaaaaa;
  font-weight: 500;
}

.settings-container .info-value {
  font-size: 16px;
  color: #ffffff;
  font-weight: 600;
  text-align: right;
  max-width: 60%;
  word-break: break-all;
}

/* 操作按钮 */
.settings-container .actions {
  padding: 10px 0;
}

/* 模态框 */
.settings-container .modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.settings-container .modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 90%;
}

.settings-container .modal-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #2c3e50;
}

.settings-container .modal-message {
  margin-bottom: 25px;
  color: #555;
  line-height: 1.6;
}

.settings-container .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .settings-container {
    padding: 15px;
    padding-bottom: 100px; /* 为底部导航栏留出空间 */
  }
  
  .settings-container .header {
    flex-direction: row;
    gap: 15px;
  }
  
  .settings-container .header-title {
    font-size: 18px;
    position: static;
    transform: none;
    left: auto;
  }
  
  .settings-container .header-placeholder {
    width: 24px; /* 与返回按钮宽度相同，用于平衡布局 */
  }
  
  .settings-container .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  
  .settings-container .info-label {
    font-size: 14px;
  }
  
  .settings-container .info-value {
    font-size: 14px;
    text-align: left;
    max-width: 100%;
  }
  
  .settings-container .modal-content {
    padding: 20px;
  }
  
  .settings-container .modal-actions {
    flex-direction: row;
  }
  
  .settings-container .modal-actions .btn {
    width: auto;
  }
}

/* --- Ad Player Page Styles --- */

.ad-player-page {
    --color-background: #1a1a2e;
    --color-overlay: rgba(26, 26, 46, 0.90); /* 恢复原来的透明度 */
    --color-text-primary: #ffffff;
    --color-text-secondary: #e0e0e0;
    --color-accent: #3498db;
    --color-danger: #e74c3c;
    --color-danger-hover: #c0392b;
    --color-success: #52c41a;
    --color-error: #ff4d4f;
}

.ad-player-page, .ad-player-page body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--color-background);
}

/* 关键修复：覆盖 #app 的默认样式，让广告页面占满整个屏幕 */
.ad-player-page#app {
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-width: 100vw !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

.ad-player-page .ad-player-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.ad-player-page .ad-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    background-color: #000;
}

.ad-player-page .ad-background img {
    width: 100%;
    height: auto;
    min-height: 100%;
    object-fit: cover;
}

.ad-player-page .loading-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    text-align: center;
}

.ad-player-page .loading-container.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* 深色半透明背景，遮挡广告内容 */
    top: 0;
    left: 0;
    transform: none;
}

.ad-player-page .loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: ad-player-spin 1s linear infinite;
    order: 2; /* 光圈在下方 */
}

@keyframes ad-player-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ad-player-page .loading-text {
    font-size: 16px;
    color: #e0e0e0;
    text-shadow: 1px 1px 2px #000;
    font-weight: 500;
    order: 1; /* 文字在上方 */
}

/* 三个点加载动画 */
.ad-player-page .loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}

.ad-player-page .loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    animation: loading-dot-bounce 1.4s infinite ease-in-out;
}

.ad-player-page .loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.ad-player-page .loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.ad-player-page .loading-dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes loading-dot-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.ad-player-page .ip-switch-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1003;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 40px;
    border-radius: 10px;
    border: 2px solid #3498db;
}

.ad-player-page .ip-switch-container.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.ad-player-page .machine-code-text {
    font-size: 16px;
    color: #52c41a;
    text-shadow: 1px 1px 2px #000;
    font-family: monospace;
    letter-spacing: 1px;
    word-break: break-all;
    min-height: 30px;
}

.ad-player-page .ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    background-color: var(--color-overlay);
    color: var(--color-text-primary);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.ad-player-page .status-bar {
    position: fixed;
    left: 20px;
    top: 20px;
    width: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: none;
    padding: 0;
    margin: 0;
    z-index: 1000;
}

.ad-player-page .status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px 15px;
    border-radius: 6px;
    border-left: 3px solid rgba(52, 152, 219, 0.7);
    min-width: 200px;
}

.ad-player-page .status-label {
    font-size: 12px;
    color: var(--color-text-secondary);
    text-shadow: 1px 1px 2px #000;
    min-width: 70px;
}

.ad-player-page .status-value {
    font-size: 13px;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
    color: var(--color-success);
}

.ad-player-page .status-value.medium-value {
    color: #f39c12; /* Yellow/Orange for medium delay */
}

.ad-player-page .status-value.high-value {
    color: var(--color-error);
}

/* Specific colors for other status values */
.ad-player-page #currentCommission {
    color: var(--color-accent);
}
.ad-player-page #runtime {
    color: var(--color-text-primary);
}

.ad-player-page .ad-text {
    display: none;
}

.ad-player-page .bottom-bar {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    border-top: 2px solid rgba(52, 152, 219, 0.5);
}

.ad-player-page .progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ad-player-page .progress-bar {
    flex-grow: 1;
    height: 8px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.ad-player-page .progress-fill {
    height: 100%;
    background-color: var(--color-accent);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.ad-player-page .progress-text {
    font-size: 13px;
    font-weight: bold;
    min-width: 35px;
    text-align: right;
}

.ad-player-page .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.ad-player-page .stop-btn {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    background-color: #f39c12; /* Orange as requested */
    border: none;
    border-radius: 8px;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.ad-player-page .stop-btn:hover {
    background-color: #e8930c; /* Darker orange on hover */
}

/* Toast提示样式 */
.sync-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: rgba(40, 40, 60, 0.95);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-size: 14px;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 80%;
  text-align: center;
  word-wrap: break-word;
}

.sync-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sync-toast-success {
  border-left: 4px solid #2ecc71;
}

.sync-toast-error {
  border-left: 4px solid #e74c3c;
}

.sync-toast-info {
  border-left: 4px solid #3498db;
}