/* ============================================================
   變數與重置
   ============================================================ */
:root {
  --bg: #0a0e1a;
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-primary: #e8edf5;
  --text-muted: #6b7a99;
  --accent: #7c6dff;
  --accent-glow: rgba(124, 109, 255, 0.35);
  --accent2: #ff6d9b;
  --accent2-glow: rgba(255, 109, 155, 0.3);
  --ring-track: rgba(255, 255, 255, 0.06);
  --ring-fill: #7c6dff;
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Outfit', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-family: var(--font-display);
  color: var(--text-primary);
  overflow: hidden;
}

/* ============================================================
   背景光暈
   ============================================================ */
.clock-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 48px 40px;
}

.glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124, 109, 255, 0.18) 0%, transparent 70%);
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  animation: pulse 4s ease-in-out infinite;
}

.glow-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 109, 155, 0.12) 0%, transparent 70%);
  bottom: 40px;
  right: -80px;
  animation: pulse 6s ease-in-out infinite reverse;
}

.glow-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(80, 200, 255, 0.1) 0%, transparent 70%);
  top: 60px;
  left: -60px;
  animation: pulse 5s ease-in-out infinite 2s;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

.glow-2 { animation-name: pulse2; }
@keyframes pulse2 {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* ============================================================
   日期卡片
   ============================================================ */
.date-card {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 14px 36px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  backdrop-filter: blur(20px);
}

.date-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.date-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-primary);
  line-height: 1;
}

.weekday-value {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin-top: 8px;
  text-transform: uppercase;
}

/* ============================================================
   時鐘主體
   ============================================================ */
.clock-card {
  position: relative;
  z-index: 1;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  backdrop-filter: blur(20px);
}

/* 環形進度（秒鐘刻度感） */
.clock-ring {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 320px;
  height: 320px;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--ring-track);
  stroke-width: 3;
}

.ring-progress {
  fill: none;
  stroke: var(--ring-fill);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 659;
  stroke-dashoffset: 659;
  filter: drop-shadow(0 0 6px var(--accent-glow));
  transition: stroke-dashoffset 0.5s ease;
}

/* 時分秒數值 */
.time-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 2;
}

.time-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-value {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -2px;
}

.time-label {
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
}

.colon {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 18px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* AM / PM 徽章 */
.ampm-badge {
  position: absolute;
  bottom: 40px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--accent2);
  text-transform: uppercase;
  background: rgba(255, 109, 155, 0.1);
  border: 1px solid rgba(255, 109, 155, 0.25);
  padding: 4px 14px;
  border-radius: 30px;
}

/* ============================================================
   響應式
   ============================================================ */
@media (max-width: 480px) {
  .clock-card {
    width: 240px;
    height: 240px;
  }
  .clock-ring {
    width: 260px;
    height: 260px;
  }
  .time-value {
    font-size: 36px;
  }
  .colon {
    font-size: 36px;
  }
  .date-value {
    font-size: 22px;
  }
}
