/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f6fa;
  color: #333;
  line-height: 1.6;
  padding-top: 60px; /* 为导航栏留出空间 */
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.nav-logo {
  font-size: 24px;
  font-weight: bold;
  color: #4a90e2;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin-left: 20px;
}

.nav-link {
  text-decoration: none;
  color: #666;
  font-size: 16px;
  font-weight: 500;
  padding: 10px 15px;
  border-radius: 6px;
  transition: all 0.3s;
}

.nav-link:hover {
  color: #4a90e2;
  background: #f5f7fa;
}

.nav-link.active {
  color: #4a90e2;
  background: #f5f7fa;
}

/* 用户信息样式 */
.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-info span {
  color: #666;
  font-size: 14px;
}

.user-info a {
  text-decoration: none;
  color: #4a90e2;
  font-size: 14px;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.3s;
}

.user-info a:hover {
  background: #f5f7fa;
}

/* 容器样式 */
.container {
  max-width: 95vw; /* 占屏幕宽度的95% */
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  width: 100%;
}

/* 表格样式 */
.table-header {
  display: flex;
  padding: 10px;
  background: #6e7e8d;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
}

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

/* 颜色样式 */
.bullish {
  color: #ff4d4f;
}

.bearish {
  color: #52c41a;
}

/* 隔行变色 */
.tr:nth-child(even) {
  background: #fafbfc;
}

.tr:hover {
  background: #f5f7fa;
}

.tr .td {
  display: flex;
  justify-content: center;
  align-items: center;
}

.tr .td.name {
  flex: 1.2;
}

.tr .td.time {
  flex: 1;
}

.tr .td.contract {
  flex: 3;
}

.tr .td.amount {
  flex: 0.8;
}

.tr .td.price {
  flex: 0.8;
}

.tr .td.volume {
  flex: 0.8;
}

.tr .td.direction {
  flex: 0.8;
}

/* 空状态样式 */
.no-data {
  text-align: center;
  padding: 40px;
  color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 2px;
  }
  
  .table-header {
    font-size: 12px;
  }
  
  .header-item {
    padding: 8px;
  }
}