/* ========== CSS 变量 - 暗色主题（星空/星座风格） ========== */
[data-theme="dark"] {
  --bg-primary: #05060f;
  --bg-secondary: #0a0c1a;
  --text-primary: #e8eaf6;
  --text-secondary: #7986cb;
  --accent-gold: #7c9bff;
  --accent-gold-bright: #a8c0ff;
  --accent-gold-dim: #3d5afe;
  --ring-stroke: rgba(124, 155, 255, 0.1);
  --ring-active: #7c9bff;
  --ring-glow: rgba(124, 155, 255, 0.35);
  --ring-glow-strong: rgba(124, 155, 255, 0.7);
  --separator: rgba(124, 155, 255, 0.06);
  --control-bg: rgba(8, 10, 25, 0.88);
  --control-border: rgba(124, 155, 255, 0.15);
  --control-hover: rgba(124, 155, 255, 0.1);
  --shadow-color: rgba(124, 155, 255, 0.15);
  --digital-bg: rgba(8, 10, 25, 0.75);
  --particle-color: rgba(168, 192, 255, 0.6);
  --canvas-center-gradient-start: rgba(124, 155, 255, 0.04);
  --canvas-center-gradient-end: transparent;
}

/* ========== CSS 变量 - 亮色主题（晨曦极光风格） ========== */
[data-theme="light"] {
  --bg-primary: #eef1f8;
  --bg-secondary: #eaecf5;
  --text-primary: #1a1e3a;
  --text-secondary: #5a6080;
  --accent-gold: #4a5eb0;
  --accent-gold-bright: #6478d0;
  --accent-gold-dim: #8090d8;
  --ring-stroke: rgba(74, 94, 176, 0.12);
  --ring-active: #4a5eb0;
  --ring-glow: rgba(74, 94, 176, 0.25);
  --ring-glow-strong: rgba(74, 94, 176, 0.5);
  --separator: rgba(74, 94, 176, 0.08);
  --control-bg: rgba(238, 241, 248, 0.92);
  --control-border: rgba(74, 94, 176, 0.18);
  --control-hover: rgba(74, 94, 176, 0.08);
  --shadow-color: rgba(74, 94, 176, 0.12);
  --digital-bg: rgba(238, 241, 248, 0.85);
  --particle-color: rgba(74, 94, 176, 0.35);
  --canvas-center-gradient-start: rgba(74, 94, 176, 0.03);
  --canvas-center-gradient-end: transparent;
}

/* ========== 全局重置 ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Orbitron', 'Segoe UI', sans-serif;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: background 0.6s ease, color 0.6s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* ========== 浮动按钮（绝对定位） ========== */
.float-btn {
  position: absolute;
  z-index: 100;
  width: 38px;
  height: 38px;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  background: var(--control-bg);
  backdrop-filter: blur(12px);
  color: var(--accent-gold);
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.float-btn:hover {
  background: var(--control-hover);
  border-color: var(--accent-gold);
  box-shadow: 0 0 20px var(--shadow-color);
}

.float-btn-theme {
  top: 16px;
  right: 62px;
}

.float-btn-fs {
  top: 16px;
  right: 16px;
}

/* ========== 时钟容器 ========== */
.clock-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
}

#clockCanvas {
  display: block;
}

/* ========== 数字时间 ========== */
.digital-time {
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  font-weight: 500;
  color: var(--accent-gold);
  letter-spacing: 4px;
  padding: 8px 24px;
  background: var(--digital-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--control-border);
  border-radius: 30px;
  white-space: nowrap;
  z-index: 50;
}

/* ========== 页脚 ========== */
.footer {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 50;
}

.footer p {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: 'Segoe UI', sans-serif;
  letter-spacing: 0;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .float-btn {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .float-btn-theme {
    top: 12px;
    right: 54px;
  }

  .float-btn-fs {
    top: 12px;
    right: 12px;
  }

  .digital-time {
    font-size: 12px;
    letter-spacing: 2px;
    padding: 6px 16px;
    bottom: 44px;
  }
}

@media (max-width: 480px) {
  .float-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .float-btn-theme {
    top: 10px;
    right: 50px;
  }

  .float-btn-fs {
    top: 10px;
    right: 10px;
  }

  .digital-time {
    font-size: 10px;
    letter-spacing: 1px;
    padding: 5px 12px;
    bottom: 40px;
  }
}

/* ========== 全屏模式 ========== */
:fullscreen #app,
:-webkit-full-screen #app {
  background: var(--bg-primary);
}

/* ========== 动画 ========== */
@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
