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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f6f7;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 24px;
}

header h1 {
  font-size: 28px;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.subtitle {
  color: #666;
  font-size: 14px;
}

.update-time {
  margin-top: 10px;
  font-size: 13px;
  color: #999;
}

.indices-bar {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin-bottom: 20px;
  padding-bottom: 8px;
}

.index-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px 18px;
  min-width: 140px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  text-align: center;
  flex-shrink: 0;
}

.index-card .name {
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
}

.index-card .value {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.index-card .change {
  font-size: 13px;
  font-weight: 500;
}

.up { color: #e74c3c; }
.down { color: #27ae60; }
.neutral { color: #666; }

.controls {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.controls input, .controls select {
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
}

.controls input {
  flex: 1;
  min-width: 200px;
}

.controls button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.controls button:hover {
  background: #1d4ed8;
}

.fund-table-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow-x: auto;
}

.fund-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.fund-table th {
  background: #f8f9fa;
  padding: 12px 10px;
  text-align: center;
  font-weight: 600;
  color: #444;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}

.fund-table td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}

.fund-table tbody tr:hover {
  background: #f8f9ff;
}

.fund-name {
  text-align: left !important;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fund-code {
  font-family: "SF Mono", Monaco, monospace;
  font-size: 12px;
  color: #666;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  background: #eef2ff;
  color: #4f46e5;
}

.loading-cell {
  padding: 40px !important;
  color: #999;
  text-align: center !important;
}

footer {
  text-align: center;
  margin-top: 30px;
  padding: 20px;
  color: #999;
  font-size: 12px;
}

@media (max-width: 768px) {
  .container { padding: 12px; }
  header h1 { font-size: 22px; }
  .fund-table { font-size: 12px; }
  .fund-table th, .fund-table td { padding: 8px 6px; }
  .controls input { min-width: 140px; }
}
