@import url('styles.css');

/* ============================================================
   WebDost App — 3D Glassmorphism Auth Stylesheet
   ============================================================ */

@import url('/css/styles.css');

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-container {
  width: 100%;
  max-width: 480px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-card);
  padding: 40px 36px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.auth-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.top-header img {
  height: 38px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3));
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 6px;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-header p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.auth-form {
  width: 100%;
}

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

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition);
}

.form-group input:focus {
  border-color: var(--theme-bright);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
  background: rgba(255, 255, 255, 0.07);
}

.rem_forgot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 0.86rem;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  accent-color: var(--theme);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.forgot-password a {
  color: var(--theme-bright);
  font-size: 0.86rem;
}

.btn-primary {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
}

/* Password Input Wrapper & Action Buttons */
.password-input-wrapper {
  position: relative !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
}

.password-input-wrapper input {
  width: 100% !important;
  padding-right: 76px !important;
}

.password-actions,
.toggle-password-btn {
  position: absolute !important;
  right: 8px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
  z-index: 5 !important;
  background: none !important;
  border: none !important;
}

.btn-input-action,
.toggle-password-btn,
.btn-input-action.toggle-btn,
.btn-input-action.generate-btn {
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: var(--text-muted) !important;
  cursor: pointer !important;
  font-size: 0.95rem !important;
  padding: 6px 8px !important;
  border-radius: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.btn-input-action:hover,
.toggle-password-btn:hover {
  color: var(--theme-bright) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}






/* Social Auth Flexbox & Buttons */
.social-auth-buttons {
  display: flex;
  gap: 10px;
  width: 100%;
}

.btn-social {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-social:hover {
  background: var(--glass-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.google-icon,
.github-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-github {
  color: var(--text);
}

.btn-github .github-icon {
  fill: currentColor;
}

.btn-github:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-passkey {
  color: var(--text);
}

.btn-passkey i {
  font-size: 1.15rem;
  color: var(--accent);
}

.btn-passkey:hover {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

/* Light Theme Social Buttons & Icons */
[data-theme="light"] .btn-social {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(203, 213, 225, 0.8);
  color: #0f172a;
}

[data-theme="light"] .btn-social:hover {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.9);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .btn-github {
  color: #24292f;
}

[data-theme="light"] .btn-github .github-icon {
  fill: #24292f;
}

[data-theme="light"] .btn-google {
  color: #0f172a;
}


/* Glassmorphic Modal Dialog */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.modal-overlay.hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-card);
  padding: 32px 28px;
  position: relative;
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.92) translateY(10px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--text);
}


.separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0;
  color: var(--text-dim);
  font-size: 0.84rem;
}

.separator::before,
.separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--glass-border);
}

.separator span {
  padding: 0 12px;
}

.auth-toggle {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-toggle a {
  color: var(--theme-bright);
  font-weight: 600;
  margin-left: 6px;
}

/* Input Validation States */
.form-group input.valid {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.05);
}

.form-group input.error {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.05);
}

/* Password Strength Meter */
.password-strength {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  margin-top: 8px;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  transition: width 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}

.password-strength-bar.weak {
  width: 33.33%;
  background: linear-gradient(90deg, #ef4444, #f87171);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.password-strength-bar.medium {
  width: 66.66%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.password-strength-bar.strong {
  width: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.password-strength-text {
  font-size: 0.8rem;
  margin-top: 6px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.password-strength-text.weak {
  color: #f87171;
}

.password-strength-text.medium {
  color: #fbbf24;
}

.password-strength-text.strong {
  color: #34d399;
}

/* Status Indicators (Username & Fields) */
.field-status,
.username-status {
  font-size: 0.8rem;
  margin-top: 6px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.25s ease;
}

.field-status.valid,
.username-status.available,
.username-status.valid {
  color: #34d399;
}

.field-status.error,
.username-status.taken,
.username-status.error {
  color: #f87171;
}

.field-status.checking,
.username-status.checking {
  color: #fbbf24;
}

/* ============================================================
   RESPONSIVE ENHANCEMENTS FOR PHONE & TABLET
   ============================================================ */
@media (max-width: 640px) {
  body {
    padding: 16px 12px;
    align-items: center;
  }

  .auth-container {
    padding: 28px 20px;
    border-radius: var(--radius);
    max-width: 100%;
  }

  .top-header {
    margin-bottom: 18px;
  }

  .auth-header {
    margin-bottom: 22px;
  }

  .auth-header h1 {
    font-size: 1.6rem;
  }

  .auth-header p {
    font-size: 0.86rem;
  }

  .social-auth-buttons {
    gap: 8px;
  }

  .btn-social {
    padding: 10px 6px;
    font-size: 0.82rem;
    gap: 6px;
    min-width: 0;
  }

  .google-icon,
  .github-icon {
    width: 18px;
    height: 18px;
  }

  .btn-passkey i {
    font-size: 1.05rem !important;
  }

  .rem_forgot {
    margin-bottom: 20px;
  }
}

@media (max-width: 400px) {
  body {
    padding: 12px 8px;
  }

  .auth-container {
    padding: 22px 14px;
    border-radius: 14px;
  }

  .top-header {
    margin-bottom: 14px;
  }

  .top-header img {
    height: 32px;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .auth-header {
    margin-bottom: 18px;
  }

  .auth-header h1 {
    font-size: 1.45rem;
  }

  .auth-header p {
    font-size: 0.82rem;
  }

  .social-auth-buttons {
    gap: 5px;
  }

  .btn-social {
    padding: 9px 3px;
    font-size: 0.74rem;
    gap: 4px;
    white-space: nowrap;
    border-radius: 6px;
  }

  .google-icon,
  .github-icon {
    width: 15px;
    height: 15px;
  }

  .btn-passkey i {
    font-size: 0.95rem !important;
  }

  .separator {
    margin: 18px 0;
  }

  .separator span {
    font-size: 0.76rem;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .form-group label {
    font-size: 0.82rem;
    margin-bottom: 6px;
  }

  .form-group input {
    padding: 10px 12px;
    font-size: 0.88rem;
  }

  .password-input-wrapper input {
    padding-right: 68px !important;
  }

  .btn-input-action {
    padding: 4px 6px !important;
    font-size: 0.85rem !important;
  }

  .rem_forgot {
    font-size: 0.78rem;
    gap: 4px;
    margin-bottom: 18px;
  }

  .checkbox-group label {
    font-size: 0.78rem;
  }

  .forgot-password a {
    font-size: 0.78rem;
  }

  .btn-primary {
    padding: 11px;
    font-size: 0.95rem;
  }

  .bottom-text {
    font-size: 0.82rem;
    margin-top: 20px;
  }
}