:root {
  --bg: #edf1f7;
  --surface: #ffffff;
  --text: #111827;
  --heading: #172033;
  --muted: #7b8798;
  --border: #dfe5ee;
  --brand: #2f80ed;
  --brand-hover: #0f6fdd;
  --brand-soft: #f1f7ff;
  --shadow: 0 10px 24px rgba(31, 45, 64, 0.08);
  --radius: 16px;
  --font: 'Segoe UI', 'Trebuchet MS', 'Helvetica Neue', Arial, sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
  cursor: pointer;
}

.page {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  padding: 12px 16px;
}

.header-inner {
  margin: 0 auto;
  width: 100%;
  max-width: 96rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 16px;
  box-shadow: var(--shadow);
}

.logo {
  display: none;
  align-items: center;
  justify-content: center;
}

.logo img {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: contain;
}

.lang {
  width: 100%;
  display: flex;
  justify-content: center;
}

.lang-switch {
  display: flex;
  width: 100%;
  gap: 8px;
}

.lang-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
  background: transparent;
  color: #1e293b;
  font-size: 14px;
  font-weight: 500;
  transition:
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.7);
}

.lang-btn.is-active {
  background: rgba(0, 97, 198, 0.1);
  color: #0a3d66;
  font-weight: 600;
}

.lang-flag {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.7);
}

.lang-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.panel {
  width: 100%;
  max-width: 48rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 32px 20px;
  box-shadow: var(--shadow);
}

.code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.06em;
  margin: 0;
  font-size: clamp(3.75rem, 16vw, 8.75rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--heading);
  user-select: none;
}

.title {
  margin: 8px 0 0;
  max-width: 36rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--heading);
}

.description {
  margin: 16px 0 0;
  max-width: 32rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 7px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-secondary {
  border: 1px solid var(--border);
  background: var(--surface);
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
  background: var(--brand-soft);
  color: #0061c6;
}

.btn-secondary:hover svg {
  transform: translateX(-2px);
}

.btn-secondary svg {
  transition: transform 0.2s ease-out;
  opacity: 0.8;
}

.btn-primary {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

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

.footer {
  margin-top: auto;
  padding: 20px 16px;
}

.footer p {
  margin: 0 auto;
  max-width: 96rem;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

@media (min-width: 640px) {
  .header {
    padding: 12px 24px;
  }

  .panel {
    padding: 40px 32px;
  }

  .description {
    font-size: 1rem;
  }

  .footer {
    padding: 20px 24px;
  }
}

@media (min-width: 1024px) {
  .header {
    padding: 12px 40px;
  }

  .header-inner {
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
  }

  .logo {
    display: flex;
  }

  .lang {
    width: auto;
    justify-content: flex-end;
  }

  .lang-switch {
    width: auto;
    gap: 0;
    padding: 2px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.4);
  }

  .lang-btn {
    flex: 0 0 auto;
    min-width: 6.25rem;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
  }

  .lang-btn.is-active {
    background: #fff;
    color: #0b4ca4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border-color: rgba(226, 232, 240, 0.55);
  }

  .footer {
    padding: 20px 40px;
  }
}
