:root {
  --bg-main: #020617;
  --bg-card: #10182a;
  --craft: #ffca00;
  --tech: #4d4d4d;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --transition-fast: 150ms ease-out;
  --success: #22c55e;
  --error: #ef4444;
  --info: #3b82f6;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #0f172a 0, #020617 55%, #000 100%);
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px 24px;
  position: relative;
  padding-bottom: 80px !important;
}

body::before {
  content: "";
  position: fixed;
  inset: -40px;
  pointer-events: none;
  opacity: 0.12;
  mix-blend-mode: soft-light;
  background-image:
    linear-gradient(90deg, rgba(15, 23, 42, 0.6) 1px, transparent 1px),
    linear-gradient(rgba(15, 23, 42, 0.6) 1px, transparent 1px);
  background-size: 3px 3px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top left, #0f172a 0, #020617 55%, #000 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 500ms ease-out, visibility 500ms ease-out;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 202, 0, 0.2);
  border-top-color: var(--craft);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow:
    0 0 20px rgba(255, 202, 0, 0.4),
    0 0 40px rgba(255, 202, 0, 0.2);
}

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

.background-pixels {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.pixel {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.9);
  box-shadow:
    0 0 6px rgba(0, 0, 0, 0.9),
    0 0 12px rgba(0, 0, 0, 0.85);
  image-rendering: pixelated;
  will-change: transform;
  opacity: 0.42;
  filter: blur(0.7px);
}

.pixel--grass {
  background-image:
    repeating-linear-gradient(90deg,
      #16a34a 0 2px,
      #15803d 2px 3px,
      #14532d 3px 4px,
      #a16207 4px 6px,
      #15803d 6px 7px,
      #92400e 7px 9px),
    linear-gradient(to bottom,
      #22c55e 0%,
      #16a34a 26%,
      #16a34a 34%,
      #15803d 40%,
      #a16207 40%,
      #451a03 100%),
    linear-gradient(#166534 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 202, 0, 0.35) 1px, transparent 1px);
  background-size:
    9px 1px,
    100% 100%,
    4px 4px,
    6px 6px;
  background-position:
    0 38%,
    0 0,
    0 0,
    0 0;
  background-repeat:
    repeat-x,
    no-repeat,
    repeat,
    repeat;
  background-blend-mode:
    normal,
    normal,
    soft-light,
    soft-light;
}

.shell {
  width: 100%;
  max-width: 720px;
  border-radius: 8px;
  padding: 2px;
  background: transparent;
  box-shadow: none;
  position: relative;
  z-index: 1;
}

.logo {
  display: block;
  margin: 16px auto -40px auto;
  height: min(350px, 35vh);
  width: auto;
  image-rendering: auto;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.9));
  pointer-events: none;
}

.card {
  border-radius: 8px;
  background:
    radial-gradient(circle at top left, rgba(255, 202, 0, 0.08), transparent 60%),
    radial-gradient(circle at bottom right, rgba(15, 23, 42, 0.6), transparent 55%),
    var(--bg-card);
  padding: 18px 22px 20px;
  border: 1px solid #facc153d;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top center, rgba(15, 23, 42, 0.5), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
}

header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(55, 65, 81, 0.8);
  backdrop-filter: blur(10px);
  transform: translateY(1px);
}

.lang-button {
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 4px 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-muted);
  transition: background var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast);
}

.lang-button span.flag {
  font-size: 15px;
  line-height: 1;
}

.lang-button span.code {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.lang-button.active {
  background: linear-gradient(135deg, var(--craft), #ffe580);
  color: #1f2933;
  box-shadow: 0 0 16px rgba(255, 202, 0, 0.55);
}

.lang-button:not(.active):hover {
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.headline {
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  color: #facc15;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.9);
  margin-bottom: 4px;
}

.hero-lead {
  font-size: 15px;
  line-height: 1.6;
  color: #e5e7eb;
  max-width: 42rem;
}

.alpha {
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: #10182a;
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 20px rgba(0, 0, 0, 0.9),
    0 0 18px rgba(15, 23, 42, 0.9);
}

.alpha-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alpha-text {
  font-size: 12px;
  color: var(--text-muted);
}

.alpha-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.alpha-input {
  flex: 1 1 180px;
  min-width: 0;
  border-radius: 8px;
  border: 1px solid rgba(71, 85, 105, 0.9);
  background: rgba(15, 23, 42, 0.9);
  padding: 7px 10px;
  font-size: 12px;
  color: var(--text-main);
  outline: none;
  transition: border var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.alpha-input::placeholder {
  color: rgba(148, 163, 184, 0.8);
}

.alpha-input:focus {
  border-color: rgba(255, 202, 0, 0.9);
  box-shadow: 0 0 12px rgba(255, 202, 0, 0.35);
  background: rgba(15, 23, 42, 0.95);
}

.alpha-button {
  border-radius: 8px;
  border: 1px solid rgba(255, 202, 0, 0.8);
  background: radial-gradient(circle at top left, var(--craft), #facc15);
  color: #1f2933;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow:
    0 0 16px rgba(255, 202, 0, 0.6),
    0 0 32px rgba(255, 202, 0, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
}

.alpha-button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 24px rgba(255, 202, 0, 0.85),
    0 0 40px rgba(255, 202, 0, 0.5);
}

.alpha-note {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.9);
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(55, 65, 81, 0.4);
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(55, 65, 81, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  text-decoration: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.social-link svg {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-fast);
}

.social-link:hover {
  background: linear-gradient(135deg, rgba(255, 202, 0, 0.2), rgba(255, 202, 0, 0.1));
  border-color: rgba(255, 202, 0, 0.6);
  color: var(--craft);
  box-shadow:
    0 0 16px rgba(255, 202, 0, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.6);
  transform: translateY(-2px);
}

.social-link:hover svg {
  transform: scale(1.1);
}

.social-link:active {
  transform: translateY(0);
}

.page-footer {
  position: fixed;
  bottom: 8px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  z-index: 10000;
  pointer-events: auto;
  padding: 4px 12px 6px;
  background: rgba(15, 23, 42, 0.76);
  border-top: 1px solid rgba(15, 23, 42, 1);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
}

.page-footer a {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.page-footer a:hover {
  color: var(--text-main);
}

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 400px;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow:
    0 0 20px rgba(0, 0, 0, 0.9),
    0 0 40px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

.notification--visible {
  opacity: 1;
  transform: translateY(0);
}

.notification--success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.95));
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #fff;
}

.notification--error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fff;
}

.notification--info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.95));
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #fff;
}

@media (max-width: 640px) {
  body {
    padding: 24px 12px;
  }

  .shell {
    max-width: 100%;
  }

  .logo {
    height: min(260px, 30vh);
    margin: 12px auto 2px auto;
  }

  .card {
    padding: 16px 16px 18px;
  }

  .page-footer {
    font-size: 10px;
    bottom: 6px;
  }

  .notification {
    right: 12px;
    left: 12px;
    max-width: none;
    font-size: 13px;
    padding: 14px 16px;
  }
}