:root {
  color-scheme: dark;
  --bg: #05090e;
  --panel: rgba(9, 16, 24, 0.92);
  --line: #1e3342;
  --line-strong: #2d5365;
  --text: #edf6f7;
  --muted: #91a4ad;
  --cyan: #18d8f2;
  --green: #32e38a;
  --gold: #f6c54b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(24, 216, 242, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(50, 227, 138, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(24, 216, 242, 0.15), transparent 42%),
    var(--bg);
  background-size: 42px 42px, 42px 42px, auto, auto;
  color: var(--text);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", sans-serif;
}

.site-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.compact-shell {
  width: min(980px, calc(100% - 36px));
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 22px;
}

.top-nav a {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 16, 24, 0.72);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.top-nav a:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1.18fr);
  gap: 28px;
  align-items: center;
  min-height: 92vh;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 560px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: 0;
}

.lead {
  max-width: 590px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-tags span,
.note-section,
.feature-grid article,
.steps article,
.hero-shot {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.hero-tags span {
  padding: 9px 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.contact-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(9, 16, 24, 0.72);
}

.contact-card span {
  color: var(--muted);
  font-size: 13px;
}

a {
  color: var(--cyan);
  font-weight: 800;
  text-decoration: none;
}

a:hover {
  color: var(--green);
}

.hero-actions {
  margin-top: 18px;
}

.hero-actions a,
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(50, 227, 138, 0.62);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(24, 216, 242, 0.18), rgba(50, 227, 138, 0.16));
  color: var(--green);
  font-weight: 900;
  box-shadow: 0 12px 32px rgba(24, 216, 242, 0.08);
}

.hero-actions a:hover,
.download-button:hover {
  border-color: var(--green);
  color: var(--text);
}

.hero-shot {
  overflow: hidden;
  margin: 0;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.section {
  margin-top: 26px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

h2 {
  font-size: 30px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature-grid article,
.steps article {
  padding: 18px;
}

h3 {
  color: var(--text);
  font-size: 18px;
}

.feature-grid p,
.steps p,
.note-section p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

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

.steps span {
  color: var(--gold);
  font-size: 26px;
  font-weight: 900;
}

.note-section {
  padding: 22px;
  border-color: var(--line-strong);
}

.page-title {
  padding: 34px 0 18px;
}

.page-title h1 {
  max-width: 780px;
}

.blog-list {
  display: grid;
  gap: 14px;
}

.blog-card,
.post-detail,
.admin-form,
.admin-posts,
.empty-panel,
.admin-post-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.blog-card {
  padding: 20px;
}

.blog-card h2 {
  margin-top: 10px;
  font-size: 24px;
}

.blog-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.blog-meta,
.post-time {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.post-detail {
  padding: 28px;
}

.post-detail h1 {
  max-width: 860px;
  margin-top: 8px;
  font-size: clamp(32px, 4vw, 52px);
}

.post-time {
  margin-top: 16px;
}

.post-summary {
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.post-content {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: #d8e5e8;
  font-size: 16px;
  line-height: 1.85;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 16px;
}

.admin-form,
.admin-posts {
  padding: 18px;
}

.admin-form label {
  display: grid;
  gap: 8px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #071018;
  color: var(--text);
  font: inherit;
  padding: 11px 12px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(24, 216, 242, 0.12);
}

button {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(24, 216, 242, 0.12);
  color: var(--cyan);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 10px 14px;
}

button:hover {
  border-color: var(--cyan);
  background: rgba(24, 216, 242, 0.2);
}

button:active {
  transform: scale(0.98);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-message {
  margin-top: 12px;
  min-height: 22px;
  color: var(--muted);
}

.form-message[data-type="success"] {
  color: var(--green);
}

.form-message[data-type="warning"],
.form-message[data-type="error"] {
  color: var(--gold);
}

.admin-posts h2 {
  font-size: 22px;
  margin-bottom: 12px;
}

.admin-post-list {
  display: grid;
  gap: 10px;
}

.admin-post-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.admin-post-row strong,
.admin-post-row span {
  display: block;
}

.admin-post-row span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.empty-panel {
  padding: 18px;
  color: var(--muted);
}

.download-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
}

.download-panel h2 {
  font-size: 30px;
}

.download-panel p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.download-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.download-info-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.download-info-grid p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.65;
}

.hash-text {
  overflow-wrap: anywhere;
  font-family: Consolas, "Microsoft YaHei UI", monospace;
  font-size: 13px;
}

.tradingview-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.tradingview-widget-container {
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(24, 216, 242, 0.16);
  border-radius: 8px;
  background: #05090e;
}

.calendar-fallback {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.tradingview-panel.is-ready .calendar-fallback {
  display: none;
}

.news-head {
  align-items: center;
}

.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.news-filters button.active {
  border-color: var(--green);
  color: var(--green);
  background: rgba(50, 227, 138, 0.14);
}

.news-status {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.ai-analysis-panel {
  padding: 20px;
  border: 1px solid rgba(50, 227, 138, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(24, 216, 242, 0.08), rgba(50, 227, 138, 0.05)),
    var(--panel);
}

.ai-analysis-content {
  min-height: 180px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 9, 14, 0.72);
  color: #d8e5e8;
  font-size: 15px;
  line-height: 1.85;
}

.auto-refresh-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.macro-news-list {
  display: grid;
  gap: 12px;
}

.macro-news-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.macro-news-card.nfp {
  border-color: rgba(50, 227, 138, 0.34);
}

.macro-news-card.cpi {
  border-color: rgba(246, 197, 75, 0.34);
}

.macro-news-card.fed {
  border-color: rgba(24, 216, 242, 0.34);
}

.macro-news-card h2 {
  margin-top: 10px;
  font-size: 22px;
}

.original-title {
  margin-top: 8px;
  color: #7f929b;
  font-size: 13px;
  line-height: 1.5;
}

.macro-news-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.disclaimer-section {
  padding-top: 4px;
}

.disclaimer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.disclaimer-grid article {
  padding: 18px;
  border: 1px solid rgba(246, 197, 75, 0.28);
  border-radius: 8px;
  background: rgba(24, 18, 8, 0.48);
}

.disclaimer-grid h3 {
  color: var(--gold);
}

.disclaimer-grid p {
  margin-top: 10px;
  color: #c7bfa8;
  font-size: 14px;
  line-height: 1.7;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 920px) {
  .hero,
  .feature-grid,
  .steps,
  .disclaimer-grid,
  .admin-layout,
  .download-info-grid {
    grid-template-columns: 1fr;
  }

  .download-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .hero {
    min-height: auto;
    padding-top: 30px;
  }
}
