/* ===== VARIABLES ===== */
$gradient-bg: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 50%, #f1f5f9 100%);
$gradient-primary: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
$color-brand-primary: #2563eb;
$color-brand-dark: #1e40af;
$color-text-primary: #0f172a;
$color-text-secondary: #475569;
$color-text-tertiary: #94a3b8;
$color-error: #ef4444;
$color-success: #10b981;
$glass-bg: rgba(255, 255, 255, 0.7);
$glass-border: rgba(226, 232, 240, 0.5);
$radius-full: 9999px;
$radius-lg: 1rem;
$radius-md: 0.5rem;
$shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
$shadow-glass: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
$shadow-glass-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
$shadow-brand: 0 4px 12px rgba(37, 99, 235, 0.2);
$shadow-brand-hover: 0 8px 20px rgba(37, 99, 235, 0.3);

/* ===== MAINTENANCE PAGE ===== */
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: $gradient-bg;
  padding: 2rem 1rem;
  position: relative;
  overflow: hidden;

  // Dezentes Hintergrundmuster
  &::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
      radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
      radial-gradient(circle at 80% 80%, rgba(37, 99, 235, 0.04) 0%, transparent 50%);
    pointer-events: none;
  }
}

.container {
  max-width: 800px;
  width: 100%;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* ===== LOGO SECTION ===== */
.logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  animation: fadeInDown 0.6s ease-out;

  .logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(37, 99, 235, 0.15));
    transition: transform 0.3s ease;

    &:hover {
      transform: scale(1.05) rotate(2deg);
    }
  }

  .brand-name {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    background: $gradient-primary;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
  }
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: rgba(245, 158, 11, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(245, 158, 11, 0.3);
  border-radius: $radius-full;
  font-size: 0.875rem;
  font-weight: 700;
  color: #f59e0b;
  margin: 0 auto 2rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
  animation: fadeIn 0.6s ease-out 0.2s both, pulse 2s ease-in-out infinite;
}

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

/* ===== MAIN HEADING ===== */
h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  text-align: center;
  margin: 0 0 1rem;
  color: $color-text-primary;
  letter-spacing: -0.03em;
  line-height: 1.2;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* ===== DESCRIPTION ===== */
.description {
  text-align: center;
  font-size: 1.125rem;
  line-height: 1.7;
  color: $color-text-secondary;
  margin: 0 auto 3rem;
  max-width: 600px;
  font-weight: 500;
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

/* ===== FEATURES GRID ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
  animation: fadeInUp 0.6s ease-out 0.5s both;
}

.feature {
  background: $glass-bg;
  backdrop-filter: blur(20px);
  border: 1px solid $glass-border;
  border-radius: $radius-lg;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: $shadow-sm;

  &:hover {
    transform: translateY(-4px);
    box-shadow: $shadow-glass-hover;
    border-color: rgba(37, 99, 235, 0.3);
  }

  .icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
  }

  h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: $color-text-primary;
  }

  p {
    margin: 0;
    font-size: 0.875rem;
    color: $color-text-secondary;
    line-height: 1.5;
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* ===== NOTIFY BOX ===== */
.notify-box {
  background: $glass-bg;
  backdrop-filter: blur(20px);
  border: 1px solid $glass-border;
  border-radius: $radius-lg;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: $shadow-glass;
  animation: fadeInUp 0.6s ease-out 0.6s both;
  width: 100%;

  h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    background: $gradient-primary;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  > p {
    text-align: center;
    color: $color-text-secondary;
    margin: 0 0 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
  }
}

/* ===== EMAIL FORM ===== */
.email-form {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;

  @media (max-width: 640px) {
    flex-direction: column;
  }
}

.email-input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border: 1px solid rgba(226, 232, 240, 0.6);
  border-radius: $radius-md;
  font-size: 0.9375rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.9);
  color: $color-text-primary;
  transition: all 0.2s ease;

  &::placeholder {
    color: $color-text-tertiary;
    font-weight: 500;
  }

  &:focus {
    outline: none;
    border-color: $color-brand-primary;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #fff;
  }

  &:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(241, 245, 249, 0.5);
  }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: $radius-md;
  font-size: 0.9375rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
  min-width: 160px;

  &:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }

  &--primary {
    background: $gradient-primary;
    color: white;
    box-shadow: $shadow-brand;

    &:hover:not(:disabled):not(.btn--loading) {
      transform: translateY(-2px);
      box-shadow: $shadow-brand-hover;
    }

    &:active:not(:disabled) {
      transform: translateY(0);
    }
  }

  &--loading {
    pointer-events: none;
  }

  @media (max-width: 640px) {
    width: 100%;
  }
}

.btn-content {
  transition: opacity 0.2s ease;

  &--hidden {
    opacity: 0;
  }
}

/* ===== SPINNER ===== */
.spinner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ===== MESSAGES ===== */
.error-message,
.success-message {
  padding: 0.875rem 1.25rem;
  border-radius: $radius-md;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  animation: slideIn 0.3s ease-out;
}

.error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: $color-error;
}

.success-message {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: $color-success;
}

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

/* ===== ACCESS SECTION ===== */
.access-section {
  background: $glass-bg;
  backdrop-filter: blur(20px);
  border: 1px solid $glass-border;
  border-radius: $radius-lg;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: $shadow-sm;
  animation: fadeInUp 0.6s ease-out 0.7s both;
  width: 100%;
}

.access-toggle {
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: $radius-md;
  font-size: 0.9375rem;
  font-weight: 700;
  color: $color-brand-primary;
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    background: rgba(37, 99, 235, 0.12);
    border-color: $color-brand-primary;
    transform: translateY(-1px);
  }

  &:active {
    transform: translateY(0);
  }
}

.password-box {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(226, 232, 240, 0.5);
  animation: slideIn 0.3s ease-out;

  .access-label {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: $color-text-secondary;
    text-align: center;
  }

  .password-form {
    display: flex;
    gap: 0.75rem;

    @media (max-width: 640px) {
      flex-direction: column;
    }
  }
}

/* ===== CONTACT ===== */
.contact {
  text-align: center;
  animation: fadeIn 0.6s ease-out 0.8s both;

  .contact-text {
    margin: 0;
    font-size: 0.9375rem;
    color: $color-text-secondary;
    font-weight: 500;
  }

  .link {
    color: $color-brand-primary;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
    margin-left: 0.375rem;

    &:hover {
      color: $color-brand-dark;
      text-decoration: underline;
    }
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .logo-section {
    .logo {
      width: 64px;
      height: 64px;
    }

    .brand-name {
      font-size: 1.5rem;
    }
  }

  .badge {
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
  }

  .description {
    font-size: 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .notify-box {
    padding: 1.5rem;

    h2 {
      font-size: 1.25rem;
    }
  }

  .access-section {
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 1.5rem 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .feature {
    padding: 1.25rem;

    .icon {
      font-size: 2rem;
    }
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .feature:hover,
  .btn:hover,
  .access-toggle:hover {
    transform: none;
  }

  .feature .icon {
    animation: none;
  }

  .badge {
    animation: fadeIn 0.6s ease-out 0.2s both;
  }
}

/* ===== FOCUS VISIBLE ===== */
.btn:focus-visible,
.email-input:focus-visible,
.access-toggle:focus-visible {
  outline: 2px solid $color-brand-primary;
  outline-offset: 2px;
}