/* ==========================================================================
   秩序之路 · 世界BOSS刷新倒计时
   视觉参考：zxzl.youtuhuyu.cn（官网的暖色火焰 / 橙金渐变 / 余烬粒子）
   所有图形（符文、火焰徽记、粒子）均为原创绘制，未使用官网素材。
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --primary: #ff6b35;
  --secondary: #ff4500;
  --accent: #ffd700;
  --dark: #0d0d0d;
  --dark-2: #1a0a0a;
  --card: #2d1212;
  --card-deep: #200d0d;

  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.72);
  --muted: rgba(255, 255, 255, 0.5);
  --faint: rgba(255, 255, 255, 0.36);
  --line: rgba(255, 255, 255, 0.1);
  --line-warm: rgba(255, 107, 53, 0.28);

  --font: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-card: 18px;
  --r-btn: 10px;
  --r-pill: 9999px;

  --shadow-card: 0 18px 50px rgba(0, 0, 0, 0.45);
  --glow-orange: 0 10px 40px rgba(255, 107, 53, 0.25);
  --glow-gold: 0 10px 40px rgba(255, 180, 0, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--dark);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: rgba(255, 107, 53, 0.45);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #0b0606;
}
::-webkit-scrollbar-thumb {
  background: #4a1d13;
  border-radius: 10px;
  border: 2px solid #0b0606;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.container {
  width: min(1240px, 100% - 64px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: #1a0a0a;
  padding: 12px 20px;
  border-radius: 0 0 10px 0;
  font-weight: 700;
}
.skip-link:focus {
  left: 0;
}

/* ==========================================================================
   背景：暖色光晕 + 余烬粒子
   ========================================================================== */

.bg-aura {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 720px at 50% -10%, rgba(255, 107, 53, 0.24), transparent 62%),
    radial-gradient(820px 600px at 94% 16%, rgba(255, 69, 0, 0.13), transparent 60%),
    radial-gradient(900px 720px at 4% 46%, rgba(255, 107, 53, 0.08), transparent 62%),
    linear-gradient(180deg, #0d0d0d 0%, #1a0a0a 40%, #130808 72%, #0d0d0d 100%);
}

.embers {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.nav,
.page,
.footer {
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   导航
   ========================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(13, 13, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
  width: min(1400px, 100% - 64px);
  margin: 0 auto;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 36px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: none;
}

.brand-emblem {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(255, 107, 53, 0.18), rgba(255, 69, 0, 0.08));
  border: 1px solid rgba(255, 107, 53, 0.38);
  box-shadow: 0 0 24px rgba(255, 107, 53, 0.18);
}

.brand-emblem svg {
  width: 27px;
  height: 27px;
  filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.55));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #ffe792 0%, #ffb35c 40%, #ff6b35 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.brand-text em {
  font-style: normal;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.26em;
  color: rgba(255, 255, 255, 0.42);
  margin-top: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: 8px;
}

.nav-links a {
  position: relative;
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 0;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #fff;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-clock {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #fff;
}

.nav-time {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  font-weight: 600;
  min-width: 76px;
  text-align: right;
}

.nav-tz {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  flex: none;
  display: inline-block;
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.8);
}

.live-dot[data-mode="server"] {
  animation: breathe 2.4s ease-in-out infinite;
}
.live-dot[data-mode="local"] {
  background: rgba(255, 255, 255, 0.45);
  box-shadow: none;
}
.live-dot[data-mode="connecting"] {
  background: rgba(255, 255, 255, 0.45);
  box-shadow: none;
  animation: breathe 1.2s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.72);
  }
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.page {
  padding-top: 70px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 78px;
}

.hero-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-aura {
  position: absolute;
  top: -34%;
  left: 50%;
  width: 1000px;
  height: 780px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 107, 53, 0.32) 0%, rgba(255, 69, 0, 0.12) 38%, transparent 68%);
  filter: blur(12px);
}

.hero-rune {
  position: absolute;
  top: 48%;
  left: 50%;
  width: 800px;
  height: 800px;
  transform: translate(-50%, -50%);
  opacity: 0.58;
  animation: spin 160s linear infinite;
  filter: drop-shadow(0 0 46px rgba(255, 107, 53, 0.14));
  -webkit-mask-image: radial-gradient(circle, #000 34%, rgba(0, 0, 0, 0.65) 58%, transparent 74%);
  mask-image: radial-gradient(circle, #000 34%, rgba(0, 0, 0, 0.65) 58%, transparent 74%);
}

.hero-horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 300px;
  background:
    radial-gradient(60% 120% at 50% 120%, rgba(255, 69, 0, 0.32), transparent 70%),
    linear-gradient(180deg, transparent 40%, rgba(13, 13, 13, 0.55) 100%);
}

.hero-horizon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(900px, 80%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.55), transparent);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 26px;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 107, 53, 0.42);
  background: rgba(255, 107, 53, 0.12);
  color: #ffb88f;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  animation: kickerPulse 3s ease-in-out infinite;
}

@keyframes kickerPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 53, 0);
  }
  50% {
    box-shadow: 0 0 24px 0 rgba(255, 107, 53, 0.22);
  }
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(44px, 6.2vw, 78px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: 0.02em;
}

.hero-title span {
  display: block;
}

.hero-title .line-1 {
  color: #fff;
  text-shadow: 0 4px 40px rgba(255, 107, 53, 0.25);
}

.hero-title .line-2 {
  background: linear-gradient(135deg, #ffe9a8 0%, #ffb35c 34%, #ff6b35 68%, #ff4500 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 8px 34px rgba(255, 107, 53, 0.38));
}

.hero-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  color: var(--text-2);
  font-size: 16px;
  letter-spacing: 0.04em;
}

.hero-sub i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.75);
  font-style: normal;
}

.hud {
  display: flex;
  align-items: center;
  gap: 38px;
  margin: 38px 0 26px;
  padding: 22px 38px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(52, 21, 19, 0.78), rgba(26, 10, 10, 0.85));
  border: 1px solid rgba(255, 107, 53, 0.26);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hud-clock {
  min-width: 268px;
  text-align: left;
}

.hud-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.hud-time {
  margin: 6px 0 0;
  font-size: 58px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff 20%, #ffc98f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hud-date {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--text-2);
  letter-spacing: 0.04em;
}

.hud-sep {
  width: 1px;
  height: 92px;
  background: linear-gradient(180deg, transparent, rgba(255, 107, 53, 0.45), transparent);
  flex: none;
}

.hud-next {
  min-width: 300px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hud-next strong {
  font-size: 19px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(255, 215, 0, 0.28);
}

.hud-hint {
  font-size: 12px;
  color: var(--faint);
}

.hero-stats {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.hero-stats li {
  padding: 0 34px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.hero-stats li:first-child {
  border-left: 0;
}

.hero-stats b {
  display: block;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: #fff;
}

.hero-stats span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.42);
}

/* ==========================================================================
   状态条
   ========================================================================== */

.statusbar {
  border-top: 1px solid var(--line-warm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(13, 13, 13, 0.45);
}

.statusbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  font-size: 13px;
  color: var(--muted);
}

.sync {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sync[data-mode="server"] .live-dot {
  animation: breathe 2.4s ease-in-out infinite;
}
.sync[data-mode="local"] .live-dot,
.sync[data-mode="connecting"] .live-dot {
  background: rgba(255, 255, 255, 0.45);
  box-shadow: none;
}

.link-btn {
  background: none;
  border: 0;
  padding: 2px 4px;
  color: #ffb36b;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.summary {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.summary b {
  color: #fff;
  font-weight: 700;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  position: relative;
  padding: 82px 0;
  scroll-margin-top: 90px;
}

.section-head {
  max-width: 760px;
  margin: 0 auto 46px;
  text-align: center;
}

.section-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--primary);
}

.section-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #ffffff 0%, #ffd08a 46%, #ff6b35 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.section-note {
  margin: 0;
  font-size: 14px;
  color: var(--text-2);
}

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

/* ==========================================================================
   BOSS 卡片
   ========================================================================== */

.boss-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 22px 22px;
  border-radius: var(--r-card);
  background: linear-gradient(165deg, rgba(62, 26, 22, 0.94) 0%, rgba(32, 13, 13, 0.97) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 58% at 50% 0%, rgba(255, 107, 53, 0.16), transparent 62%);
  opacity: 0.8;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.boss-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 107, 53, 0.55);
  box-shadow: 0 22px 60px rgba(255, 107, 53, 0.18);
}

.boss-card:hover .card-glow {
  opacity: 1;
}

.boss-card.is-ready {
  border-color: rgba(255, 107, 53, 0.62);
  box-shadow: 0 20px 56px rgba(255, 69, 0, 0.18), inset 0 0 0 1px rgba(255, 107, 53, 0.16);
}

.boss-card.is-ready .card-glow {
  background: radial-gradient(120% 62% at 50% 0%, rgba(255, 160, 40, 0.3), transparent 64%);
  opacity: 1;
}

.card-head {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 4px 0 0;
}

.sigil {
  position: relative;
  width: 96px;
  height: 96px;
  flex: none;
}

.ring {
  position: absolute;
  inset: 0;
  width: 96px;
  height: 96px;
  transform: rotate(-90deg);
  overflow: visible;
}

.ring-track,
.ring-fill {
  fill: none;
  stroke-width: 3;
}

.ring-track {
  stroke: rgba(255, 255, 255, 0.12);
}

.ring-fill {
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-dasharray: 276.46;
  stroke-dashoffset: 276.46;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  filter: drop-shadow(0 0 6px rgba(255, 107, 53, 0.65));
}

.boss-card[data-state="ready"] .ring-fill {
  stroke: var(--accent);
  filter: drop-shadow(0 0 9px rgba(255, 215, 0, 0.75));
}

.sigil-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffd9b8;
  filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.35));
}

.sigil-icon svg {
  width: 44px;
  height: 44px;
  display: block;
}

.boss-card[data-state="ready"] .sigil-icon {
  color: var(--accent);
  filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.5));
}

.status-badge {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.62);
  white-space: nowrap;
}

.status-badge[data-state="soon"] {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.45);
}

.status-badge[data-state="ready"] {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), #ff9d2e);
  color: #2a0f06;
  font-weight: 800;
  box-shadow: 0 4px 20px rgba(255, 190, 20, 0.5);
}

.boss-name {
  margin: 16px 0 2px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-align: center;
  color: #fff;
}

.boss-en {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: center;
}

.cd-block {
  margin-top: 18px;
  text-align: center;
}

.cd-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.cd {
  margin: 2px 0 0;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.12);
}

.boss-card[data-state="soon"] .cd {
  color: var(--accent);
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.35);
}

.cd[data-state="empty"] {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.42);
  text-shadow: none;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.cd[data-state="ready"] {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #fff2b0, var(--accent) 45%, #ff8a00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(255, 200, 40, 0.35));
}

.cd-sub {
  margin: 4px 0 0;
  min-height: 18px;
  font-size: 12px;
  color: #ffc36b;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.progress {
  position: relative;
  height: 4px;
  margin: 16px 0;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff4500, #ff6b35 55%, #ffd700);
  box-shadow: 0 0 12px rgba(255, 107, 53, 0.55);
  transition: width 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.boss-times {
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 7px;
  font-size: 12.5px;
  text-align: left;
}

.boss-times div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.boss-times dt {
  color: var(--muted);
  white-space: nowrap;
}

.boss-times dd {
  margin: 0;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  margin-top: auto;
}

/* ==========================================================================
   按钮
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn[hidden] {
  display: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.32);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 28px rgba(255, 107, 53, 0.5);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 3px 12px rgba(255, 107, 53, 0.35);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-danger {
  background: transparent;
  border-color: rgba(255, 69, 0, 0.5);
  color: #ff9d7a;
}

.btn-danger:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.35);
}

.btn[data-busy="true"] {
  pointer-events: none;
  opacity: 0.75;
}

.icon-btn {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ==========================================================================
   最近记录
   ========================================================================== */

.section-log {
  padding-bottom: 96px;
}

.log-panel {
  max-width: 980px;
  margin: 0 auto;
  padding: 6px 28px;
  border-radius: var(--r-card);
  background: linear-gradient(160deg, rgba(52, 21, 19, 0.55), rgba(20, 8, 8, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-card);
}

.log-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.log-row {
  display: grid;
  grid-template-columns: 150px 150px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 13.5px;
}

.log-row:last-child {
  border-bottom: 0;
}

.log-time {
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.log-boss {
  color: #ffc997;
  font-weight: 600;
}

.log-what {
  color: var(--muted);
}

.log-what b {
  color: #fff;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.log-empty {
  margin: 0;
  padding: 26px 0;
  color: var(--muted);
  font-size: 14px;
}

/* ==========================================================================
   页脚
   ========================================================================== */

.footer {
  padding: 52px 0 44px;
  text-align: center;
  background: rgba(0, 0, 0, 0.55);
  border-top: 1px solid rgba(255, 107, 53, 0.22);
  scroll-margin-top: 80px;
}

.footer-brand {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #ffe792, #ff8a4c 55%, #ff4500);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.footer-lede {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--text-2);
}

.footer-fine {
  margin: 0 auto;
  max-width: 720px;
  font-size: 12px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   弹窗
   ========================================================================== */

.modal {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 1px solid rgba(255, 107, 53, 0.4);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(48, 20, 18, 0.99), rgba(24, 9, 9, 0.99));
  color: #fff;
  box-shadow: 0 25px 80px rgba(255, 107, 53, 0.28);
  overflow: auto;
}

.modal::backdrop {
  background: rgba(6, 2, 2, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal[open] {
  animation: modal-in 0.24s ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 30px 0;
}

.modal-eyebrow {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--primary);
}

.modal-head h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.modal-body {
  padding: 22px 30px 6px;
}

.field {
  display: block;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-2);
}

.field-tip {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--faint);
}

input[type="datetime-local"] {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 107, 53, 0.35);
  border-radius: 10px;
  background: #170808;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color-scheme: dark;
}

input[type="datetime-local"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.18);
}

input[type="datetime-local"].is-invalid {
  border-color: #ff5a52;
  box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.16);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.chip:hover {
  background: rgba(255, 107, 53, 0.18);
  border-color: rgba(255, 107, 53, 0.5);
}

.preview {
  margin-top: 18px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 7px;
  font-size: 13px;
}

.preview-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.preview-row span {
  color: var(--muted);
}

.preview-row b {
  color: #fff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

#previewRemain {
  color: var(--accent);
}

.form-error {
  margin: 14px 0 0;
  font-size: 13px;
  color: #ff8a7a;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 30px 24px;
}

.modal-actions .spacer {
  flex: 1;
}

.modal-actions .btn {
  padding: 0 18px;
}

/* ==========================================================================
   Toast
   ========================================================================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100vw - 32px);
  padding: 13px 14px 13px 20px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(58, 24, 20, 0.98), rgba(30, 12, 12, 0.98));
  border: 1px solid rgba(255, 107, 53, 0.45);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.4;
  box-shadow: 0 18px 50px rgba(255, 107, 53, 0.25);
}

.toast[hidden] {
  display: none;
}

.toast-action {
  flex: none;
  border: 1px solid rgba(255, 215, 0, 0.45);
  background: rgba(255, 215, 0, 0.1);
  color: var(--accent);
  border-radius: var(--r-pill);
  height: 30px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.toast-action:hover {
  background: rgba(255, 215, 0, 0.18);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1180px) {
  .boss-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-rune {
    width: 680px;
    height: 680px;
  }
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }
  .hero {
    padding: 72px 0 64px;
  }
  .hud {
    gap: 26px;
    padding: 20px 26px;
  }
  .hud-clock {
    min-width: 230px;
  }
  .hud-time {
    font-size: 48px;
  }
  .hud-next {
    min-width: 250px;
  }
}

@media (max-width: 820px) {
  .container {
    width: calc(100% - 48px);
  }
  .hud {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    margin: 32px 0 24px;
    padding: 22px 24px;
    text-align: center;
  }
  .hud-clock,
  .hud-next {
    min-width: 0;
    text-align: center;
  }
  .hud-label {
    justify-content: center;
  }
  .hud-sep {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.4), transparent);
  }
  .hero-stats li {
    padding: 0 22px;
  }
  .hero-title {
    font-size: clamp(40px, 8.4vw, 56px);
  }
  .log-panel {
    padding: 4px 20px;
  }
  .log-row {
    grid-template-columns: 1fr auto;
    gap: 2px 16px;
  }
  .log-what {
    grid-column: 1 / -1;
  }
  .statusbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 11px 0;
    font-size: 12.5px;
  }
  .summary {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 40px);
  }
  .nav-inner {
    width: calc(100% - 40px);
    height: 64px;
    gap: 16px;
  }
  .page {
    padding-top: 64px;
  }
  .section {
    scroll-margin-top: 80px;
  }
  .brand-emblem {
    width: 38px;
    height: 38px;
  }
  .brand-text strong {
    font-size: 17px;
  }
  .brand-text em {
    display: none;
  }
  .nav-tz {
    font-size: 11px;
  }
  .hero {
    padding: 40px 0 36px;
  }
  .hero-rune {
    width: 460px;
    height: 460px;
    opacity: 0.4;
  }
  .hero-kicker {
    margin-bottom: 18px;
    font-size: 11px;
    padding: 7px 14px;
  }
  .hero-title {
    font-size: 36px;
    margin-bottom: 10px;
  }
  .hero-sub {
    font-size: 13px;
    gap: 8px;
  }
  .hud {
    gap: 14px;
    margin: 24px 0 18px;
    padding: 18px;
    border-radius: 18px;
  }
  .hud-time {
    font-size: 42px;
  }
  .hud-date {
    font-size: 12px;
  }
  .hud-hint {
    display: none;
  }
  .hud-sep {
    height: 1px;
  }
  .hero-stats li {
    padding: 0 14px;
  }
  .hero-stats b {
    font-size: 20px;
  }
  .hero-stats span {
    font-size: 10px;
    letter-spacing: 0.08em;
  }
  .section {
    padding: 56px 0;
  }
  .section-head {
    margin-bottom: 32px;
  }
  .boss-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .boss-card {
    padding: 20px 18px 18px;
  }
  .sigil {
    width: 84px;
    height: 84px;
  }
  .ring {
    width: 84px;
    height: 84px;
  }
  .sigil-icon svg {
    width: 38px;
    height: 38px;
  }
  .boss-name {
    margin: 14px 0 2px;
    font-size: 19px;
  }
  .cd-block {
    margin-top: 14px;
  }
  .cd {
    font-size: 32px;
  }
  .progress {
    margin: 12px 0;
  }
  .boss-times {
    font-size: 12px;
    gap: 6px;
    margin-bottom: 14px;
  }
  .modal-head {
    padding: 20px 20px 0;
  }
  .modal-body {
    padding: 18px 20px 4px;
  }
  .modal-actions {
    padding: 14px 20px 20px;
    flex-wrap: wrap;
  }
  .modal-actions .spacer {
    display: none;
  }
  .modal-actions .btn {
    flex: 1 1 auto;
    padding: 0 12px;
  }
  .modal-actions #clearBtn {
    order: 9;
    flex: 1 1 100%;
  }
  .footer {
    padding: 40px 0 34px;
  }
}

@media (max-width: 380px) {
  .nav-tz {
    display: none;
  }
  .hero-title {
    font-size: 38px;
  }
  input[type="datetime-local"] {
    font-size: 15px;
    padding: 0 10px;
  }
}

/* ==========================================================================
   Motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
