/* ==========================================================================
   食象 / Eclipse Lab
   ========================================================================== */

:root {
  --bg: #030609;
  --text: #eae7df;
  --line: rgba(235, 240, 242, .12);
  --line-soft: rgba(235, 240, 242, .065);
  --accent: #e2c28e;
  --sans: "Avenir Next", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", "Times New Roman", serif;
  --mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", "Liberation Mono", Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button { color: inherit; font: inherit; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 1px solid rgba(226,194,142,.9); outline-offset: 4px; }
::selection { color: #16120b; background: var(--accent); }
svg { display: block; }

/* Loading ------------------------------------------------------------------ */

.eclipse-loading {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: #030609; transition: opacity .7s var(--ease), visibility .7s;
}
.eclipse-loading.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.eclipse-loading-mark { position: relative; width: 56px; height: 56px; display: grid; place-items: center; }
.eclipse-loading-mark i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px rgba(226,194,142,.8); }
.eclipse-loading-mark i:nth-child(1) { animation: eclipse-orbit 2.6s linear infinite; }
.eclipse-loading-mark i:nth-child(2) { animation: eclipse-orbit 2.6s linear infinite reverse; animation-delay: -.9s; opacity: .65; }
.eclipse-loading-mark i:nth-child(3) { width: 3px; height: 3px; opacity: .45; }
@keyframes eclipse-orbit { 0% { transform: rotate(0) translateX(22px); } 100% { transform: rotate(360deg) translateX(22px); } }
.eclipse-loading > span { font-family: var(--mono); font-size: 8px; letter-spacing: .18em; color: rgba(190,186,172,.7); }
.eclipse-loading > b { font-family: var(--mono); font-size: 7px; font-weight: 400; color: rgba(226,194,142,.65); }

/* Canvas ------------------------------------------------------------------- */

.eclipse-canvas { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; }
.eclipse-vignette {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 44%, transparent 30%, rgba(3,6,9,.3) 100%),
    linear-gradient(90deg, rgba(3,6,9,.74) 0%, transparent 32%, transparent 66%, rgba(3,6,9,.7) 100%),
    linear-gradient(0deg, rgba(3,6,9,.82) 0%, transparent 24%);
}

/* Topbar ------------------------------------------------------------------- */

.eclipse-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  height: 82px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 34px; pointer-events: none;
}
.eclipse-brand { display: flex; align-items: center; gap: 12px; pointer-events: auto; }
.eclipse-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid rgba(226,194,142,.34); border-radius: 50%;
  color: #e8c78e;
}
.eclipse-mark svg { width: 30px; height: 30px; }
.eclipse-brand-copy { display: flex; flex-direction: column; gap: 4px; }
.eclipse-brand-copy > span { font-size: 15px; font-weight: 500; letter-spacing: .09em; color: rgba(244,239,228,.95); }
.eclipse-brand-copy small { font-family: var(--mono); font-size: 6px; letter-spacing: .2em; color: rgba(155,149,137,.8); }
.eclipse-status {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 7px; letter-spacing: .1em;
  color: rgba(167,164,153,.75); white-space: nowrap;
}
.eclipse-status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(226,194,142,.7); }
.eclipse-status i { width: 26px; height: 1px; background: rgba(235,240,242,.15); }
.eclipse-status span:last-child { color: rgba(235,213,177,.86); }
.eclipse-actions { display: flex; align-items: center; gap: 5px; pointer-events: auto; }
.eclipse-actions a {
  display: flex; align-items: center; gap: 6px; height: 33px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(5,9,13,.52);
  font-family: var(--mono); font-size: 7.5px; color: rgba(211,205,193,.8);
  backdrop-filter: blur(13px); transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.eclipse-actions a span { opacity: .55; }
.eclipse-actions a:hover { border-color: rgba(226,194,142,.5); color: #fffdf5; background: rgba(20,17,12,.7); }

/* Copy --------------------------------------------------------------------- */

.eclipse-copy { position: fixed; left: 44px; top: 132px; z-index: 8; width: 405px; max-width: 42vw; pointer-events: none; }
.eclipse-kicker { display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 7px; letter-spacing: .16em; color: rgba(226,194,142,.8); }
.eclipse-kicker i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(226,194,142,.7); }
.eclipse-copy h1 { margin: 16px 0 0; font-family: var(--serif); font-size: clamp(47px, 5vw, 72px); font-weight: 400; line-height: 1.04; letter-spacing: .035em; color: rgba(247,243,232,.97); }
.eclipse-copy h1 em { font-style: normal; color: #e3bd80; }
.eclipse-copy > p { margin: 17px 0 0; max-width: 335px; font-size: 11.5px; line-height: 1.8; color: rgba(153,159,160,.92); }
.eclipse-meta { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-family: var(--mono); font-size: 8px; color: rgba(193,176,148,.9); }
.eclipse-meta span + span::before { content: "·"; margin-right: 12px; color: rgba(110,118,118,.7); }
.eclipse-hint { display: flex; align-items: center; gap: 8px; margin-top: 19px; font-family: var(--mono); font-size: 6.5px; letter-spacing: .05em; color: rgba(118,124,124,.7); }
.eclipse-hint i { width: 17px; height: 1px; background: rgba(226,194,142,.4); }

/* Panel -------------------------------------------------------------------- */

.eclipse-panel {
  position: fixed; top: 104px; right: 32px; bottom: 142px; z-index: 20;
  width: 354px; padding: 18px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 3px;
  background: rgba(6,9,12,.82);
  box-shadow: 0 22px 70px rgba(0,0,0,.3);
  backdrop-filter: blur(22px) saturate(.9); -webkit-backdrop-filter: blur(22px) saturate(.9);
  scrollbar-width: thin; scrollbar-color: rgba(188,160,116,.28) transparent;
  pointer-events: auto;
}
.eclipse-panel-head { display: flex; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: 6.5px; letter-spacing: .12em; color: rgba(145,142,133,.7); }
.eclipse-panel h2 { margin: 13px 0 0; font-family: var(--serif); font-size: 30px; font-weight: 400; line-height: 1.16; color: rgba(247,241,229,.97); }
.eclipse-panel-copy { margin: 12px 0 0; font-size: 10.5px; line-height: 1.72; color: rgba(149,154,154,.9); }

.eclipse-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 16px; }
.eclipse-modes button {
  min-height: 33px; border: 1px solid rgba(255,255,255,.1); border-radius: 2px;
  background: rgba(255,255,255,.02); font-family: var(--mono); font-size: 7.5px; color: rgba(190,185,174,.82);
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.eclipse-modes button:hover, .eclipse-modes button.is-active { border-color: rgba(226,194,142,.45); background: rgba(226,194,142,.09); color: rgba(249,225,189,.96); }

.eclipse-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 16px;
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
}
.eclipse-stats div { display: flex; flex-direction: column; gap: 4px; padding: 9px 6px; border-bottom: 1px solid rgba(235,240,242,.035); }
.eclipse-stats div:nth-child(odd) { padding-left: 0; border-right: 1px solid var(--line-soft); }
.eclipse-stats div:nth-last-child(-n+2) { border-bottom: 0; }
.eclipse-stats span { font-family: var(--mono); font-size: 6px; letter-spacing: .05em; color: rgba(115,122,123,.86); }
.eclipse-stats strong { font-family: var(--mono); font-size: 8.5px; font-weight: 400; color: rgba(226,218,204,.92); }
.eclipse-facts { margin: 13px 0 0; padding: 0; list-style: none; }
.eclipse-facts li { position: relative; padding: 0 0 9px 13px; font-size: 9.5px; line-height: 1.62; color: rgba(150,158,159,.88); }
.eclipse-facts li::before { content: ""; position: absolute; left: 0; top: 6px; width: 4px; height: 4px; border-radius: 50%; background: rgba(226,194,142,.55); }
.eclipse-note { margin: 10px 0 0; font-size: 8px; line-height: 1.6; color: rgba(102,111,114,.72); }

/* Timeline ----------------------------------------------------------------- */

.eclipse-timeline {
  position: fixed; left: 26px; right: 26px; bottom: 20px; z-index: 30;
  display: grid; grid-template-columns: 185px minmax(0, 1fr) 120px;
  align-items: center; gap: 22px; min-height: 88px; padding: 12px 16px;
  border: 1px solid rgba(235,240,242,.14); border-radius: 3px;
  background: rgba(5,9,13,.78);
  box-shadow: 0 18px 60px rgba(0,0,0,.3);
  backdrop-filter: blur(20px) saturate(.9); -webkit-backdrop-filter: blur(20px) saturate(.9);
}
.eclipse-now { display: flex; align-items: center; gap: 10px; }
.eclipse-play {
  flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid rgba(226,194,142,.34); border-radius: 50%;
  background: rgba(226,194,142,.08); color: #e8cfaa;
  transition: border-color .2s ease, background .2s ease;
}
.eclipse-play:hover { border-color: rgba(226,194,142,.65); background: rgba(226,194,142,.14); }
.eclipse-play svg { width: 19px; height: 19px; }
.eclipse-pause-icon { display: none; }
.eclipse-now.is-playing .eclipse-play-icon { display: none; }
.eclipse-now.is-playing .eclipse-pause-icon { display: block; }
.eclipse-now-copy { display: flex; flex-direction: column; gap: 4px; }
.eclipse-now-copy span { font-family: var(--mono); font-size: 6.5px; letter-spacing: .09em; color: rgba(139,149,152,.85); }
.eclipse-now-copy b { font-family: var(--mono); font-size: 9px; font-weight: 400; color: rgba(230,221,204,.92); white-space: nowrap; }

.eclipse-track-wrap { position: relative; min-width: 0; padding-top: 18px; }
.eclipse-ticks { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 6px; letter-spacing: .04em; color: rgba(129,137,138,.65); }
.eclipse-ticks span { position: relative; }
.eclipse-ticks span::after { content: ""; display: block; width: 1px; height: 4px; margin: 3px auto 0; background: rgba(189,185,173,.25); }
#eclipse-range { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; margin: 0; background: transparent; cursor: pointer; }
#eclipse-range::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(122,112,96,.5), rgba(226,194,142,.65) 50%, rgba(122,112,96,.5)); }
#eclipse-range::-moz-range-track { height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(122,112,96,.5), rgba(226,194,142,.65) 50%, rgba(122,112,96,.5)); }
#eclipse-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 11px; height: 11px; margin-top: -4.5px;
  border: 1px solid rgba(14,16,16,.7); border-radius: 50%;
  background: #efd5a8; box-shadow: 0 0 0 4px rgba(226,194,142,.12), 0 0 15px rgba(226,194,142,.42);
}
#eclipse-range::-moz-range-thumb { width: 10px; height: 10px; border: 1px solid rgba(14,16,16,.7); border-radius: 50%; background: #efd5a8; box-shadow: 0 0 0 4px rgba(226,194,142,.12); }
.eclipse-actions-bottom { display: flex; justify-content: flex-end; }
.eclipse-reset {
  height: 34px; padding: 0 11px;
  border: 1px solid rgba(255,255,255,.1); border-radius: 2px;
  background: rgba(255,255,255,.018); font-family: var(--mono); font-size: 7.5px; color: rgba(207,203,192,.86);
}
.eclipse-reset:hover { border-color: rgba(226,194,142,.45); background: rgba(226,194,142,.07); color: #fffdf7; }

/* Responsive --------------------------------------------------------------- */

@media (max-width: 1120px) {
  .eclipse-copy { left: 30px; width: 350px; }
  .eclipse-panel { right: 22px; width: 326px; }
  .eclipse-topbar { padding: 0 24px; }
  .eclipse-timeline { left: 18px; right: 18px; grid-template-columns: 170px minmax(0, 1fr) 110px; gap: 15px; }
}

@media (max-width: 900px) {
  .eclipse-topbar { height: 66px; padding: 0 14px; }
  .eclipse-mark { width: 35px; height: 35px; }
  .eclipse-mark svg { width: 25px; height: 25px; }
  .eclipse-brand-copy > span { font-size: 13px; }
  .eclipse-brand-copy small { font-size: 5px; }
  .eclipse-status { display: none; }
  .eclipse-actions a { height: 30px; padding: 0 8px; font-size: 6.5px; }
  .eclipse-actions a span { display: none; }
  .eclipse-copy { top: 88px; left: 18px; width: min(330px, 84vw); max-width: none; }
  .eclipse-copy h1 { font-size: 44px; }
  .eclipse-copy > p { max-width: 295px; font-size: 10px; line-height: 1.72; }
  .eclipse-meta { margin-top: 13px; font-size: 7px; }
  .eclipse-hint { margin-top: 12px; }
  .eclipse-panel {
    top: auto; left: 10px; right: 10px; bottom: 116px;
    width: auto; max-height: min(48vh, 380px); padding: 15px;
  }
  .eclipse-panel h2 { font-size: 25px; }
  .eclipse-panel-copy { font-size: 9.5px; }
  .eclipse-timeline {
    left: 10px; right: 10px; bottom: 10px;
    grid-template-columns: 1fr auto; grid-template-areas: "track track" "now actions";
    gap: 10px 14px; min-height: 0; padding: 10px 12px;
  }
  .eclipse-track-wrap { grid-area: track; padding-top: 16px; }
  .eclipse-now { grid-area: now; }
  .eclipse-actions-bottom { grid-area: actions; }
  .eclipse-play { width: 38px; height: 38px; }
  .eclipse-play svg { width: 17px; height: 17px; }
  .eclipse-now-copy b { font-size: 8px; }
  .eclipse-ticks { font-size: 5.5px; }
  .eclipse-reset { height: 31px; padding: 0 9px; font-size: 7px; }
}

@media (max-width: 560px) {
  .eclipse-copy { top: 78px; width: min(290px, 82vw); }
  .eclipse-copy h1 { font-size: 38px; }
  .eclipse-copy > p { font-size: 9.5px; }
  .eclipse-actions a { font-size: 6.2px; padding: 0 7px; }
  .eclipse-panel { bottom: 116px; max-height: min(48vh, 365px); padding: 14px; }
  .eclipse-timeline { left: 6px; right: 6px; bottom: calc(6px + env(safe-area-inset-bottom, 0px)); padding: 9px 10px; }
  .eclipse-ticks { font-size: 5px; }
  .eclipse-now-copy span { font-size: 6px; }
  .eclipse-now-copy b { font-size: 7.5px; }
  .eclipse-play { width: 35px; height: 35px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .eclipse-topbar { height: 51px; }
  .eclipse-copy { top: 60px; left: 14px; width: 270px; }
  .eclipse-copy h1 { font-size: 32px; }
  .eclipse-copy > p, .eclipse-hint { display: none; }
  .eclipse-panel { top: 52px; right: 8px; left: auto; bottom: auto; width: 280px; max-height: 66vh; }
  .eclipse-timeline {
    left: 8px; right: 8px; bottom: 7px;
    grid-template-columns: 150px minmax(0, 1fr) auto; grid-template-areas: none;
    gap: 12px; min-height: 64px; padding: 7px 10px;
  }
  .eclipse-track-wrap { grid-area: auto; padding-top: 15px; }
  .eclipse-now { grid-area: auto; }
  .eclipse-actions-bottom { grid-area: auto; }
}
