/* ==========================================================================
   ADAPTTEST.online - Authentication Modal & Profile Badge Styles
   ========================================================================== */

/* Auth Modal Overlay & Backdrop */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

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

.auth-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 9, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Auth Modal Container */
.auth-modal-container {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 36px 32px 32px 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7),
              0 0 40px rgba(0, 242, 254, 0.15);
  color: #f8fafc;
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

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

/* Glowing Top Accent Bar */
.auth-modal-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #00f2fe 0%, #9d4edd 100%);
}

/* Close Button */
.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.auth-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* Modal Header */
.auth-modal-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-brand-logo {
  height: 36px;
  margin-bottom: 12px;
}

.auth-modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}

.auth-modal-subtitle {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0;
}

/* Google OAuth Button */
.auth-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
  color: #1e293b;
  border: none;
  border-radius: 12px;
  padding: 13px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-google-btn:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

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

.google-icon {
  width: 20px;
  height: 20px;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-divider span {
  padding: 0 14px;
}

/* Tabs: Sign In / Sign Up */
.auth-tabs {
  display: flex;
  background: rgba(30, 41, 59, 0.7);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.auth-tab-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Form Groups */
.auth-form-group {
  margin-bottom: 16px;
  text-align: left;
}

.auth-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-input-wrapper {
  position: relative;
}

.auth-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.95rem;
  color: #ffffff;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.auth-input:focus {
  outline: none;
  border-color: #00f2fe;
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.2);
}

.auth-input::placeholder {
  color: #64748b;
}

/* Submit Button */
.auth-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  color: #0f172a;
  border: none;
  border-radius: 12px;
  padding: 13px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: transform 0.1s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.3);
}

.auth-submit-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 242, 254, 0.4);
}

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

/* Alert Notification Box */
.auth-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
  animation: fadeIn 0.3s ease;
}

.auth-alert.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.auth-alert.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

/* Navbar Profile Badge & Controls */
.nav-auth-btn {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15) 0%, rgba(157, 78, 221, 0.15) 100%);
  border: 1px solid rgba(0, 242, 254, 0.4);
  color: #00f2fe;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-auth-btn:hover {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.3) 0%, rgba(157, 78, 221, 0.3) 100%);
  border-color: #00f2fe;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
  color: #ffffff;
}

/* User Profile Badge (Logged In) */
.user-profile-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 5px 12px 5px 6px;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.user-profile-badge:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(0, 242, 254, 0.5);
}

.user-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #00f2fe;
}

.user-name-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f8fafc;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 180px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1000;
}

.user-profile-badge.open .user-dropdown-menu {
  display: block;
  animation: fadeIn 0.2s ease;
}

.dropdown-item {
  width: 100%;
  background: transparent;
  border: none;
  color: #cbd5e1;
  padding: 8px 12px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-item:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

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