:root {
  --color-background-darkest: #0a0a1a;
  --color-background-mid: #1a0a2e;
  --color-background-card: rgba(20, 20, 40, 0.7);
  --color-primary-text: #ffffff;
  --color-secondary-text: rgba(255, 255, 255, 0.7);
  --color-purple-light: #a78bfa;
  --color-purple-dark: #8b5cf6;
  --gradient-primary: linear-gradient(
    135deg,
    var(--color-purple-dark) 0%,
    var(--color-purple-light) 100%
  );
  --color-border-subtle: rgba(139, 92, 246, 0.2);
  --color-error: #ef4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--color-background-darkest);
  color: var(--color-primary-text);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.box {
  background: var(--color-background-mid);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 100%;
}

.login-form-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

h1 {
  margin-bottom: 20px;
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

label {
  font-size: 0.9rem;
  color: var(--color-secondary-text);
  font-weight: 500;
}

.input-wrapper {
  position: relative;
}

input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  background: var(--color-background-card);
  color: var(--color-primary-text);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

input:focus {
  outline: none;
  border-color: var(--color-purple-light);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

input.error {
  border-color: var(--color-error);
}

.error-message {
  color: var(--color-error);
  font-size: 0.85rem;
  margin-top: 5px;
  display: none;
}

.error-message.show {
  display: block;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-secondary-text);
  cursor: pointer;
  padding: 5px;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.toggle-password:hover {
  color: var(--color-purple-light);
}

button.btn {
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--gradient-primary);
  color: var(--color-primary-text);
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.1s ease;
  font-size: 1rem;
  margin-top: 10px;
}

button.btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

button.btn:active:not(:disabled) {
  transform: translateY(0);
}

button.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.back-to-home {
  display: block;
  margin-top: 15px;
  font-size: 0.9rem;
  text-align: center;
  color: var(--color-purple-light);
  text-decoration: none;
  font-weight: 500;
  transition: text-decoration 0.2s ease;
}

.back-to-home:hover {
  text-decoration: underline;
}

.message {
  color: var(--color-secondary-text);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 10px;
  font-weight: 600;
}

.message a {
  color: var(--color-purple-light);
  text-decoration: none;
  font-weight: bold;
  transition: text-decoration 0.2s ease;
}

.message a:hover {
  text-decoration: underline;
}
