/**
 * Modular Auth Modal Styles
 * EXACT COPY of legacy styles but with .modular- prefix
 * This ensures identical appearance while maintaining independence
 */

/* Utility Classes */
.modular-hidden {
  display: none !important;
}

/* Using .hidden for compatibility with existing HTML structure */
.hidden {
  display: none !important;
}

/* Auth Modal Styles - Glassmorphism Effect */
.modular-auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modular-auth-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modular-auth-modal-overlay.active .modular-auth-modal {
  transform: scale(1) translateY(0);
}

.modular-auth-modal {
  background: rgba(26, 26, 46, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: 90%;
  max-width: 450px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.7) translateY(50px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Auth Modal Header */
.modular-auth-header {
  padding: 30px 30px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modular-auth-header h2 {
  font-family: var(--font-primary);
  font-size: 24px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.modular-auth-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modular-auth-close:hover {
  background: rgba(233, 69, 96, 0.2);
  color: var(--primary-red);
  transform: rotate(90deg);
}

/* Auth Modal Content */
.modular-auth-content {
  padding: 30px;
  overflow-y: auto;
  flex: 1;
  border-radius: 0 0 20px 20px;
}

.modular-auth-modal-overlay.active .modular-auth-modal {
  transform: scale(1) translateY(0);
}

/* Animation */
@keyframes modalBounce {
  0% {
    transform: scale(0.7) translateY(50px);
    opacity: 0;
  }
  60% {
    transform: scale(1.05) translateY(-10px);
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.modular-auth-modal-overlay.active .modular-auth-modal {
  animation: modalBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modular-auth-form h3 {
  font-family: var(--font-primary);
  font-size: 20px;
  margin-bottom: 25px;
  text-align: center;
  color: var(--text-primary);
}

/* Form containers */
.modular-auth-form-container {
  /* No specific styles in legacy */
}

.modular-auth-form-container.hidden {
  display: none;
}

/* Input groups */
.modular-input-group {
  position: relative;
  margin-bottom: 20px;
}

.modular-input-group i {
  position: absolute;
  left: 15px;
  top: 18px;
  color: var(--text-secondary);
  font-size: 16px;
  z-index: 1;
}

.modular-input-group input {
  width: 100%;
  padding: 15px 15px 15px 45px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 16px;
  font-family: var(--font-secondary);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.modular-input-group input:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.modular-input-group input::placeholder {
  color: var(--text-muted);
}

/* Input validation requirements */
.modular-input-requirement {
  display: block;
  font-size: 11px;
  color: #888;
  margin-top: 5px;
  margin-left: 45px;
  line-height: 1.3;
  opacity: 0.8;
}

.modular-input-group:focus-within .modular-input-requirement {
  color: var(--accent-blue);
  opacity: 1;
}

.modular-input-group input:invalid:not(:placeholder-shown) {
  border-color: var(--primary-red);
}

.modular-input-group input:valid:not(:placeholder-shown) {
  border-color: var(--success-color);
}

/* Auth buttons */
.modular-auth-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
  position: relative;
  overflow: hidden;
}

.modular-auth-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.modular-auth-btn:hover::before {
  left: 100%;
}

.modular-auth-btn.primary {
  background: linear-gradient(135deg, var(--primary-red), var(--accent-purple));
  color: var(--text-primary);
  box-shadow: 0 8px 25px rgba(233, 69, 96, 0.3);
}

.modular-auth-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(233, 69, 96, 0.4);
  background: linear-gradient(135deg, #ff4d6d, #a569bd);
}

.modular-auth-btn.google {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modular-auth-btn.google:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.modular-auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Auth divider */
.modular-auth-divider {
  text-align: center;
  margin: 25px 0;
  position: relative;
}

.modular-auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.modular-auth-divider span {
  background: rgba(26, 26, 46, 0.9);
  padding: 0 15px;
  position: relative;
  color: var(--text-muted);
  font-size: 14px;
  font-family: var(--font-secondary);
}

/* Auth switch */
.modular-auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.modular-auth-switch a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.modular-auth-switch a:hover {
  color: var(--primary-red);
}

/* Form messages */
.modular-form-message {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-secondary);
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.modular-form-message.error {
  background: rgba(233, 69, 96, 0.1);
  color: var(--primary-red);
  border: 1px solid rgba(233, 69, 96, 0.3);
}

.modular-form-message.success {
  background: rgba(74, 222, 128, 0.1);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.2),
    0 0 8px rgba(74, 222, 128, 0.3);
}

/* Auth info message */
.modular-auth-info-message {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 25px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.modular-auth-info-message i {
  color: var(--accent-blue);
  font-size: 20px;
  margin-top: 2px;
}

.modular-auth-info-message p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  font-family: var(--font-secondary);
}

/* Steam Connection Prompt Modal */
.modular-steam-prompt-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(10px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.modular-steam-prompt-modal.active {
  opacity: 1;
  visibility: visible;
}

.modular-steam-prompt-content {
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modular-steam-prompt-modal.active .modular-steam-prompt-content {
  transform: scale(1);
}

.modular-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modular-modal-close:hover {
  background: rgba(233, 69, 96, 0.2);
  color: var(--primary-red);
  transform: rotate(90deg);
}

.modular-steam-prompt-icon {
  text-align: center;
  margin-bottom: 30px;
}

.modular-steam-prompt-icon i {
  font-size: 80px;
  background: linear-gradient(135deg, #00adee, #0077be);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(0, 173, 238, 0.5));
}

.modular-steam-prompt-content h2 {
  font-family: var(--font-primary);
  font-size: 32px;
  text-align: center;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modular-steam-prompt-content > p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  line-height: 1.8;
  text-align: center;
  margin-bottom: 30px;
  font-family: var(--font-secondary);
  font-weight: 400;
}

.modular-steam-prompt-benefits {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
}

.modular-steam-prompt-benefits h3 {
  font-family: var(--font-primary);
  font-size: 20px;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.modular-steam-prompt-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modular-steam-prompt-benefits li {
  color: var(--text-secondary);
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 15px;
  font-family: var(--font-secondary);
}

.modular-steam-prompt-benefits li i {
  color: var(--accent-blue);
  font-size: 20px;
  width: 30px;
  text-align: center;
}

.modular-steam-prompt-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.modular-btn {
  padding: 15px 25px;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
  font-family: var(--font-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.modular-btn i {
  font-size: 20px;
}

/* Larger Steam icon on primary button */
.modular-btn.primary i.fa-steam {
  font-size: 24px;
}

.modular-btn.primary {
  background: linear-gradient(135deg, #00adee, #171a21);
  color: var(--text-primary);
  box-shadow: 0 8px 25px rgba(0, 173, 238, 0.3);
}

.modular-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 173, 238, 0.4);
}

.modular-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modular-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.modular-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Loading animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Font Awesome spin animation - applies to any element with fa-spin class */
.fa-spin {
  animation: spin 1s linear infinite;
}

.modular-auth-btn i.fa-spinner,
.modular-btn i.fa-spinner {
  animation: spin 1s linear infinite;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .modular-auth-modal {
    width: 95%;
    margin: 20px;
  }

  .modular-auth-header {
    padding: 20px 20px 15px;
  }

  .modular-auth-content {
    padding: 20px;
  }

  .modular-steam-prompt-content {
    padding: 30px 20px;
  }

  .modular-steam-prompt-buttons {
    grid-template-columns: 1fr;
  }
}

/* Steam Info Message - duplicate removed, see lines 352-375 */

/* Form Messages - duplicate removed, see lines 325-349 */
