/**
 * Project Nexus Design System - Fullscreen Layout
 * For: Auth pages, login, signup, etc. (Not logged in)
 */

/* ========================================
   Fullscreen Background Effects
   ======================================== */

.nx-perspective-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  perspective: 600px;
  z-index: 0;
  pointer-events: none;
}

.nx-grid-floor {
  position: absolute;
  width: 300%;
  height: 300%;
  transform: rotateX(75deg) translateZ(-400px);
  transform-origin: center bottom;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.4) 2px, transparent 2px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 2px, transparent 2px);
  background-size: 80px 80px;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
}

.nx-horizon-glow {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  z-index: 1;
  pointer-events: none;
}

.nx-horizon-fade {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 12rem;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.08), transparent);
  z-index: 1;
  pointer-events: none;
}

.nx-orb {
  position: fixed;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  filter: blur(120px);
  animation: nxPulse 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.nx-orb-1 {
  top: 25%;
  left: 25%;
  width: 24rem;
  height: 24rem;
  animation-duration: 8s;
}

.nx-orb-2 {
  bottom: 33%;
  right: 33%;
  width: 24rem;
  height: 24rem;
  animation-duration: 10s;
  animation-delay: 2s;
}

/* ========================================
   Layout Container (Fullscreen Centered)
   ======================================== */

.nx-fullscreen-container {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* ========================================
   Components (Project Nexus Style)
   ======================================== */

.nx-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(20, 20, 20, 0.55);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow: 
    0 8px 32px 0 rgba(0, 0, 0, 0.6),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 1px 0 rgba(0, 0, 0, 0.2);
  animation: nxFadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  width: 100%;
}

.nx-card-sm { padding: 1.5rem; }
.nx-card-lg { padding: 2.5rem; }
.nx-card-xl { padding: 3rem; }

/* Card widths - wider as requested */
.nx-card-narrow { max-width: 24rem; }
.nx-card-wide { max-width: 28rem; }
.nx-card-full { max-width: 32rem; }
.nx-card-xl-width { max-width: 36rem; }  /* Extra wide for auth pages */

/* Icon Container */
.nx-icon-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.3);
}

/* Typography */
.nx-heading {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.nx-heading-sm { font-size: 1.5rem; }
.nx-heading-lg { font-size: 2.25rem; }

.nx-subheading {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Form Elements */
.nx-form-group {
  margin-bottom: 1.25rem;
}

.nx-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.nx-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

/* Input */
.nx-input {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 2.25rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: var(--foreground);
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  outline: none;
  transition: all 0.2s;
}

.nx-input::placeholder { color: rgba(255, 255, 255, 0.4); }
.nx-input:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}
.nx-input:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* Button */
.nx-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  color: #000000;
  background: #ffffff;
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.nx-button:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}
.nx-button:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.nx-button:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5), 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.nx-button-full { width: 100%; }
.nx-button-sm { height: 2.25rem; padding: 0.25rem 0.75rem; font-size: 0.875rem; }
.nx-button-ghost {
  background: transparent;
  color: var(--foreground);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.nx-button-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* Links */
.nx-link {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s;
}
.nx-link:hover { color: var(--foreground); }

.nx-link-primary {
  color: var(--foreground);
  font-weight: 600;
}
.nx-link-underline:hover { text-decoration: underline; }

/* Footer */
.nx-footer-text {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.nx-footer-text a {
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  margin-left: 0.25rem;
}

.nx-footer-text a:hover {
  text-decoration: underline;
}

/* Alert/Error Messages */
.nx-alert {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(248, 113, 113, 0.2);
  background: rgba(248, 113, 113, 0.1);
}

.nx-alert-info {
  border-color: rgba(6, 182, 212, 0.2);
  background: rgba(6, 182, 212, 0.1);
}

.nx-alert-success {
  border-color: rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.1);
}

.nx-alert-success .nx-alert-text {
  color: rgb(134, 239, 172);
}

.nx-alert-text {
  font-size: 0.875rem;
  color: rgb(252, 165, 165);
}

.nx-alert-info .nx-alert-text { color: rgb(103, 232, 249); }
.nx-alert-success .nx-alert-text { color: rgb(134, 239, 172); }

/* Password Toggle Button */
.nx-password-toggle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: color 0.2s;
}

.nx-password-toggle:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Page Loading */
#nx-page-loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, #ffffff, rgba(255, 255, 255, 0.5));
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.15s;
}

#nx-page-loading.htmx-request { opacity: 1; }
