/* styles.css */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  height: 100vh;
  background-color: #f5f5f5;
}

.container {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 导航栏 */
.navbar {
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 50px;
  background: linear-gradient(135deg, #D32F2F, #E53935);
  color: white;
  font-size: 18px;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
  z-index: 100;
}

.navbar-back {
  position: absolute;
  left: 20px;
  font-size: 16px;
  cursor: pointer;
}

.navbar-title {
  flex: 1;
  text-align: center;
}

/* 页面内容 */
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

/* 主页样式 */
.container {
  min-height: 100vh;
  background: linear-gradient(180deg, #D32F2F 0%, #F5F5F5 100px);
  padding: 0;
}

/* 登录弹窗 */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.login-modal-content {
  width: 80%;
  background: #FFFFFF;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  position: relative;
}

.login-modal-header {
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-modal-title {
  font-size: 18px;
  font-weight: bold;
  color: #333333;
  flex: 1;
  text-align: center;
}

/* 关闭按钮 */
.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #999999;
  cursor: pointer;
}

.close-btn:active {
  color: #666666;
}

.login-modal-body {
  margin-bottom: 20px;
}

.login-modal-desc {
  font-size: 14px;
  color: #666666;
  display: block;
  margin-bottom: 20px;
}

/* 输入区域 */
.input-section {
  margin-bottom: 15px;
}

.input-wrapper {
  background: #F8F8F8;
  border-radius: 25px;
  padding: 0 15px;
  border: 1px solid #EEEEEE;
}

.text-input {
  height: 40px;
  font-size: 14px;
  color: #333333;
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  box-sizing: border-box;
}

.text-input::placeholder {
  color: #CCCCCC;
}

/* 登录按钮 */
.login-btn {
  width: 100%;
  background: linear-gradient(135deg, #D32F2F, #E53935);
  color: #FFFFFF;
  border: none;
  border-radius: 25px;
  padding: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 10px;
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-btn:active:not(:disabled) {
  opacity: 0.8;
}

/* 注册区域 */
.register-section {
  margin-top: 15px;
  text-align: center;
}

.register-text {
  font-size: 14px;
  color: #999999;
  margin-right: 5px;
}

.register-link {
  background: none;
  border: none;
  color: #D32F2F;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: underline;
}

.register-link:active {
  opacity: 0.8;
}

/* 注册弹窗 */
.register-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.register-modal-content {
  width: 80%;
  background: #FFFFFF;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  position: relative;
}

.register-modal-header {
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.register-modal-title {
  font-size: 18px;
  font-weight: bold;
  color: #333333;
  flex: 1;
  text-align: center;
}

.register-modal-body {
  margin-bottom: 10px;
}

.register-desc {
  font-size: 16px;
  color: #333333;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* 客服信息区域 */
.kefu-info {
  margin-bottom: 20px;
}

.kefu-label {
  font-size: 16px;
  color: #333333;
  font-weight: bold;
}

.kefu-id-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.kefu-id {
  font-size: 18px;
  color: #D32F2F;
  font-weight: bold;
  margin-right: 10px;
}

.copy-btn {
  background: linear-gradient(135deg, #D32F2F, #E53935);
  color: #FFFFFF;
  border: none;
  border-radius: 25px;
  padding: 5px 15px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

.copy-btn:active {
  opacity: 0.8;
}

.kefu-qrcode {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qrcode-image {
  width: 150px;
  height: 150px;
  margin-bottom: 15px;
  border: 1px solid #EEEEEE;
  border-radius: 10px;
}

.save-btn {
  background: linear-gradient(135deg, #D32F2F, #E53935);
  color: #FFFFFF;
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.save-btn:active {
  opacity: 0.8;
}

/* 淡化按钮样式 */
.subtle-btn {
  background: linear-gradient(135deg, #F5F5F5, #EEEEEE);
  color: #666666;
  border: 1px solid #DDDDDD;
  cursor: pointer;
}

.subtle-btn:active {
  opacity: 0.8;
}

/* 顶部标题区 */
.header {
  padding: 30px 20px 10px;
  text-align: center;
  color: #FFFFFF;
}

.header-content {
  margin-bottom: 30px;
}

.header .title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.header .subtitle {
  font-size: 14px;
  opacity: 0.9;
}

/* 副标题 */
.subtitle {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin-bottom: 15px;
  padding: 0 20px;
}

/* 股票标题区域 */
.stock-name-title {
  margin-right: 10px;
}

.stock-total-position {
  float: right;
  color: #333333 !important; /* 红色 */
  font-weight: bold;
}

/* 股票标题区域 */
.stock-name-title {
  margin-right: 10px;
}

/* 用户信息区 */
.user-info-section {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.user-card {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  border-radius: 10px;
  padding: 5px 15px;
  margin: 15px auto;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-details {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 1;
}

.user-nickname {
  font-size: 16px;
  font-weight: 600;
  color: #000000;
  margin-right: 15px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.user-status {
  font-size: 13px;
  color: #D32F2F;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: 600;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 分区标题 */
.section {
  padding: 0 15px;
  margin-bottom: 20px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  padding: 0 10px;
}

.title-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #E0E0E0, transparent);
}

.title-text {
  padding: 0 10px;
  font-size: 16px;
  font-weight: bold;
  color: #333333;
}

.vip-title {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 功能列表 */
.feature-list {
  background: #FFFFFF;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(211, 47, 47, 0.1);
}

.feature-item {
  display: flex;
  align-items: center;
  padding: 18px 16px;
  border-bottom: 1px solid #F5F5F5;
  transition: background-color 0.3s;
  position: relative;
  cursor: pointer;
}

.feature-item:last-child {
  border-bottom: none;
}

.feature-item:hover {
  background-color: #FFF8F8;
}

.feature-icon {
  font-size: 28px;
  margin-right: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FFE5E5, #FFF0F0);
  border-radius: 8px;
}

.feature-content {
  flex: 1;
}

.feature-name {
  font-size: 16px;
  font-weight: bold;
  color: #333333;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
}

.feature-desc {
  font-size: 13px;
  color: #999999;
}

.feature-arrow {
  font-size: 24px;
  color: #CCCCCC;
  margin-left: 8px;
}

/* VIP功能项 */
.vip-item .feature-icon {
  background: linear-gradient(135deg, #FFF9E5, #FFFAED);
}

.vip-item.locked {
  opacity: 0.6;
}

.lock-icon {
  position: absolute;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  font-size: 16px;
}

/* VIP标签 */
.vip-tag {
  display: inline-block;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #333;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: bold;
  margin-left: 6px;
  vertical-align: middle;
}

/* 授权区域 */
.auth-section {
  margin-top: 20px;
}

.auth-desc {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: #999999;
}

/* 退出登录按钮 */
.logout-btn {
  font-size: 13px;
  color: #FFFFFF;
  background: linear-gradient(135deg, #D32F2F, #E53935);
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 600;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  border: none;
  margin-left: 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
  transition: all 0.3s ease;
}

.logout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
}

.logout-btn:active {
  transform: translateY(0);
  opacity: 0.9;
}

/* 客服弹窗 */
.kefu-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.kefu-modal-content {
  width: 80%;
  background: #FFFFFF;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  position: relative;
}

.kefu-modal-header {
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kefu-modal-title {
  font-size: 18px;
  font-weight: bold;
  color: #333333;
  flex: 1;
  text-align: center;
}

.kefu-modal-body {
  margin-bottom: 10px;
}

/* Toast 样式 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  z-index: 10000;
  font-size: 14px;
  display: none;
}

/* 底部说明 */
.footer {
  padding: 20px 20px 10px;
  text-align: center;
}

.footer-text {
  font-size: 12px;
  color: #999999;
}

/* 日期和统计容器 */
.date-stats-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

/* 龙虎榜页面样式 */
.date-selector {
  display: flex;
  align-items: center;
  padding-bottom: 10px;
}

.date-label {
  font-size: 14px;
  color: #333333;
  font-weight: bold;
  margin-right: 10px;
  white-space: nowrap;
}

.picker-value {
  font-size: 14px;
  color: #D32F2F;
  font-weight: bold;
  background: #F8F8F8;
  border: 1px solid #EEEEEE;
  border-radius: 6px;
  padding: 6px 25px 6px 10px;
  appearance: none;
  outline: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D32F2F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/Polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
  min-width: 100px;
  max-width: 120px;
}

.picker-value:focus {
  border-color: #D32F2F;
  box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.2);
}

/* 涨停家数统计 */
.ztb-count {
  display: flex;
  align-items: center;
}

.count-label {
  font-size: 14px;
  color: #333333;
  font-weight: bold;
  margin-right: 5px;
  white-space: nowrap;
}

.count-value {
  font-size: 16px;
  font-weight: bold;
  color: #D32F2F;
}

/* 加载状态 */
.loading {
  padding: 50px 0;
  text-align: center;
  color: #999999;
  font-size: 14px;
}

/* 龙虎榜列表 */
.longhu-list {
  padding-bottom: 10px;
}

/* 游资区块 */
.youzi-section {
  margin-bottom: 15px;
}

.youzi-name {
  font-size: 16px;
  font-weight: bold;
  color: #FFFFFF;
  padding: 10px 10px 8px;
  background: linear-gradient(135deg, #aa4400, #ffffff);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 1px 6px rgba(211, 47, 47, 0.3);
  overflow: hidden; /* 清除浮动 */
}

/* 股票列表 */
.stock-list {
  background: #FFFFFF;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.stock-item {
  border-bottom: 1px dashed #CCCCCC; /* 虚线分隔线 */
  padding: 10px 0;
}

.stock-item:last-child {
  border-bottom: none;
}

.stock-info {
  display: flex;
  align-items: center;
  padding: 0 10px;
  white-space: nowrap;
}

/* 股票列 */
.stock-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-right: 10px;
}

/* 交易列 */
.trade-column {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* 统一的文本样式 */
.stock-text {
  font-size: 15px;
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
}

.name-buy {
  color: #F44336; /* 净买入时为红色 */
}

.name-sell {
  color: #4CAF50; /* 净卖出时为绿色 */
}

/* 空状态 */
.empty-container {
  padding: 75px 0;
  text-align: center;
}

.empty-icon {
  font-size: 60px;
  margin-bottom: 10px;
}

.empty-text {
  font-size: 14px;
  color: #999999;
}

/* TAB切换样式 */
.tab-container {
  background: #FFFFFF;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(211, 47, 47, 0.1);
}

.tab-bar {
  display: flex;
  border-bottom: 1px solid #F5F5F5;
  background-color: #fff; /* 为TAB标题添加背景颜色 */
  border-bottom: 1px solid #aa4400;
}


.tab-item {
  flex: 1;
  text-align: center;
  padding: 5px 0;
  font-size: 16px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: all 0.3s;
  background-color: #f8f8f8; /* 默认背景色 */
}

.tab-item.active {
  color: #fff;
  background-color: #aa4400; /* 激活状态背景色 */
}

.tab-content {
  display: none;
  padding: 10px;
}

.tab-content.active {
  display: block;
}

/* 更新时间 */
.update-time {
  text-align: center;
  font-size: 14px;
  color: #999999;
  padding: 5px 0;
  border-bottom: 1px solid #F5F5F5;
  margin-bottom: 10px;
}

/* 资金列表样式 */
.fund-list {
  padding: 0 0;
}

.fund-item {
  display: flex;
  align-items: center;
  padding: 15px 10px;
  border-bottom: 1px solid #F5F5F5;
}

.fund-item:last-child {
  border-bottom: none;
}

.fund-rank {
  font-size: 18px;
  font-weight: bold;
  color: #999999;
  width: 30px;
  margin-right: 10px;
}

.fund-info {
  flex: 1;
}

.fund-name {
  font-size: 16px;
  font-weight: bold;
  color: #333333;
  margin-bottom: 5px;
}

.fund-meta {
  display: flex;
  align-items: center;
}

.fund-price {
  font-size: 14px;
  color: #999999;
  margin-right: 10px;
}

.fund-change {
  font-size: 14px;
  font-weight: bold;
}

.fund-change.inflow {
  color: #F44336;
}

.fund-change.outflow {
  color: #4CAF50;
}

.fund-amount {
  font-size: 16px;
  font-weight: bold;
  text-align: right;
}

.fund-amount.inflow {
  color: #F44336;
}

.fund-amount.outflow {
  color: #4CAF50;
}

/* 时间限制提示 */
.time-tip {
  padding: 150px 40px;
  text-align: center;
}

.tip-icon {
  font-size: 60px;
  margin-bottom: 30px;
}

.tip-text {
  font-size: 16px;
  color: #666666;
  line-height: 1.6;
}

/* 内容区 */
.content {
  padding: 10px;
}

/* 涨停板列表 */
.ztb-list {
  padding-bottom: 10px;
}

.ztb-item {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  /* 添加虚线分隔线 */
  border-bottom: 1px dashed #CCCCCC;
}

.ztb-item:last-child {
  border-bottom: none;
}

.ztb-item:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(211, 47, 47, 0.2);
}

/* 项目头部 */
.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F0F0F0;
}

.left-info {
  display: flex;
  align-items: center;
  flex: 1;
}

.rank {
  font-size: 16px;
  font-weight: bold;
  color: #666666;
  margin-right: 8px;
  min-width: 25px;
}

.rank.top-rank {
  color: #D32F2F;
  font-size: 18px;
}

.stock-name {
  font-size: 16px;
  font-weight: bold;
  color: #333333;
  margin-right: 6px;
}

.zt-badge {
  background: linear-gradient(135deg, #F44336, #E53935);
  color: #FFFFFF;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: bold;
}

.close-price {
  font-size: 14px;
  font-weight: bold;
}

/* 项目内容 */
.item-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-row {
  display: flex;
  align-items: center;
  font-size: 13px;
}

.label {
  color: #999999;
  margin-right: 4px;
  min-width: 50px;
}

.value {
  color: #333333;
  flex: 1;
}

.concept {
  color: #D32F2F;
  font-weight: 500;
}