/* CSS Variables for consistent theming */
:root {
  --primary-text: #ffffff;
  --secondary-text: #cccccc;
  --primary-bg: #101010;
  --secondary-bg: #181818;
  --border-radius: 12px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  --hover-box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  --inner-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  --transition-speed: 0.2s;
  --transition-timing: ease-in-out;
  --link-color: #a78bfa;
  --hover-accent-color: #c4b5fd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  background-color: var(--primary-bg);
  color: var(--primary-text);
  min-height: 100vh;
}

.auth-page-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px;
  box-sizing: border-box;
  background-color: var(--primary-bg);
}

.auth-card {
  background-color: var(--secondary-bg);
  border-radius: var(--border-radius);
  padding: 35px 40px;
  box-shadow: var(--box-shadow);
  width: 100%;
  max-width: 450px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title {
  color: var(--primary-text);
  font-size: 1.5rem;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 30px;
  text-align: center;
}

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

.input-group {
  width: 100%;
  position: relative;
}

.label {
  display: block;
  font-size: 0.8rem;
  color: #aaa;
  margin-bottom: 6px;
  text-align: left;
}

.input-field {
  width: 100%;
  padding: 12px 15px;
  border-radius: 12px;
  border: none;
  background-color: transparent;
  color: var(--secondary-text);
  box-shadow: var(--inner-shadow);
  font-weight: 400;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.input-field::placeholder {
  color: var(--secondary-text);
  font-weight: 400;
  opacity: 0.7;
}

.input-field:focus {
  outline: none;
  border: none;
  background-color: rgba(0, 23, 49, 0.8);
}

.password-input-wrapper {
  position: relative;
  width: 100%;
}

.password-input-wrapper .input-field {
  padding-right: 50px;
}

.visibility-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visibility-icon {
  width: 18px;
  height: 18px;
  color: var(--secondary-text);
  opacity: 0.7;
}

.visibility-toggle:hover .visibility-icon {
  opacity: 1;
}

.submit-button {
  padding: 10px 20px;
  border-radius: var(--border-radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all var(--transition-speed) var(--transition-timing);
  background-color: var(--secondary-bg);
  color: var(--secondary-text);
  box-shadow: var(--box-shadow);
  margin-top: 15px;
  width: 100%;
}

.submit-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--hover-box-shadow);
  background-color: var(--secondary-bg);
  border-color: transparent;
}

.submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: translateY(0);
}

.error-message {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  color: #ff5555;
  background-color: rgba(255, 85, 85, 0.1);
  border-radius: 8px;
  text-align: center;
  font-size: 0.85rem;
}

.success-message {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  color: #55ff55;
  background-color: rgba(85, 255, 85, 0.1);
  border-radius: 8px;
  text-align: center;
  font-size: 0.85rem;
}

.divider {
  width: 100%;
  text-align: center;
  margin: 20px 0;
  color: #666;
  font-size: 0.85rem;
  position: relative;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 30px);
  height: 1px;
  background-color: #333;
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

.anonymous-button {
  background-color: #242424;
  border: 1px solid #333;
  margin-top: 0;
}

.anonymous-button:hover {
  background-color: #2a2a2a;
  border-color: #444;
}

.extra-links {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.bottom-link {
  color: var(--link-color);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color var(--transition-speed) var(--transition-timing);
}

.bottom-link:hover {
  text-decoration: underline;
  color: var(--hover-accent-color);
}

.link-separator {
  color: #666;
  font-size: 0.85rem;
}

/* Loading state styles */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Password requirements styling */
.password-requirements {
  margin: 15px 0;
  padding: 12px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 3px solid #333;
}

.password-requirements p {
  margin: 0 0 8px 0;
  font-size: 0.8rem;
  color: #aaa;
  font-weight: 500;
}

.password-requirements ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.password-requirements li {
  font-size: 0.75rem;
  color: #666;
  padding: 2px 0;
  position: relative;
  padding-left: 20px;
  transition: color var(--transition-speed) var(--transition-timing);
}

.password-requirements li::before {
  content: '○';
  position: absolute;
  left: 0;
  color: #666;
  transition: all var(--transition-speed) var(--transition-timing);
}

.password-requirements li.requirement-met {
  color: #55ff55;
}

.password-requirements li.requirement-met::before {
  content: '✓';
  color: #55ff55;
}

.password-requirements li.requirement-not-met {
  color: #ff5555;
}

.password-requirements li.requirement-not-met::before {
  content: '✗';
  color: #ff5555;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .auth-page-container {
    padding: 20px;
  }
  
  .auth-card {
    padding: 25px 30px;
  }
  
  .title {
    font-size: 1.3rem;
    margin-bottom: 25px;
  }
}
