:root {
  --bg: #f0f4f8;
  --card: #fff;
  --text: #1e293b;
  --muted: #64748b;
  --blue: #5b9fed;
  --blue-dark: #3b82f6;
  --green: #22c55e;
  --orange: #f97316;
  --red: #ef4444;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(180deg, #eef4fb 0%, var(--bg) 120px, var(--bg) 100%);
  color: var(--text);
  line-height: 1.5;
}

#app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 24px 56px;
}

.hidden {
  display: none !important;
}

/* 站点标题 */
.site-header {
  text-align: center;
  margin-bottom: 20px;
}

.site-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 0;
  padding: 0;
  font-weight: inherit;
  font-size: inherit;
  line-height: 1.2;
}

.site-title-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.site-title-name {
  font-size: 28px;
  font-weight: 800;
  color: var(--blue-dark);
  letter-spacing: 0.02em;
}

.site-title-sub {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

/* notice banner */
.notice-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: linear-gradient(90deg, #5b9fed, #7cb3f5);
  color: #fff;
  overflow: hidden;
}

.notice-label {
  color: #fde047;
  font-weight: 700;
  white-space: nowrap;
}

.notice-scroll {
  flex: 1;
  overflow: hidden;
}

.notice-content {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* hero */
.hero {
  text-align: center;
  margin-bottom: 24px;
}

.hero-line1 {
  display: block;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 300;
  color: #7cb3f5;
  letter-spacing: 2px;
}

.hero-line2 {
  display: block;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
  color: #0f172a;
  margin-top: 4px;
}

.hero-desc {
  margin: 16px auto 20px;
  max-width: 560px;
  font-size: 15px;
  color: var(--muted);
}

.hero-desc mark {
  background: rgba(91, 159, 237, 0.2);
  color: var(--blue-dark);
  padding: 0 4px;
  border-radius: 4px;
}

.hero-desc .accent {
  color: var(--blue-dark);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  padding: 12px 28px;
  background: linear-gradient(135deg, #5b9fed, #3b82f6);
  color: #fff;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

.btn-hot {
  position: relative;
  padding: 12px 28px;
  background: linear-gradient(135deg, #fb923c, #f97316);
  color: #fff;
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.35);
}

.hot-badge {
  position: absolute;
  top: -6px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
}

/* error cards */
.error-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.glass-card {
  background: #1a1f2e;
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
}

.error-img {
  width: 100%;
  border-radius: 8px;
  display: block;
  margin-bottom: 12px;
}

.btn-outline {
  padding: 8px 20px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(147, 197, 253, 0.5);
  color: #93c5fd;
  border-radius: 999px;
}

/* panels */
.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 800;
  color: #334155;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.panel-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  background: rgba(91, 159, 237, 0.15);
  border-radius: 8px;
  font-size: 14px;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.dl-card {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.dl-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.dl-sub {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.dl-ver {
  margin: 8px 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-dark);
}

.btn-dl {
  width: 100%;
  padding: 8px;
  background: linear-gradient(135deg, #5b9fed, #3b82f6);
  color: #fff;
  border-radius: 8px;
}

.modal-dl {
  max-width: 520px;
}

.dl-modal-hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.dl-modal-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.dl-modal-url-block {
  margin-bottom: 18px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 2px solid #60a5fa;
  border-radius: 10px;
}

.dl-modal-url {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: #1d4ed8;
  word-break: break-all;
  text-decoration: none;
}

.dl-modal-url:hover {
  text-decoration: underline;
}

.dl-modal-pwd-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed #93c5fd;
}

.dl-modal-label-inline {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

.dl-modal-pwd {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--blue-dark);
}

.dl-modal-copy-text {
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #2563eb;
  cursor: pointer;
  text-decoration: underline;
}

.dl-modal-copy-text:hover {
  color: #1d4ed8;
}

.dl-modal-open-btn {
  width: 100%;
}

/* notices */
.notice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notice-item {
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
}

.notice-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
}

.notice-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.notice-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-dark);
}

.notice-item-time {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.notice-item-body {
  padding: 0 14px 12px;
  font-size: 13px;
  color: var(--muted);
  display: none;
}

.notice-item.open .notice-item-body {
  display: block;
}

.notice-item + .notice-item {
  margin-top: 8px;
}

/* installer */
.installer-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.installer-tab {
  flex: 1;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  font-weight: 600;
}

.installer-tab.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.installer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.installer-row:last-child {
  border-bottom: none;
}

.installer-ver {
  font-weight: 700;
}

.installer-row .btn-dl {
  width: auto;
  padding: 6px 16px;
}

/* modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-lg { max-width: 480px; }

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
}

.modal h3 {
  margin: 0 0 12px;
  text-align: center;
}

.modal-hint {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.qrcode-wrap {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.qrcode-wrap img {
  max-width: 260px;
  width: 100%;
  border-radius: 8px;
}

.tutorial-os {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tutorial-os-btn {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  font-weight: 600;
}

.tutorial-os-btn.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.tutorial-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tutorial-link {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  background: #f1f5f9;
  color: var(--blue-dark);
  font-weight: 600;
  text-decoration: none;
}

.tutorial-link:hover {
  background: #e2e8f0;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 2000;
  box-shadow: var(--shadow);
}

@media (max-width: 640px) {
  .site-title-name,
  .site-title-sub {
    font-size: 22px;
  }

  .site-title-icon {
    width: 40px;
    height: 40px;
  }
}
