/* 全局样式 */
:root {
  --primary-color: #4CAF50;
  --primary-light: #81C784;
  --primary-dark: #388E3C;
  --secondary-color: #2196F3;
  --accent-color: #FF9800;
  --warning-color: #FFC107;
  --danger-color: #F44336;
  --success-color: #4CAF50;
  --info-color: #2196F3;
  --light-color: #f5f5f5;
  --dark-color: #0a1929;
  --darker-color: #081424;
  --text-color: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #999999;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-sm: 4px;
  --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --box-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Microsoft YaHei', '微软雅黑', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--dark-color);
  overflow: hidden;
  font-size: 14px;
}

#app {
  height: 100vh;
  background: linear-gradient(135deg, #0c2d48, #145da0);
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* 通用标题样式 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5em;
  color: var(--text-color);
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 20px;
}

h4 {
  font-size: 18px;
}

/* 通用按钮样式 */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

.btn-primary {
  background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
  color: white;
  font-weight: bold;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(45deg, var(--primary-dark), #2E7D32);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

.btn-secondary {
  background: linear-gradient(45deg, var(--secondary-color), #1976D2);
  color: white;
  border: none;
}

.btn-secondary:hover {
  background: linear-gradient(45deg, #1976D2, #1565C0);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

.btn-success {
  background: linear-gradient(45deg, var(--success-color), #388E3C);
  color: white;
  border: none;
}

.btn-success:hover {
  background: linear-gradient(45deg, #388E3C, #2E7D32);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

.btn-warning {
  background: linear-gradient(45deg, var(--warning-color), #FFA000);
  color: white;
  border: none;
}

.btn-warning:hover {
  background: linear-gradient(45deg, #FFA000, #FF8F00);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

.btn-danger {
  background: linear-gradient(45deg, var(--danger-color), #D32F2F);
  color: white;
  border: none;
}

.btn-danger:hover {
  background: linear-gradient(45deg, #D32F2F, #C62828);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

/* 卡片样式 */
.card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-lg);
}

.card-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--text-color);
}

.card-body {
  padding: 20px;
}

/* 表格样式 */
.table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.table th,
.table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table th {
  background: rgba(76, 175, 80, 0.2);
  font-weight: 600;
  color: var(--text-color);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover {
  background: rgba(76, 175, 80, 0.1);
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(76, 175, 80, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(76, 175, 80, 0.8);
}

/* 加载指示器 */
.loading-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: var(--text-secondary);
  font-size: 16px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(76, 175, 80, 0.3);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 错误消息 */
.error-message {
  padding: 20px;
  text-align: center;
  color: var(--danger-color);
  background: rgba(244, 67, 54, 0.1);
  border-radius: var(--border-radius);
  border: 1px solid rgba(244, 67, 54, 0.3);
}

/* DataV组件样式覆盖 */
.dv-border-box-content {
  padding: 15px;
}

.dv-scroll-board .header {
  color: #4CAF50 !important;
  background: rgba(76, 175, 80, 0.1) !important;
  font-weight: 600 !important;
}

.dv-scroll-board .row {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.05) !important;
  transition: var(--transition);
}

.dv-scroll-board .row:hover {
  background: rgba(76, 175, 80, 0.2) !important;
}

/* 图表容器 */
.chart-container {
  width: 100%;
  height: 100%;
  position: relative;
}

/* 响应式网格 */
.grid-container {
  display: grid;
  gap: 20px;
  height: 100%;
}

.grid-col-1 {
  grid-template-columns: 1fr;
}

.grid-col-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-col-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-col-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* 装饰元素 */
.decoration-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  margin: 15px 0;
}

.decoration-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--primary-color);
}

.decoration-corner.tl {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.decoration-corner.tr {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
}

.decoration-corner.bl {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
}

.decoration-corner.br {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

/* 媒体查询 */
@media (max-width: 1200px) {
  .grid-col-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-col-2,
  .grid-col-3,
  .grid-col-4 {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 24px;
  }
  
  h2 {
    font-size: 20px;
  }
  
  h3 {
    font-size: 18px;
  }
  
  body {
    font-size: 12px;
  }
}