/* 主页样式文件 */
/* 包含主页特有的样式 */

/* 主页容器 */
.main-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 15px;
  padding-bottom: 80px; /* 为底部导航栏留出空间 */
  position: relative; /* 移除fixed定位，让内容正常流动 */
  box-sizing: border-box;
}

/* 主题切换按钮容器 */
.theme-toggle-container {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 15px;
  padding: 0 15px;
}

/* 主题切换按钮 */
.theme-toggle-btn {
  background: rgba(30, 20, 15, 0.65); /* 深棕色系，与卡片一致 */
  border: 2px solid rgba(255, 255, 255, 0.4); /* 白色边框 */
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.9);
  padding: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theme-toggle-btn:hover {
  background: rgba(30, 20, 15, 0.8);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.theme-toggle-btn svg {
  width: 22px;
  height: 22px;
}

/* 顶部导航栏 */
.header {
  background: rgba(30, 20, 15, 0.7); /* 深棕色系，与橙色背景协调 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  padding: 60px 24px; /* 保持原有padding */
  min-height: 180px; /* 设置最小高度，增加50%（原来约120px，现在180px） */
  margin-bottom: 20px;
  border-radius: 12px;
  display: flex;
  justify-content: center; /* 居中显示 */
  align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.4); /* 白色边框，更粗更明显 */
  text-align: center; /* 文字居中 */
}

.header-title {
  font-size: 32px; /* 增大字体 */
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  text-align: center; /* 文字居中 */
}

.header-subtitle {
  font-size: 16px; /* 稍微增大副标题 */
  color: #aaaaaa;
  font-weight: 500;
  margin-top: 8px; /* 增加间距 */
}

.logout-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.logout-btn:hover {
  background: linear-gradient(135deg, #ff5b5b 0%, #ff7e43 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

/* 登录容器 */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
}

.login-card {
  width: 100%;
  max-width: 400px;
}

/* 滚动公告栏 */
.announcement-banner {
  background: rgba(30, 20, 15, 0.65); /* 深棕色系，与橙色背景协调 */
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  padding: 16px 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.4); /* 白色边框，更粗更明显 */
  display: flex;
  align-items: center;
}

.announcement-icon {
  font-size: 20px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.announcement-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(20deg); /* 淡金色，与主题协调 */
}

.announcement-content {
  flex: 1;
  font-size: 14px;
  color: #dddddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 统计卡片容器 */
.stats-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

/* 统计卡片 */
.stat-card {
  background: rgba(30, 20, 15, 0.65); /* 深棕色系，与橙色背景协调 */
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.4); /* 白色边框，更粗更明显 */
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.stat-title {
  font-size: 16px;
  color: #aaaaaa;
  margin-bottom: 12px;
  font-weight: 500;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
}

.stat-value.success {
  color: #43e97b;
}

/* 任务控制面板 */
.task-panel {
  background: rgba(30, 20, 15, 0.65); /* 深棕色系，与橙色背景协调 */
  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); /* 白色边框，更粗更明显 */
}

/* 开始任务按钮 */
.start-task-container {
  text-align: center;
  margin-bottom: 20px;
}

.start-task-btn {
  background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%); /* 橙色渐变，与背景协调 */
  color: white;
  border: none;
  padding: 18px 48px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 12px; /* 与卡片圆角一致 */
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(255, 140, 66, 0.4);
}

.start-task-btn:hover {
  background: linear-gradient(135deg, #ff7a2e 0%, #ff5a1f 100%); /* 更深的橙色 */
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(255, 140, 66, 0.5);
}

.start-task-btn.disabled {
  background: linear-gradient(135deg, #555555 0%, #777777 100%);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 任务状态 */
.task-status {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: nowrap;
  gap: 20px;
}

.status-item {
  text-align: center;
  flex: 1;
}

.status-label {
  font-size: 14px;
  color: #aaaaaa;
  margin-bottom: 8px;
  font-weight: 500;
}

.status-value {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.status-value.success {
  color: #2ecc71; /* 绿色 - 可運行 */
}

.status-value.danger {
  color: #e74c3c; /* 红色 - 不可運行 */
}

.status-value.running {
  color: #3498db; /* 蓝色 - 運行中 */
}

/* 底部导航栏 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(30, 20, 15, 0.85); /* 深棕色系，与橙色背景协调 */
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.3); /* 白色边框 */
  z-index: 1000;
}

.nav-item {
  text-align: center;
  color: rgba(255, 255, 255, 0.7); /* 白色半透明，更协调 */
  text-decoration: none;
  font-size: 12px;
  transition: all 0.3s ease;
}

.nav-item.active {
  color: rgba(255, 200, 100, 1); /* 淡金色激活状态，与橙色背景呼应 */
}

.nav-item:hover {
  color: rgba(255, 255, 255, 0.9);
}

.nav-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .main-container {
    padding: 12px;
    padding-bottom: 100px;
  }
  
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .stat-card {
    padding: 16px;
    border-radius: 10px;
  }
  
  .stat-title {
    font-size: 14px;
  }
  
  .stat-value {
    font-size: 20px;
  }
  
  .task-status {
    flex-direction: row;
    gap: 15px;
  }
  
  .theme-toggle-container {
    padding: 0 12px;
    margin-bottom: 12px;
  }
  
  .theme-toggle-btn {
    width: 40px;
    height: 40px;
  }
  
  .theme-toggle-btn svg {
    width: 20px;
    height: 20px;
  }
  
  .header {
    padding: 30px 20px; /* 保持原有padding */
    min-height: 135px; /* 移动端设置最小高度，增加50%（原来约90px，现在135px） */
    border-radius: 10px;
  }
  
  .header-title {
    font-size: 20px;
  }
  
  .header-subtitle {
    font-size: 12px;
  }
  
  .logout-btn {
    padding: 8px 15px;
    border-radius: 6px;
  }
  
  .status-label {
    font-size: 12px;
  }
  
  .status-value {
    font-size: 16px;
  }
  
  .login-container {
    padding: 15px;
  }
  
  .login-card {
    max-width: 100%;
  }
}

/* 遮罩层 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9998;
  display: none;
}

/* 广告播放弹窗 */
.ad-player-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  height: 80%;
  background: rgba(30, 30, 46, 0.95);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

/* 广告播放内容 */
.ad-player-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 顶部状态栏 */
.status-bar {
  display: flex;
  justify-content: space-around;
  padding: 15px;
  background: rgba(40, 40, 60, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: 10px;
}

.status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.status-label {
  font-size: 12px;
  color: #aaaaaa;
  margin-bottom: 5px;
  font-weight: 500;
}

.status-value {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

/* 广告内容区域 */
.ad-content-area {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.ad-placeholder {
  width: 100%;
  height: 100%;
  background: rgba(40, 40, 60, 0.8);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ad-image {
  width: 80%;
  height: 60%;
  background: rgba(50, 50, 70, 0.8);
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #888888;
  font-size: 18px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ad-text {
  font-size: 18px;
  color: #e0e0e0;
  font-weight: 500;
}

/* 底部栏 */
.bottom-bar {
  padding: 20px;
  background: rgba(40, 40, 60, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 进度条容器 */
.progress-container {
  margin-bottom: 20px;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(50, 50, 70, 0.8);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

/* 停止按钮 */
.stop-btn {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  font-weight: 700;
}
/* 公告网址样式 */
.announcement-url {
  color: #FFD700;  /* 浅黄色 */
  font-weight: bold;
}