/* Dark Theme Upload Page */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #121212;
  color: #e0e0e0;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

header {
  background: #1f1f1f;
  padding: 0.2rem;
  text-align: center;
  border-bottom: 2px solid #333;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

h1 {
  color: #9a42ff;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

form {
  margin-top: 1rem;
  margin-bottom: 1rem;
  background-color: #1f1f1f;
  padding: 2rem;
  border-radius: 12px;
  border: 2px solid #333;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: fadeIn 0.6s ease-in-out;
}

input[type="text"],
input[type="password"],
input[type="file"] {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #444;
  background-color: #1e1e1e;
  color: #e0e0e0;
  font-size: 1rem;
  outline: none;
  transition: border 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="file"]:focus {
  border-color: #9a42ff;
}

button {
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  background-color: #9a42ff;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

a {
  color: #9a42ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button:hover {
  background-color: #b05eff;
  transform: scale(1.03);
}

::selection {
  background: #9a42ff;
  color: #ffffff;
}

footer {
  text-align: center;
  padding: 1.5rem;
  background: #1f1f1f;
  border-top: 2px solid #333;
  margin-top: auto;
  color: #888;
  font-size: 0.9rem;
}

/* Simple fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Overlay Spinner --- */
#loadingOverlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  color: #e0e0e0;
  font-size: 1.2rem;
  gap: 1rem;
}

#loadingOverlay.hidden {
  display: none;
}

.spinner {
  width: 60px; height: 60px;
  border: 6px solid #333;
  border-top-color: #9a42ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Notifications */
#notification {
  margin-bottom: 1rem;
  width: 100%;
  max-width: 480px;
  text-align: center;
}

#notification.hidden {
  display: none;
}

#notification .success,
#notification .error {
  padding: 1rem;
  border-radius: 8px;
  font-weight: bold;
  animation: fadeIn 0.4s ease-in-out;
}

#notification .success {
  background: #1e3a1e;
  border: 2px solid #2ecc71;
  color: #2ecc71;
}

#notification .error {
  background: #3a1e1e;
  border: 2px solid #e74c3c;
  color: #e74c3c;
}

#loadingOverlay {
  z-index: 1000; /* ensure it's above everything */
}

/* #progressContainer.hidden {
  display: none;
} */

#progressBar {
  height: 20px;
  background: #9a42ff;
  width: 0%;
  transition: width 0.2s;
}


/* Keyframes */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0);    }
}
