:root {
  --bg: #0b1220;
  --bg-accent: #08101d;
  --panel: rgba(18, 26, 42, 0.94);
  --panel-2: #182235;
  --text: #e8edf6;
  --muted: #9fb0c8;
  --border: #2c3a55;
  --border-strong: #3d4d6d;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --secondary: #334155;
  --secondary-hover: #475569;
  --home: #facc15;
  --home-hover: #eab308;
  --home-text: #1f2937;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --danger-border: rgba(239, 68, 68, 0.35);
  --danger-text: #fecaca;
  --success-bg: rgba(34, 197, 94, 0.12);
  --success-border: rgba(34, 197, 94, 0.28);
  --success-text: #bbf7d0;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.22);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 18px;
  --content-width: 980px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.08), transparent 32%),
    linear-gradient(180deg, var(--bg-accent) 0%, var(--bg) 100%);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  font-weight: 700;
  z-index: 1000;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.layout {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 24px;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  margin-bottom: 32px;
}

.home-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--home);
  color: var(--home-text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 10px 24px rgba(250, 204, 21, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.home-button:hover {
  background: var(--home-hover);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(250, 204, 21, 0.22);
}

.home-button:active {
  transform: translateY(0);
}

.home-button:focus-visible {
  outline: 3px solid rgba(250, 204, 21, 0.35);
  outline-offset: 2px;
}

.home-button__emoji {
  font-size: 20px;
  line-height: 1;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav a:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.main {
  display: flex;
  justify-content: center;
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 32px);
  line-height: 1.1;
}

p {
  margin: 0 0 12px;
}

.muted {
  color: var(--muted);
  margin-bottom: 20px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.top-gap {
  margin-top: 22px;
}

label {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: #d6deeb;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  outline: none;
  appearance: none;
}

input::placeholder {
  color: #88a0bf;
}

input:hover {
  border-color: var(--border-strong);
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--secondary);
  color: #ffffff;
}

.btn-secondary:hover {
  background: var(--secondary-hover);
}

.error {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
  font-size: 14px;
}

.success {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
  font-size: 14px;
}

.link {
  display: inline-block;
  margin-top: 16px;
  color: var(--muted);
}

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

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 640px) {
  .layout {
    padding: 16px;
  }

  .header {
    gap: 14px;
    margin-bottom: 24px;
  }

  .header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .brand {
    font-size: 20px;
  }

  .nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .nav a {
    width: 100%;
    justify-content: center;
  }

  .home-button {
    min-height: 50px;
    padding: 12px 16px;
    font-size: 15px;
  }

  .home-button__emoji {
    font-size: 18px;
  }

  .card {
    padding: 20px;
    border-radius: 16px;
  }

  h1 {
    font-size: 26px;
  }

  .muted {
    margin-bottom: 16px;
  }

  .form {
    margin-top: 20px;
  }

  input,
  .btn {
    min-height: 50px;
  }
}

@media (max-width: 380px) {
  .layout {
    padding: 12px;
  }

  .card {
    padding: 16px;
  }

  .home-button {
    font-size: 14px;
  }

  .nav a {
    padding: 10px 12px;
  }
}

@media (hover: none) {
  .home-button:hover,
  .btn:hover,
  .nav a:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition: none !important;
    animation: none !important;
  }
}