/* Global Reset */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Flex layout to push footer to bottom */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: white;
  text-align: center;
}

main {
  flex: 1;
}

/* Background */
body {
  background-image: url('../images/red.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

html.dark body {
  background-image: none;
  background-color: #111827;
}

/* Preloader */
#preloader {
  background: #ffffff;
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border-left-color: #4B5563;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Theme Toggle Button */
#theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
}

/* Footer */
footer {
  text-align: center;
  color: white;
  font-size: 0.875rem;
  opacity: 0.8;
  padding: 10px 0;
}
