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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
  background: #f0f2f5;
  color: #333;
  min-height: 100vh;
}

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

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

header h1 {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
}

.upload-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.upload-btn:hover {
  background: #4338ca;
}

.upload-btn:active {
  background: #3730a3;
}

.file-name {
  font-size: 14px;
  color: #888;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.stat-value {
  font-size: 36px;
  font-weight: 800;
  color: #4f46e5;
  line-height: 1.2;
}

.stat-label {
  font-size: 14px;
  color: #888;
  margin-top: 6px;
}

.charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.chart-container {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.chart-full {
  grid-column: 1 / -1;
}

.chart-container h2 {
  font-size: 17px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 16px;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.chart-full .chart-wrapper {
  max-width: 400px;
}

.chart-half .chart-wrapper {
  max-width: 100%;
}

.qq-section {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  margin-top: 20px;
}

.qq-section h2 {
  font-size: 17px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 16px;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  text-align: left;
  padding: 10px 12px;
  background: #f8f9fb;
  color: #555;
  font-weight: 600;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

tbody tr:hover {
  background: #f8f9ff;
}

tbody tr:nth-child(even) {
  background: #fafbfc;
}

tbody tr:nth-child(even):hover {
  background: #f0f1ff;
}

.userid-list {
  max-width: 320px;
  word-break: break-all;
  line-height: 1.6;
  color: #6366f1;
  font-family: "SFMono-Regular", "SF Mono", Menlo, monospace;
  font-size: 13px;
}


@media (max-width: 700px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

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

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