/* Reset & Base */

* {
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #232323, #252525);
  color: #eaeaea;
}

/* Container */

.container {
  max-width: 560px;
  margin: 60px auto;
  padding: 32px;
  background: rgba(50,50,50,0.95);
  border-radius: 14px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255,255,255,0.05);
}

/* Headings */

h2 {
  text-align: center;
  font-size: 24px;
  letter-spacing: 0.5px;
  margin-bottom: 30px;
}

h3 {
  margin-top: 30px;
  font-size: 16px;
  text-transform: uppercase;
  color: #9ab6ff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 6px;
}

/* Info note */

.note {
  font-size: 13px;
  color: #b5b5b5;
  text-align: center;
  margin-bottom: 20px;
}

.note span {
  color: #ff5a5a;
  font-weight: 600;
}

/* Labels */

label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #bfbfbf;
}

label.required::after {
  content: " *";
  color: #ff5a5a;
}

/* Inputs */

input, textarea, select {
  width: 100%;
  margin-top: 6px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: #0f0f0f;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  transition: 0.25s;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* Focus */

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #4f7cff;
  box-shadow: 0 0 0 2px rgba(79,124,255,0.25);
}

/* Readonly */

input[readonly] {
  background: #161616;
  color: #9e9e9e;
}

/* Button */

button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2d6cff, #1b49c7);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: linear-gradient(135deg, #138400, #368c01);
  transition: 0.3s;
}

button:active {
  transform: translateY(0);
}

/* Status messages */

#status, #loginError {
  text-align: center;
  font-size: 13px;
  margin-top: 10px;
}

#loginError {
  color: #ff5a5a;
}

#status {
  color: #6aff95;
}

/* Login Box */

#loginBox {
  animation: fadeIn 0.6s ease;
}

/* Form animation */

#citationForm {
  animation: slideUp 0.6s ease;
}

/* Animations */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Prevent browser validation colors */

input:valid, textarea:valid, select:valid {
  background: #0f0f0f;
  color: #fff;
}

input:invalid, textarea:invalid, select:invalid {
  background: #0f0f0f;
  color: #fff;
}

/* Chrome autofill override */

input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #0f0f0f inset !important;
  -webkit-text-fill-color: #ffffff !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* Button loader */

.loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
}

/* Loading state */

button.loading {
  pointer-events: none;
  opacity: 0.85;
}

button.loading .btn-text {
  opacity: 0.8;
}

button.loading .loader {
  display: inline-block;
}

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

/* Alert base */

.alert {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  animation: slideFade 0.4s ease;
}

/* Success */

.alert.success {
  display: block;
  background: rgba(0, 160, 80, 0.15);
  border: 1px solid rgba(0, 160, 80, 0.4);
  color: #6aff95;
}

/* Error */

.alert.error {
  display: block;
  background: rgba(200, 60, 60, 0.15);
  border: 1px solid rgba(200, 60, 60, 0.4);
  color: #ff8a8a;
}

@keyframes slideFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

