/* css/pages/history.css — History Page with SVG Animation */

/* === Empty State Layout === */
.history-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-10) var(--space-5);
}

.history-empty-state__title {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-2);
  background: linear-gradient(135deg, var(--color-text), var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.history-empty-state__text {
  font-size: var(--fs-base);
  color: var(--color-text-secondary);
  max-width: 360px;
  margin-bottom: var(--space-6);
}

.history-empty-state__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary-ghost);
  border: 1px solid rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.15);
  border-radius: var(--radius-full);
  color: var(--color-primary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: all var(--transition-base);
}

.history-empty-state__cta:hover {
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.12);
  border-color: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.25);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* === SVG Animation Container === */
.history-empty-animation {
  width: 160px;
  height: 160px;
  margin-bottom: var(--space-4);
  position: relative;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.history-empty-animation:hover {
  transform: scale(1.1) translateY(-4px);
}

.history-empty-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* ---- Circle draws in ---- */
.hist-svg-ring {
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  animation: histRingDraw 0.5s ease-out 0.05s forwards;
}

@keyframes histRingDraw {
  to { stroke-dashoffset: 0; }
}

/* ---- Disc fades in ---- */
.hist-svg-disc {
  opacity: 0;
  animation: histDiscFade 0.35s ease 0.15s forwards;
}

@keyframes histDiscFade {
  to { opacity: 0.12; }
}

/* ---- Pulse ring ---- */
.hist-svg-pulse {
  transform-origin: center;
  animation: histPulse 3s ease-in-out infinite 0.6s;
  opacity: 0;
}

@keyframes histPulse {
  0% { transform: scale(1); opacity: 0; }
  10% { opacity: 0.4; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* ---- Clock pops out ---- */
.hist-svg-clock {
  transform: scale(0.7);
  opacity: 0;
  transform-origin: 100px 95px;
  animation: histClockPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s forwards;
}

@keyframes histClockPop {
  0% { transform: scale(0.7); opacity: 0; }
  60% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ---- Clock back shadow ---- */
.hist-svg-clock-back {
  opacity: 0;
  animation: histClockBackFade 0.3s ease 0.35s forwards;
}

@keyframes histClockBackFade {
  to { opacity: 1; }
}

/* ---- Minute hand rotation ---- */
.hist-hand-minute {
  transform-origin: 100px 95px;
  animation: histMinuteRotate 8s linear infinite 0.6s;
}

@keyframes histMinuteRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---- Hour hand rotation (slower) ---- */
.hist-hand-hour {
  transform-origin: 100px 95px;
  animation: histHourRotate 48s linear infinite 0.6s;
}

@keyframes histHourRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---- Floating idle ---- */
.history-empty-animation .history-empty-svg {
  animation: histFloat 5s ease-in-out infinite 0.8s;
}

@keyframes histFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ---- Sparkles ---- */
.hist-sparkle {
  opacity: 0;
  animation: histSparklePop 2.2s ease-in-out infinite;
}

.hist-sparkle-1 { animation-delay: 0.4s; }
.hist-sparkle-2 { animation-delay: 0.6s; }
.hist-sparkle-3 { animation-delay: 0.8s; }
.hist-sparkle-4 { animation-delay: 1.0s; }
.hist-sparkle-5 { animation-delay: 0.5s; }

@keyframes histSparklePop {
  0% { opacity: 0; transform: scale(0); }
  15% { opacity: 1; transform: scale(1.3); }
  30% { opacity: 0.8; transform: scale(1); }
  70% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(0); }
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .history-empty-animation {
    width: 120px;
    height: 120px;
  }

  .history-empty-state__title {
    font-size: var(--fs-xl);
  }
}
