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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #f5f7fa;
  color: #2c3e50;
  line-height: 1.6;
  min-height: 100vh;
}

header {
  background: linear-gradient(135deg, #c81d25 0%, #800f15 100%);
  color: white;
  padding: 36px 16px 28px;
  box-shadow: 0 2px 12px rgba(200, 29, 37, 0.25);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
header h1 {
  font-size: 30px;
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.subtitle {
  opacity: 0.92;
  font-size: 14px;
  margin-bottom: 18px;
}
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-primary {
  background: white;
  color: #c81d25;
  border: none;
  padding: 10px 28px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}
.status {
  font-size: 13px;
  opacity: 0.95;
  min-height: 18px;
}

main {
  max-width: 1200px;
  margin: -16px auto 24px;
  padding: 0 16px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (min-width: 1024px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: white;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.card h2 {
  color: #c81d25;
  font-size: 18px;
}
.badge {
  background: #fce4e6;
  color: #c81d25;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.badge-ml {
  background: #e3f2fd;
  color: #1976d2;
}
.desc {
  color: #7f8c8d;
  font-size: 13px;
  margin-bottom: 14px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  padding: 9px 10px;
  text-align: right;
  border-bottom: 1px solid #ecf0f1;
  white-space: nowrap;
}
th {
  background: #f8f9fa;
  font-weight: 600;
  color: #34495e;
  position: sticky;
  top: 0;
}
th:nth-child(1), td:nth-child(1),
th:nth-child(2), td:nth-child(2),
th:nth-child(3), td:nth-child(3) {
  text-align: left;
}
tbody tr:hover {
  background: #fafbfc;
}
.rank {
  font-weight: 700;
  color: #c81d25;
  width: 36px;
}
.rank-1 { color: #d4af37; font-size: 16px; }
.rank-2 { color: #aaa6a6; font-size: 15px; }
.rank-3 { color: #cd7f32; font-size: 14px; }

.score-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.score-bar-bg {
  width: 60px;
  height: 6px;
  background: #ecf0f1;
  border-radius: 3px;
  overflow: hidden;
}
.score-bar {
  height: 100%;
  background: linear-gradient(90deg, #f39c12, #c81d25);
  border-radius: 3px;
}
.pos { color: #c81d25; font-weight: 600; }
.neg { color: #27ae60; font-weight: 600; }

.loading {
  text-align: center;
  padding: 40px 20px;
  color: #95a5a6;
  font-size: 14px;
}

.disclaimer {
  background: #fff8e1;
  border-left: 4px solid #f39c12;
  padding: 14px 18px;
  border-radius: 6px;
  color: #6d4c00;
  font-size: 13px;
  line-height: 1.7;
}

footer {
  text-align: center;
  padding: 20px 16px 30px;
  color: #95a5a6;
  font-size: 12px;
}
