/* DeepLerUA — iOS 26 "Liquid Glass" inspired theme */

:root {
  --ios-bg: #f2f2f7;
  --ios-bg-2: #e9e9f2;
  --ios-label: #1c1c1e;
  --ios-label-2: #6e6e78;
  --ios-label-3: #9a9aa6;
  --ios-blue: #0a6cff;
  --ios-blue-dark: #0856cc;
  --ios-red: #e0352b;
  --ios-green: #16a34a;
  --gold: #b8862f;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

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

[hidden] {
  display: none !important;
}

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ios-label);
  background: var(--ios-bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* ---------- Ambient background (soft iOS glow) ---------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, #f6f6fb 0%, var(--ios-bg) 45%, var(--ios-bg-2) 100%);
}

.ambient__blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  animation: drift 22s var(--ease) infinite alternate;
}

.ambient__blob--blue {
  width: 46vmax;
  height: 46vmax;
  top: -16vmax;
  left: -12vmax;
  background: radial-gradient(circle at 40% 40%, #a7c4ff, #6b8fff 55%, transparent 72%);
}

.ambient__blob--gold {
  width: 38vmax;
  height: 38vmax;
  bottom: -14vmax;
  right: -10vmax;
  background: radial-gradient(circle at 50% 50%, #ffe2a8, #f0bd62 55%, transparent 72%);
  opacity: 0.45;
  animation-delay: -7s;
}

.ambient__blob--violet {
  width: 30vmax;
  height: 30vmax;
  top: 34%;
  left: 52%;
  background: radial-gradient(circle at 50% 50%, #dcc6ff, #b69aff 55%, transparent 72%);
  opacity: 0.38;
  animation-delay: -13s;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(4vmax, 3vmax, 0) scale(1.12);
  }
}

/* ---------- Layout ---------- */

.lock,
.content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(24px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
}

.lock {
  justify-content: center;
  gap: 20px;
}

.content {
  justify-content: flex-start;
  gap: 18px;
  padding-top: calc(40px + env(safe-area-inset-top));
}

/* ---------- Liquid glass surfaces ---------- */

.lock__card,
.content__inner {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 34px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(255, 255, 255, 0.62) 45%,
    rgba(255, 255, 255, 0.72) 100%
  );
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  backdrop-filter: blur(40px) saturate(180%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 -1px 0 rgba(255, 255, 255, 0.35) inset,
    0 24px 60px -18px rgba(24, 28, 60, 0.28),
    0 6px 18px -10px rgba(24, 28, 60, 0.18);
}

.lock__card {
  position: relative;
  max-width: 440px;
  padding: 30px 24px 26px;
  text-align: center;
  overflow: hidden;
  animation: cardIn 0.7s var(--ease) both;
}

/* Specular highlight along the top edge */
.lock__card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 46%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent);
  pointer-events: none;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Brand ---------- */

.lock__brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 22px;
  text-align: left;
}

.lock__icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow:
    0 8px 20px -6px rgba(29, 43, 83, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
  flex: none;
}

.lock__title {
  margin: 0;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #1b2340 0%, #3a3f78 55%, #6b4fa0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lock__subtitle {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ios-label-3);
}

/* ---------- Flags ---------- */

.flags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 2px 0 18px;
}

.flag {
  position: relative;
  display: block;
  width: 84px;
  height: 56px;
  border-radius: 14px;
  box-shadow:
    0 10px 24px -10px rgba(20, 24, 50, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.75) inset;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.flag::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.42), transparent 46%);
  pointer-events: none;
}

/* Ukraine: blue over yellow */
.flag--ua {
  z-index: 2;
  background: linear-gradient(180deg, #0057b8 0 50%, #ffd700 50% 100%);
  transform: rotate(-6deg) translateX(10px);
}

/* EU: blue field with a ring of 10 gold stars, drawn as CSS dots */
.flag--eu {
  z-index: 1;
  transform: rotate(6deg) translateX(-10px);
  background-color: #003399;
  background-image:
    radial-gradient(circle at 50% 18%, #ffcc00 2.6px, transparent 3.2px),
    radial-gradient(circle at 70.5% 24.5%, #ffcc00 2.6px, transparent 3.2px),
    radial-gradient(circle at 82% 42%, #ffcc00 2.6px, transparent 3.2px),
    radial-gradient(circle at 82% 60%, #ffcc00 2.6px, transparent 3.2px),
    radial-gradient(circle at 70.5% 77%, #ffcc00 2.6px, transparent 3.2px),
    radial-gradient(circle at 50% 83%, #ffcc00 2.6px, transparent 3.2px),
    radial-gradient(circle at 29.5% 77%, #ffcc00 2.6px, transparent 3.2px),
    radial-gradient(circle at 18% 60%, #ffcc00 2.6px, transparent 3.2px),
    radial-gradient(circle at 18% 42%, #ffcc00 2.6px, transparent 3.2px),
    radial-gradient(circle at 29.5% 24.5%, #ffcc00 2.6px, transparent 3.2px);
  background-size: 100% 100%;
}

@media (hover: hover) {
  .flags:hover .flag--ua {
    transform: rotate(0deg) translateX(6px) scale(1.04);
  }
  .flags:hover .flag--eu {
    transform: rotate(0deg) translateX(-6px) scale(1.04);
  }
}

.flags--muted {
  opacity: 0.4;
  filter: grayscale(0.65);
}

/* ---------- States & text ---------- */

.lock__state {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: stateIn 0.45s var(--ease) both;
}

@keyframes stateIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lock__text {
  margin: 0;
  max-width: 36ch;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--ios-label-2);
}

.lock__message {
  margin: 0;
  max-width: 36ch;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.lock__message--error {
  color: var(--ios-label);
  font-weight: 500;
}

.lock__message--error::before {
  content: "";
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(224, 53, 43, 0.14), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 8v5' stroke='%23e0352b' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='16.5' r='1.2' fill='%23e0352b'/%3E%3Ccircle cx='12' cy='12' r='9.2' fill='none' stroke='%23e0352b' stroke-opacity='.35' stroke-width='1.6'/%3E%3C/svg%3E")
      center / 24px 24px no-repeat;
}

.lock__hint {
  margin: 0;
  max-width: 36ch;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ios-label-3);
}

.lock__fine {
  margin: -2px 0 0;
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--ios-label-3);
}

/* ---------- Button ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 28px;
  font: inherit;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  background: linear-gradient(180deg, #2f86ff 0%, var(--ios-blue) 55%, var(--ios-blue-dark) 100%);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 -1px 0 rgba(0, 0, 0, 0.12) inset,
    0 10px 24px -10px rgba(10, 108, 255, 0.65);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), filter 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0 0 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent);
  pointer-events: none;
}

.btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px) scale(1.015);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 -1px 0 rgba(0, 0, 0, 0.12) inset,
    0 16px 30px -12px rgba(10, 108, 255, 0.7);
}

.btn:active {
  transform: scale(0.97);
  filter: brightness(0.96);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 4px 12px -8px rgba(10, 108, 255, 0.6);
}

.btn:focus-visible {
  outline: 3px solid rgba(10, 108, 255, 0.35);
  outline-offset: 3px;
}

/* ---------- Spinner ---------- */

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(10, 108, 255, 0) 0deg, var(--ios-blue) 300deg, #5aa2ff 360deg);
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.4px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.4px));
  animation: spin 0.85s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .ambient__blob {
    animation: none;
  }
  .spinner {
    animation-duration: 2.4s;
  }
  .lock__card,
  .lock__state {
    animation: none;
  }
}

/* ---------- Footer ---------- */

.footer {
  margin: 0;
  padding: 4px 0;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: var(--ios-label-3);
  text-align: center;
}

.footer strong {
  font-weight: 600;
  color: var(--ios-label-2);
}

/* ---------- Unlocked content ---------- */

.content__inner {
  max-width: 900px;
  padding: 24px;
  border-radius: 32px;
  animation: cardIn 0.6s var(--ease) both;
}

.content__header {
  margin: 0 12px 18px;
}

.content__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 10px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--gold);
  background: rgba(212, 168, 83, 0.14);
  border: 1px solid rgba(212, 168, 83, 0.28);
  border-radius: 999px;
}

.content__eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.18);
}

.content__heading {
  margin: 0 0 6px;
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ios-label);
}

.content__lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ios-label-2);
}

.video-wrap {
  padding: 8px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 26px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 40px -22px rgba(24, 28, 60, 0.4);
}

.video-wrap video {
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 19px;
  object-fit: contain;
}

.content__note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--ios-label-3);
}

/* ---------- Small screens ---------- */

@media (max-width: 480px) {
  .lock__card {
    padding: 26px 18px 22px;
    border-radius: 30px;
  }

  .lock__brand {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .btn {
    width: 100%;
  }

  .flag {
    width: 74px;
    height: 50px;
  }

  .content__inner {
    padding: 14px;
    border-radius: 26px;
  }

  .content__header {
    margin: 4px 6px 14px;
  }
}
