/* ============================================================
   TDSI 官网 · 首页
   ============================================================ */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(40px, 6vw, 84px) 0 clamp(32px, 5vw, 64px);
  text-align: center;
  overflow: hidden;
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  margin-bottom: var(--sp-5);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-2);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero__title {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: var(--sp-4);
}

.hero__title .grad-text {
  display: inline-block;
}

.hero__sub {
  font-size: clamp(13px, 0.8rem + 0.5vw, 16px);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-brand);
  margin-bottom: var(--sp-3);
}

.hero__desc {
  font-size: clamp(14px, 0.85rem + 0.4vw, 17px);
  color: var(--text-2);
  margin-bottom: var(--sp-6);
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
  margin-bottom: var(--sp-7);
}

/* 指标条 */
.hero__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
}

.metric {
  min-width: 108px;
  padding: 14px 22px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.metric:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.metric__value {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.2;
  background: var(--c-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric__label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-3);
  margin-top: 2px;
}

/* ---------- 特色卡 ---------- */
.feature {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  height: 100%;
}

.feature__head {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}

.feature__title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}

.feature__en {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 2px;
}

.feature__desc {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text-2);
}

/* 规格小格 */
.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
  padding-top: var(--sp-3);
}

.spec {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  min-width: 0;
}

.spec svg {
  width: 16px;
  height: 16px;
  color: var(--c-brand);
  flex-shrink: 0;
}

.spec__label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spec__value {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 图库 ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-4);
}

.shot {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  background: var(--bg-subtle);
  aspect-ratio: 16 / 10;
  transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out);
}

.shot:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease-out);
}
.shot:hover img { transform: scale(1.06); }

html.dark-mode .shot img { filter: brightness(0.94) saturate(0.97); }

.shot__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 14px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0));
  letter-spacing: 0.01em;
}

/* ---------- 服务器信息 ---------- */
.server-wrap {
  max-width: 760px;
  margin: 0 auto;
}

.addr-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-inset), var(--shadow-md);
  margin-bottom: var(--sp-5);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.addr-box__label {
  width: 100%;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: -4px;
}

.addr {
  font-family: var(--font-heading);
  font-size: clamp(20px, 1.2rem + 1.2vw, 30px);
  font-weight: 900;
  letter-spacing: 0.03em;
  padding: 8px 20px;
  border-radius: var(--r-md);
  background: var(--bg-subtle);
  border: 1px dashed rgba(14, 165, 233, 0.4);
  color: var(--text-1);
  cursor: pointer;
  transition: all var(--dur) var(--ease-out);
  user-select: all;
}
.addr:hover {
  border-color: var(--c-brand);
  background: rgba(14, 165, 233, 0.08);
  transform: translateY(-1px);
}

/* MOTD 卡片 */
.motd {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-surface);
  box-shadow: var(--shadow-md);
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.motd iframe {
  width: 100%;
  border: 0;
  height: 150px;
  display: block;
}

.motd__loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg-surface);
  color: var(--text-3);
  font-size: 12.5px;
  transition: opacity 0.4s ease;
  z-index: 2;
}
.motd__loader--hide { opacity: 0; pointer-events: none; }

/* 分区标题（服务器区块内） */
.sub-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: center;
  margin: var(--sp-6) 0 var(--sp-3);
}
.sub-title:first-child { margin-top: 0; }

/* 暂停状态块 */
.paused-block {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  border: 1px solid rgba(245, 158, 11, 0.32);
  background: rgba(245, 158, 11, 0.08);
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-2);
}
.paused-block svg { width: 20px; height: 20px; color: var(--c-warn); flex-shrink: 0; margin-top: 1px; }

/* ---------- 规则卡 ---------- */
.rule-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: var(--sp-2);
}

.rule-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-2);
  padding: 7px 8px;
  border-radius: var(--r-sm);
  transition: background var(--dur) ease, color var(--dur) ease, padding-left var(--dur) ease;
}

.rule-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--c-grad);
  flex-shrink: 0;
}

.rule-list li:hover {
  background: rgba(14, 165, 233, 0.07);
  color: var(--text-1);
  padding-left: 13px;
}
html.dark-mode .rule-list li:hover { background: rgba(99, 102, 241, 0.1); }

/* ---------- 赞助 ---------- */
.sponsor {
  text-align: center;
  padding: var(--sp-7) var(--sp-5);
  border-radius: var(--r-xl);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-inset), var(--shadow-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  max-width: 720px;
  margin: 0 auto;
}

.sponsor__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
  margin-top: var(--sp-5);
}

/* ---------- 联系 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-4);
  max-width: 900px;
  margin: 0 auto;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) ease;
}
.contact-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(14, 165, 233, 0.3);
}

.contact-item img {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.contact-item__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 1px;
}

.contact-item__value {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-1);
  word-break: break-all;
}

/* ---------- 视频卡片 ---------- */
.video-card {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  aspect-ratio: 16 / 9;
  background: #0b1120;
}

.video-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  transition: transform 0.7s var(--ease-out), opacity var(--dur) ease;
}
.video-card:hover img { transform: scale(1.04); opacity: 0.92; }

.video-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.video-card__play span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--c-brand);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  transition: transform var(--dur) var(--ease-spring), background var(--dur) ease;
}
.video-card:hover .video-card__play span { transform: scale(1.09); background: #fff; }
.video-card__play svg { width: 28px; height: 28px; margin-left: 3px; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal--open { display: flex; }

.modal__panel {
  position: relative;
  width: min(960px, 100%);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-xl);
}

.modal__panel video { width: 100%; height: auto; display: block; }

.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  background: rgba(2, 6, 23, 0.6);
  color: #fff;
  transition: background var(--dur) ease, transform var(--dur) ease;
}
.modal__close:hover { background: rgba(239, 68, 68, 0.85); transform: rotate(90deg); }
.modal__close svg { width: 20px; height: 20px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 20px);
  z-index: 3000;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--dur) var(--ease-out);
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast--show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast svg { width: 17px; height: 17px; color: #4ade80; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .hero { padding: 28px 0 32px; }
  .hero__inner { padding: 0 var(--sp-4); }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .hero__metrics { gap: 8px; }
  .metric { min-width: 88px; padding: 11px 15px; }
  .metric__value { font-size: 18px; }
  .specs { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .addr-box { padding: var(--sp-4); }
  .sponsor { padding: var(--sp-6) var(--sp-4); }
  .video-card__play span { width: 58px; height: 58px; }
  .video-card__play svg { width: 22px; height: 22px; }
}
