:root {
  --bg: #050816;
  --bg-elevated: #0b1020;
  --bg-panel: #0f172a;
  --border-subtle: rgba(148, 163, 184, 0.4);
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.16);
  --accent-strong: rgba(56, 189, 248, 0.3);
  --danger: #fb7185;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.85);
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #1d273b 0, #020617 42%, #000 100%);
  color: var(--text);
}

.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 32px 24px;
  gap: 20px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.7));
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
}

.header-left {
  display: flex;
  flex-direction: column;
}

.app-title {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  background: radial-gradient(circle at top left, #38bdf8, #0ea5e9);
  color: #0b1120;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(56, 189, 248, 0.38);
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, filter 0.08s ease-out;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(56, 189, 248, 0.45);
  filter: brightness(1.05);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 10px 24px rgba(56, 189, 248, 0.3);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel {
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(30, 64, 175, 0.4);
  box-shadow: var(--shadow-soft);
  padding: 16px 18px 18px;
}

.panel-header h2 {
  margin: 0 0 4px;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.panel-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-headline {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.summary-highlight {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  padding: 10px 12px;
  border-radius: 14px;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7));
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.metric-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.metric-value {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 600;
}

.panel-main {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 16px;
}

.panel-left {
  display: flex;
  flex-direction: column;
}

.timeline {
  margin-top: 6px;
  padding-left: 6px;
  border-left: 1px solid rgba(51, 65, 85, 0.8);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-item {
  position: relative;
  padding-left: 14px;
}

.timeline-dot {
  position: absolute;
  left: -7px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #38bdf8, #0ea5e9);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

.timeline-content {
  border-radius: 14px;
  padding: 10px 12px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(51, 65, 85, 0.9);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
}

.timeline-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.timeline-summary {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-type {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-source {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
}

.timeline-time,
.timeline-location,
.news-time {
  font-size: 11px;
  color: var(--text-muted);
}

.panel-right {
  display: flex;
  flex-direction: column;
}

.news-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
}

.news-item {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(30, 64, 175, 0.6);
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.news-title {
  margin: 0;
  font-size: 13px;
}

.panel-bottom {
  display: flex;
  flex-direction: column;
}

.regions-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.region-card {
  border-radius: 14px;
  padding: 10px 12px;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.region-name {
  font-size: 13px;
  font-weight: 500;
}

.region-level {
  margin-top: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.level-高风险 {
  color: #fecaca;
}

.level-中风险 {
  color: #fbbf24;
}

.level-关注 {
  color: #a5b4fc;
}

.footer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding-top: 4px;
}

@media (max-width: 960px) {
  .layout {
    padding: 12px 12px 16px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    border-radius: 20px;
  }

  .panel-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .metrics-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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