/* 样式采用深色主题，最大化时钟显示区域 */
:root {
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: #000; /* 黑色底色 */
  color: #eaeaea;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Microsoft YaHei", sans-serif;
}

.app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
}

/* 让时钟画布尽可能占满空间 */
#clock {
  width: 100%;
  height: 100%;
  display: block;
}

/* 右下角控制与信息 HUD */
.hud {
  position: absolute;
  left: 24px;
  bottom: 24px;
  display: grid;
  gap: 4px;
  user-select: none;
  pointer-events: none; /* HUD 不可点击，避免遮挡返回按钮 */
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.digital {
  font-size: clamp(18px, 2.5vw, 36px);
  font-weight: 700;
}

.date {
  font-size: clamp(14px, 1.6vw, 22px);
  opacity: 0.85;
}

.controls {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: flex;
  gap: 8px;
}

.controls button {
  background: #111;
  color: #eaeaea;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.controls button:hover {
  background: #1a1a1a;
  border-color: #444;
}

/* 全屏时隐藏滚动条并保持居中 */
:fullscreen .app {
  width: 100%;
  height: 100%;
}

/* —— 导览页面样式 —— */
.guide {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 32px 24px 24px;
}

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

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 44px);
}

.hero .subtitle {
  margin: 0;
  opacity: 0.85;
  font-size: clamp(14px, 2vw, 20px);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-content: start;
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #0d0d0d;
  border: 1px solid #222;
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.card:hover {
  background: #141414;
  border-color: #333;
}

.card h2 {
  margin: 0 0 8px;
  font-size: clamp(18px, 2.6vw, 26px);
}

.card p {
  margin: 0;
  opacity: 0.8;
}

.footer {
  margin-top: 24px;
  text-align: center;
  opacity: 0.7;
}

/* —— 在线时间页面样式 —— */
.digital-page {
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.digital-wrap {
  text-align: center;
}

.digital-time {
  font-weight: 800;
  letter-spacing: 2px;
  font-size: clamp(36px, 10vw, 140px);
}

.digital-date {
  margin-top: 12px;
  opacity: 0.85;
  font-size: clamp(16px, 3vw, 36px);
}

.backbar {
  position: fixed;
  left: 24px;
  top: 24px;
  z-index: 1000; /* 保证在最上层 */
  pointer-events: auto; /* 确保可点击 */
}

.backbar a {
  display: inline-block;
  background: #111;
  color: #eaeaea;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 8px 12px;
  text-decoration: none;
}

.backbar a:hover { background: #1a1a1a; }