/* Helix Games - Authentication UI Styles */

/* Modal Overlay */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.auth-modal-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal Container */
.auth-modal {
  background: #1a1f23;
  border-radius: 16px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  max-width: 450px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
  border: 1px solid rgba(60, 210, 165, 0.2);
}

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

/* Modal Header */
.auth-modal-header {
  padding: 30px 30px 20px;
  border-bottom: 1px solid rgba(60, 210, 165, 0.1);
  position: relative;
}

.auth-modal-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #3cd2a5;
  margin: 0;
  text-align: center;
}

.auth-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px 10px;
  transition: color 0.3s ease;
}

.auth-modal-close:hover {
  color: #3cd2a5;
}

/* Modal Body */
.auth-modal-body {
  padding: 30px;
}

/* Forms */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
}

.auth-form-input {
  padding: 12px 16px;
  background: rgba(60, 210, 165, 0.05);
  border: 1px solid rgba(60, 210, 165, 0.2);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.auth-form-input:focus {
  outline: none;
  border-color: #3cd2a5;
  background: rgba(60, 210, 165, 0.1);
  box-shadow: 0 0 0 3px rgba(60, 210, 165, 0.1);
}

.auth-form-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Error Messages */
.auth-error {
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  color: #ff3b30;
  font-size: 0.9rem;
  display: none;
}

.auth-error.active {
  display: block;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

/* Success Messages */
.auth-success {
  background: rgba(60, 210, 165, 0.1);
  border: 1px solid rgba(60, 210, 165, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  color: #3cd2a5;
  font-size: 0.9rem;
  display: none;
}

.auth-success.active {
  display: block;
}

/* Buttons */
.auth-btn {
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-btn-primary {
  background: #3cd2a5;
  color: #000;
  box-shadow: 0 4px 15px rgba(60, 210, 165, 0.3);
}

.auth-btn-primary:hover {
  background: #5ddbb5;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(60, 210, 165, 0.4);
}

.auth-btn-primary:active {
  transform: translateY(0);
}

.auth-btn-secondary {
  background: transparent;
  color: #3cd2a5;
  border: 1px solid #3cd2a5;
}

.auth-btn-secondary:hover {
  background: rgba(60, 210, 165, 0.1);
}

/* Loading State */
.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Modal Footer */
.auth-modal-footer {
  padding: 20px 30px;
  border-top: 1px solid rgba(60, 210, 165, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.auth-link {
  color: #3cd2a5;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s ease;
}

.auth-link:hover {
  color: #5ddbb5;
  text-decoration: underline;
}

/* Games Dropdown Menu */
.games-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.games-dropdown .menu-toggler {
  cursor: pointer;
}

.games-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: #1a1f23;
  border: 1px solid rgba(60, 210, 165, 0.2);
  border-radius: 8px;
  min-width: 200px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1000;
  overflow: hidden;
}

.games-dropdown-menu.active {
  display: block;
  animation: slideDown 0.2s ease;
}

.games-menu-header {
  padding: 12px 16px;
  background: rgba(60, 210, 165, 0.05);
  border-bottom: 1px solid rgba(60, 210, 165, 0.1);
  color: #3cd2a5;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.games-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(60, 210, 165, 0.05);
}

.games-menu-item:last-child {
  border-bottom: none;
}

.games-menu-item:hover {
  background: rgba(60, 210, 165, 0.1);
  color: #3cd2a5;
  padding-left: 20px;
}

.games-menu-item i {
  font-size: 1.1rem;
  min-width: 20px;
  color: #3cd2a5;
}

.games-menu-item span {
  font-weight: 500;
}

/* Header Auth Controls */
.auth-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-header-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  white-space: nowrap;
}

.auth-header-btn i {
  font-size: 1rem;
}

.auth-header-btn-login {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-header-btn-login:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.auth-header-btn-register {
  background: #3cd2a5;
  color: #000;
  border: 1px solid #3cd2a5;
}

.auth-header-btn-register:hover {
  background: #5ddbb5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(60, 210, 165, 0.3);
}

/* User Menu (Logged In) */
.user-menu {
  position: relative;
  display: inline-block;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(60, 210, 165, 0.1);
  border: 1px solid rgba(60, 210, 165, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.user-menu-trigger:hover {
  background: rgba(60, 210, 165, 0.2);
  border-color: #3cd2a5;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #3cd2a5;
}

.user-name {
  color: #ffffff;
  font-weight: 500;
}

.user-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #1a1f23;
  border: 1px solid rgba(60, 210, 165, 0.2);
  border-radius: 8px;
  min-width: 200px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1000;
}

.user-menu-dropdown.active {
  display: block;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-menu-item {
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(60, 210, 165, 0.05);
}

.user-menu-item:last-child {
  border-bottom: none;
}

.user-menu-item:hover {
  background: rgba(60, 210, 165, 0.1);
  color: #3cd2a5;
}

/* Responsive */
@media (max-width: 768px) {
  .auth-modal {
    margin: 20px;
    max-width: none;
  }
  
  .auth-modal-body,
  .auth-modal-header,
  .auth-modal-footer {
    padding: 20px;
  }
  
  /* Hide button text on mobile, show icons only */
  .auth-header-btn span {
    display: none;
  }
  
  .auth-header-btn {
    padding: 8px 12px;
  }
  
  .auth-header-btn i {
    font-size: 1.1rem;
  }
  
  /* Make user menu compact on mobile */
  .user-name {
    display: none;
  }
  
  .user-menu-trigger {
    padding: 6px;
    gap: 4px;
  }
}
