
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top, #e6f0ff 0, #f5f7fb 45%, #ffffff 100%);
  color: #111827;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-header {
  padding: 12px 20px;
  background: rgba(255,255,255,0.9);
  border-bottom: 1px solid rgba(148,163,184,0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(15, 60, 160, 0.12);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(145deg, #2563eb, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.6);
}
.brand-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}
.brand-sub {
  font-size: 12px;
  color: #6b7280;
}
.tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(37,99,235,0.8);
  background: rgba(59,130,246,0.08);
  color: #1d4ed8;
}
.site-main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 16px 24px;
}
.site-footer {
  padding: 8px 20px 12px;
  text-align: center;
  font-size: 11px;
  color: #9ca3af;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.panel {
  background: rgba(255,255,255,0.98);
  border-radius: 16px;
  padding: 14px 16px 16px;
  box-shadow: 0 18px 40px rgba(15, 60, 160, 0.08);
  border: 1px solid rgba(148,163,184,0.4);
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 10px;
}
.panel-header h2 {
  font-size: 16px;
  font-weight: 700;
}
.panel-sub {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}
.pill {
  padding: 3px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  border: 1px solid rgba(37,99,235,0.6);
}
.stats-link {
  font-size: 12px;
  color: #4f46e5;
  text-decoration: none;
}
.stats-link:hover {
  text-decoration: underline;
}

.image-frame {
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.8);
  overflow: hidden;
  background: #020617;
  position: relative;
}
.image-frame img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}
.image-overlay {
  position: absolute;
  bottom: 6px;
  right: 8px;
  background: rgba(15,23,42,0.78);
  color: #e5e7eb;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34,197,94,0.9);
}

.controls {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
button {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-outline {
  background: #ffffff;
  color: #374151;
  border-color: #d1d5db;
}
.btn-outline:hover {
  background: #eef2ff;
  border-color: #4f46e5;
}
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 8px 18px rgba(37,99,235,0.5);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #4338ca);
  box-shadow: 0 10px 24px rgba(37,99,235,0.65);
}

.case-info {
  font-size: 12px;
  color: #6b7280;
}

.result-card {
  background: radial-gradient(circle at top left, #1d2540 0, #020617 50%);
  border-radius: 12px;
  padding: 10px 12px;
  color: #e5e7eb;
  margin-bottom: 10px;
  border: 1px solid rgba(148,163,184,0.5);
}
.risk-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 6px;
}
.risk-badge {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.8);
  font-size: 11px;
}
.risk-stars {
  color: #facc15;
  font-size: 12px;
}
.headline {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 3px;
}
.subheadline {
  font-size: 12px;
  color: #cbd5f5;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
}
.info-label {
  font-size: 11px;
  color: #9ca3af;
}
.info-value {
  font-size: 12px;
}
.timeline {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(148,163,184,0.8);
  font-size: 11px;
  color: #d1d5db;
}

.rules {
  font-size: 12px;
  margin-top: 8px;
  border-radius: 10px;
  border: 1px dashed rgba(148,163,184,0.9);
  padding: 8px 10px;
  background: rgba(249,250,251,0.9);
  color: #374151;
}
.rules b {
  font-size: 12px;
  color: #111827;
}
.rules ul {
  margin-top: 4px;
  padding-left: 16px;
}

.ai-explain {
  margin-top: 10px;
  font-size: 12px;
  border-radius: 10px;
  background: #fefce8;
  border: 1px solid #facc15;
  padding: 8px 10px;
  color: #713f12;
}
.ai-explain-title {
  font-weight: 600;
  margin-bottom: 4px;
}
.ai-explain-text {
  white-space: pre-wrap;
}

.stats-table-wrapper {
  margin-top: 10px;
}
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.stats-table th,
.stats-table td {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  text-align: left;
}
.stats-table thead {
  background: #eff6ff;
}
.stats-table tbody tr:nth-child(even) {
  background: #f9fafb;
}
.stats-table .empty {
  text-align: center;
  color: #6b7280;
}
.note {
  margin-top: 6px;
  font-size: 11px;
  color: #6b7280;
}
