@font-face {
  font-family: 'OPTIGamma';
  src: url('../fonts/OPTIGamma.otf') format('opentype');
}

:root {
  --bg: #e0e0e0;
  --shadow-light: #ffffff;
  --shadow-dark: #a3a3a3;
  --text-color: #333;
}

html, body {
  background: transparent !important;
}

body {
  background-color: var(--bg);
  margin: 0;
  padding: 20px;
  color: var(--text-color);
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  font-weight: 400;
  letter-spacing: 2px;
}

h4 {
  font-weight: 500;
}

.neumorphic {
  background: var(--bg);
  border-radius: 12px;
  box-shadow: 6px 6px 12px var(--shadow-dark),
              -6px -6px 12px var(--shadow-light);
  border: none;
  padding: 10px 15px;
  font-size: 1em;
  color: var(--text-color);
}

input[type="color"] {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
}

#setup {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  max-width: 1000px;
  width: 100%;
}

.control-group {
  display: flex;
  flex-direction: column;
  flex: 1 1 200px;
}

label {
  margin-bottom: 5px;
  letter-spacing: 2px;
}

.button-group {
  margin-top: 20px;
  display: flex;
  gap: 15px;
  justify-content: center;
}

button.neumorphic:hover {
  cursor: pointer;
  filter: brightness(95%);
}

#timelapseOverlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100vw;
  height: 100vh;
  background: rgba(224, 224, 224, 0.95);
  backdrop-filter: blur(5px);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#counter-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-width: 100vw;
  max-height: 100vh;
}

#counter {
  display: inline-block;
  font-family: 'OPTIGamma', opentype;
  font-size: min(20vw, 45vh) !important;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  letter-spacing: 5px;
  color: var(--text-color);
  background: var(--bg);
  padding: 20px;
  border-radius: 20px;
  box-shadow: inset 6px 6px 12px var(--shadow-dark),
              inset -6px -6px 12px var(--shadow-light);
  transform-origin: center;
}

.view-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.hidden {
  display: none !important;
}

#status {
  margin-top: 20px;
  font-style: italic;
  color: #444;
  text-align: center;
}

#loadingOverlay,
#exportOverlay {
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(224, 224, 224, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  backdrop-filter: blur(6px);
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  text-align: center;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid var(--shadow-light);
  border-top: 6px solid var(--shadow-dark);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pop {
  0% { transform: scale(0.7); opacity: 0.4; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}
