/* fallback */
@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: url(materialicons.woff2) format('woff2');
}

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -moz-font-feature-settings: 'liga';
  -moz-osx-font-smoothing: grayscale;
}

/* Light Theme Colors */
:root {
  --bg: #f5f5f5;
  --text: #333;
  --timestamp-color: #3f51b5;
  --footnote-color: #666;
  --icon-color: #3f51b5;
  --icon-hover: #283593;
  --toast-bg: #333;
  --toast-color: #fff;
}

/* Dark Theme Colors */
.dark-mode {
  --bg: #121212;
  --text: #eee;
  --timestamp-color: #9fa8c9;
  --footnote-color: #aaa;
  --icon-color: #9fa8c9;
  --icon-hover: #c5cae9;
  --toast-bg: #1e1e1e;
  --toast-color: #fff;
}

/* Base Styles */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Roboto', sans-serif;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.timestamp-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

.timestamp-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.center-text {
  font-size: 4.2rem;
  font-weight: 700;
  color: var(--timestamp-color);
  font-family: 'Roboto', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.05em;
  text-transform: uppercase;
  font-smooth: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: translateZ(0);
  backface-visibility: hidden;
  margin: 0;
  padding: 0;
}

.digit {
  display: inline-block;
  width: 0.6em;
  text-align: center;
  /* Enable GPU acceleration for animations */
  transform: translateZ(0);
  will-change: transform, opacity;
  /* Optional: for smoother animation */
  backface-visibility: hidden;
}

@keyframes pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.digit.pop {
  animation: pop 0.15s ease-in-out;
}

.copy-icon {
  font-size: 2.5rem;
  color: var(--icon-color);
  cursor: pointer;
  transition: color 0.3s ease;
}

.copy-icon:hover {
  color: var(--icon-hover);
}

.footnote {
  position: absolute;
  bottom: 0;
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  color: var(--footnote-color);
  padding: 8px 0;
}

/* Tooltip */
.tooltip {
  position: relative;
  cursor: pointer;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 160px;
  background: #333;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 5px 8px;
  position: absolute;
  z-index: 9999;
  bottom: 125%;
  left: 50%;
  margin-left: -80px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.875rem;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Snackbar */
.snackbar {
  visibility: hidden;
  min-width: 250px;
  background-color: var(--toast-bg);
  color: var(--toast-color);
  text-align: center;
  border-radius: 2px;
  padding: 12px;
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 30px;
  margin-left: -125px;
  opacity: 0;
  transition: opacity 0.6s ease;
  font-size: 0.875rem;
}

.snackbar.show {
  visibility: visible;
  opacity: 1;
}

/* Animation */
.pop {
  animation: pop-animation 0.3s ease;
}

@keyframes pop-animation {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* HTMX Indicator */
.htmx-indicator {
  position: relative;
  right: 0.41rem;
  top: 0rem;
  z-index: 1000;
  pointer-events: none;
}

.htmx-indicator::after {
  content: "⏳";
  font-size: 2.3rem;
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}