// =============================================================================
// AUTH LAYOUT - World-Class Blockchain Login Experience
// DBIM v3.0 Compliant | GIGW 3.0 Accessible
// =============================================================================

// Skip Link (GIGW 3.0)
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--dbim-blue-dark);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 1000;
  font-size: 14px;

  &:focus {
    top: 0;
  }
}

// =============================================================================
// LAYOUT
// =============================================================================
.auth-layout {
  min-height: 100vh;
  display: flex;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0520 0%, #1D0A69 50%, #130640 100%);
}

// =============================================================================
// ANIMATED BACKGROUND
// =============================================================================
.animated-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
}

// Floating Blockchain Nodes
.node {
  position: absolute;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5), 0 0 40px rgba(99, 102, 241, 0.3);
  animation: float 6s ease-in-out infinite;

  &::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    animation: pulse-ring 2s ease-out infinite;
  }
}

.node-1 {
  top: 20%;
  left: 15%;
  animation-delay: 0s;
}

.node-2 {
  top: 30%;
  left: 45%;
  animation-delay: 1s;
  width: 16px;
  height: 16px;
}

.node-3 {
  top: 15%;
  right: 20%;
  animation-delay: 2s;
}

.node-4 {
  bottom: 30%;
  right: 25%;
  animation-delay: 1.5s;
  width: 10px;
  height: 10px;
}

.node-5 {
  bottom: 25%;
  left: 25%;
  animation-delay: 0.5s;
}

.node-6 {
  top: 50%;
  left: 35%;
  animation-delay: 2.5s;
  width: 8px;
  height: 8px;
}

// Connection Lines
.connections {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
}

.connection {
  stroke: rgba(99, 102, 241, 0.4);
  stroke-width: 0.1;
  stroke-dasharray: 2 2;
  animation: dash 20s linear infinite;
}

// Gradient Overlay
.gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 60%);
}

// =============================================================================
// MAIN CONTAINER
// =============================================================================
.auth-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

// =============================================================================
// LEFT SIDE - BRANDING
// =============================================================================
.auth-branding {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;

  @media (max-width: 1024px) {
    display: none;
  }
}

.branding-content {
  max-width: 480px;
  color: white;
  animation: fadeInUp 0.6s ease-out;
}

.emblem-wrapper {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);

  .goa-emblem {
    width: 56px;
    height: 56px;
    filter: brightness(0) invert(1);
  }
}

.brand-title {
  margin: 0 0 16px;

  .title-line {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
  }

  .title-highlight {
    display: block;
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #FFFFFF 0%, #A5B4FC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
  }
}

.brand-tagline {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 48px;
  font-weight: 400;
}

// Features Grid
.features-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 48px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(5px);
  transition: all 0.2s ease;

  &:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
  }
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  svg {
    width: 24px;
    height: 24px;
    color: #A5B4FC;
  }
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 4px;

  .feature-title {
    font-size: 15px;
    font-weight: 600;
    color: white;
  }

  .feature-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
  }
}

// Network Status
.network-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 50px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  width: fit-content;
}

.status-dot {
  width: 10px;
  height: 10px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10B981;
  animation: pulse 2s infinite;
}

.status-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.status-badge {
  padding: 2px 8px;
  background: rgba(16, 185, 129, 0.2);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #10B981;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

// =============================================================================
// RIGHT SIDE - AUTH CONTENT
// =============================================================================
.auth-content {
  width: 480px;
  min-width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
  background: white;
  position: relative;

  @media (max-width: 1024px) {
    width: 100%;
    min-width: auto;
    max-width: 480px;
    margin: auto;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  }

  @media (max-width: 520px) {
    margin: 16px;
    width: calc(100% - 32px);
    padding: 32px 24px;
    border-radius: 20px;
  }
}

.auth-card {
  animation: fadeIn 0.4s ease-out;
}

// =============================================================================
// FOOTER
// =============================================================================
.auth-footer {
  margin-top: auto;
  padding-top: 24px;
  text-align: center;

  .copyright {
    font-size: 12px;
    color: var(--dbim-grey-2);
    margin: 0 0 8px;
  }

  .footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;

    a {
      font-size: 12px;
      color: var(--dbim-grey-3);
      text-decoration: none;
      transition: color 0.2s ease;

      &:hover {
        color: var(--dbim-blue-dark);
      }
    }

    .divider {
      color: var(--dbim-grey-1);
      font-size: 10px;
    }
  }
}

// =============================================================================
// ANIMATIONS
// =============================================================================
@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  25% {
    transform: translateY(-20px) translateX(10px);
  }
  50% {
    transform: translateY(0) translateX(20px);
  }
  75% {
    transform: translateY(20px) translateX(10px);
  }
}

@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

@keyframes dash {
  to {
    stroke-dashoffset: 100;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

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

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

// =============================================================================
// RESPONSIVE
// =============================================================================
@media (max-width: 1024px) {
  .auth-layout {
    align-items: center;
    justify-content: center;
  }

  .auth-container {
    min-height: auto;
    width: auto;
  }
}
