/* FitelSMP — glassmorphism + фон icon.png + тёплая палитра */

@font-face {
  font-family: "FitelMinecraft";
  src: url("../fonts/minecraft.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-display: "FitelMinecraft", "Montserrat", sans-serif;
}

:root[data-theme="dark"] {
  --bg-base: #120c0a;
  --bg-mid: #1f1410;
  --bg-top: #152428;
  --text: #fdf6ed;
  --text-muted: rgba(250, 230, 210, 0.72);
  --accent: #f0a84d;
  --accent-2: #e8892e;
  --accent-soft: rgba(240, 168, 77, 0.22);
  --glass-bg: rgba(28, 18, 14, 0.52);
  --glass-border: rgba(255, 220, 185, 0.18);
  --glass-highlight: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --blob-1: rgba(255, 160, 80, 0.22);
  --blob-2: rgba(120, 200, 220, 0.12);
  --blob-3: rgba(255, 210, 120, 0.14);
  --blob-4: rgba(180, 140, 100, 0.16);
}

:root[data-theme="light"] {
  --bg-base: #f8efe4;
  --bg-mid: #ebe0d2;
  --bg-top: #dde8f0;
  --text: #1e140c;
  --text-muted: rgba(30, 20, 12, 0.65);
  --accent: #c45f12;
  --accent-2: #9a4a0e;
  --accent-soft: rgba(196, 95, 18, 0.14);
  --glass-bg: rgba(255, 252, 248, 0.55);
  --glass-border: rgba(255, 255, 255, 0.72);
  --glass-highlight: rgba(255, 255, 255, 0.65);
  --shadow: 0 20px 50px rgba(60, 40, 25, 0.12);
  --blob-1: rgba(255, 180, 100, 0.28);
  --blob-2: rgba(140, 190, 210, 0.2);
  --blob-3: rgba(255, 200, 140, 0.22);
  --blob-4: rgba(220, 200, 170, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg-base);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: color 0.45s ease;
}

/* —— Фон сайта: icon.png + затемнение под читаемость —— */
.site-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg-base);
  background-image: linear-gradient(
      165deg,
      rgba(14, 8, 6, 0.9) 0%,
      rgba(35, 20, 12, 0.68) 42%,
      rgba(10, 22, 28, 0.82) 100%
    ),
    url("../img/icon.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

@media (max-width: 900px) {
  .site-bg {
    background-attachment: scroll;
  }
}

:root[data-theme="light"] .site-bg {
  background-image: linear-gradient(
      165deg,
      rgba(255, 250, 242, 0.9) 0%,
      rgba(255, 236, 214, 0.55) 40%,
      rgba(220, 232, 242, 0.78) 100%
    ),
    url("../img/icon.png");
}

/* —— Liquid background —— */
.liquid-bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  mix-blend-mode: soft-light;
  opacity: 0.85;
}

:root[data-theme="light"] .liquid-bg {
  mix-blend-mode: multiply;
  opacity: 0.35;
}

.blob {
  position: absolute;
  border-radius: 42% 58% 62% 38% / 48% 42% 58% 52%;
  filter: blur(48px);
  opacity: 0.95;
  animation: liquid-morph 22s ease-in-out infinite, liquid-drift 28s ease-in-out infinite;
}

.blob--1 {
  width: min(55vw, 420px);
  height: min(55vw, 420px);
  top: -8%;
  left: -10%;
  background: var(--blob-1);
  animation-delay: 0s, -4s;
}

.blob--2 {
  width: min(48vw, 380px);
  height: min(48vw, 380px);
  top: 35%;
  right: -12%;
  background: var(--blob-2);
  animation-delay: -6s, -10s;
}

.blob--3 {
  width: min(50vw, 400px);
  height: min(50vw, 400px);
  bottom: -5%;
  left: 20%;
  background: var(--blob-3);
  animation-delay: -12s, -2s;
}

.blob--4 {
  width: min(40vw, 300px);
  height: min(40vw, 300px);
  top: 12%;
  right: 25%;
  background: var(--blob-4);
  animation-delay: -8s, -14s;
}

@keyframes liquid-morph {
  0%,
  100% {
    border-radius: 42% 58% 62% 38% / 48% 42% 58% 52%;
    transform: scale(1) rotate(0deg);
  }
  33% {
    border-radius: 58% 42% 38% 62% / 52% 58% 42% 48%;
    transform: scale(1.06) rotate(6deg);
  }
  66% {
    border-radius: 38% 62% 52% 48% / 62% 48% 52% 38%;
    transform: scale(0.94) rotate(-4deg);
  }
}

@keyframes liquid-drift {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 3vw 4vh;
  }
}

/* —— Glass —— */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
  border-radius: 20px;
  transition: box-shadow 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

.glass-inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 1.25rem;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
}

/* —— Layout: full width —— */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: calc(100% - 2rem);
  max-width: none;
  margin: 0.75rem auto 0;
  padding: max(0.65rem, env(safe-area-inset-top)) max(1.1rem, env(safe-area-inset-right)) 0.65rem max(1.1rem, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0.65rem 1rem;
  animation: header-glow 8s ease-in-out infinite;
}

@keyframes header-glow {
  0%,
  100% {
    box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight), 0 0 0 0 transparent;
  }
  50% {
    box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight), 0 0 32px rgba(240, 168, 77, 0.18);
  }
}

:root[data-theme="light"] .header {
  animation-name: header-glow-light;
}

@keyframes header-glow-light {
  0%,
  100% {
    box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight), 0 0 0 0 transparent;
  }
  50% {
    box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight), 0 0 26px rgba(196, 95, 18, 0.14);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand__logo {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(180, 160, 220, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
}

:root[data-theme="light"] .brand__logo {
  background: rgba(200, 180, 235, 0.35);
  box-shadow: inset 0 0 0 1px rgba(80, 60, 120, 0.12);
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  letter-spacing: -0.02em;
}

.header__trailing {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: auto;
}

.header-icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: var(--glass-bg);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-icon-btn:hover,
.header-icon-btn:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

.header-icon-btn__icon {
  position: absolute;
}

:root[data-theme="dark"] .header-icon-btn__icon--moon {
  opacity: 0;
  pointer-events: none;
}

:root[data-theme="light"] .header-icon-btn__icon--sun {
  opacity: 0;
  pointer-events: none;
}

.header-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--glass-border);
  border-radius: 50%;
  background: var(--glass-highlight);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.header-avatar:hover,
.header-avatar:focus-visible {
  transform: scale(1.05);
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.header-avatar__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  z-index: 1;
}

.header-avatar__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent);
  line-height: 1;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.site-animations-off .liquid-bg {
  opacity: 0.25;
}

body.site-animations-off .blob {
  animation: none;
}

/* —— Пасхалка (тройной клик по логотипу) —— */
.easter {
  position: fixed;
  z-index: 55;
  left: max(1rem, env(safe-area-inset-left));
  top: calc(4.5rem + env(safe-area-inset-top));
  max-width: min(340px, calc(100vw - 2rem));
  opacity: 0;
  visibility: hidden;
  transform: translateY(-18px) scale(0.96);
  filter: blur(4px);
  pointer-events: none;
  transition:
    opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.45s ease,
    visibility 0s linear 0.55s;
}

.easter.easter--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  filter: blur(0);
  pointer-events: auto;
  transition-delay: 0s, 0s, 0s, 0s;
}

.easter__panel {
  position: relative;
  padding: 1.15rem 2.75rem 1.15rem 1.2rem;
  border-radius: 18px;
}

.easter__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: var(--glass-highlight);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.easter__close:hover,
.easter__close:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

.easter__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.35;
}

@media (prefers-reduced-motion: reduce) {
  .easter {
    transition: none;
    filter: none;
  }

  .easter:not(.easter--visible) {
    transform: none;
  }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
}

.nav__link {
  position: relative;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: 12px;
  transition: background 0.2s, color 0.2s;
}

.nav__link:hover,
.nav__link:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

.nav__link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--glass-border) 80%, var(--accent));
}

.nav__link.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: 0.35rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 1rem 1rem 2rem;
}

/* —— Отдельные окна (страницы) —— */
.views {
  position: relative;
  width: 100%;
  min-height: calc(100dvh - 8rem);
}

.view {
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px) scale(0.985);
  filter: blur(6px);
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.45s ease,
    visibility 0s linear 0.45s;
}

.view:not(.is-active) {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
}

.view.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition-delay: 0s, 0s, 0s, 0s;
  z-index: 2;
}

.view__inner {
  width: 100%;
}

.view__inner--enter {
  animation: view-inner-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes view-inner-pop {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.section {
  width: 100%;
  max-width: none;
  padding: 2rem 0;
}

.section--flush {
  padding-top: 0.25rem;
}

.section--last {
  padding-bottom: 1rem;
}

.section__head {
  margin-bottom: 1.5rem;
  padding: 0 0.25rem;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
}

.section__lead {
  margin: 0;
  max-width: 65ch;
  color: var(--text-muted);
  font-size: 1rem;
}

/* —— Hero —— */
.section--hero {
  padding-top: 0.5rem;
}

.hero-wrap {
  width: 100%;
  max-width: none;
}

.hero__panel {
  position: relative;
  z-index: 0;
  width: 100%;
  max-width: min(52ch, 100%);
  margin: 0 auto;
  padding: clamp(1.25rem, 3.5vw, 2rem);
  box-shadow: var(--shadow), 0 0 48px rgba(0, 0, 0, 0.25);
}

.hero {
  width: 100%;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.hero.hero__panel {
  padding: clamp(1.25rem, 3.5vw, 2rem);
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 5.5vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
}

.hero__title span {
  color: var(--accent);
}

.hero__text {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 58ch;
}

.hero__stats {
  margin-bottom: 1.5rem;
}

.hero__stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero__stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--accent);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.hero__ip-hint {
  margin: 0;
  min-height: 1.25em;
  font-size: 0.875rem;
  color: var(--accent);
}

/* —— Buttons —— */
.btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.95rem 1.75rem;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #031018;
  box-shadow: 0 12px 32px var(--accent-soft);
}

:root[data-theme="light"] .btn--primary {
  color: #fff;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  box-shadow: 0 16px 40px var(--accent-soft);
  outline: none;
}

.btn--copy {
  font-size: 1.05rem;
  padding: 1.05rem 2rem;
  width: 100%;
  max-width: 320px;
}

.btn--ghost {
  background: var(--glass-highlight);
  color: var(--text);
  border: 1px solid var(--glass-border);
  font-size: 0.85rem;
  padding: 0.65rem 1rem;
  backdrop-filter: blur(8px);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

.btn--google {
  background: #fff;
  color: #1f1f1f;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  flex: 1;
  min-width: 0;
}

:root[data-theme="dark"] .btn--google {
  background: rgba(255, 255, 255, 0.95);
}

.btn--google:hover,
.btn--google:focus-visible {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  outline: none;
}

/* —— Donate cards —— */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
}

@media (max-width: 1024px) {
  .nav__link {
    font-size: 0.82rem;
    padding: 0.45rem 0.65rem;
  }
}

@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.card {
  padding: 1.35rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: transform 0.25s ease, border-color 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--glass-border) 70%, var(--accent));
}

.card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0;
}

.card__desc {
  margin: 0;
  flex: 1;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card__price {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--accent);
}

.card__pay {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

/* —— Profile —— */
.profile-guest {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.profile-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  flex-wrap: wrap;
}

.profile-oauth {
  display: flex;
  flex: 1;
  gap: 0.75rem;
  min-width: 0;
  flex-wrap: wrap;
}

.profile-oauth .btn {
  flex: 1;
  min-width: min(100%, 140px);
}

.btn--oauth__icon {
  flex-shrink: 0;
  display: block;
}

.btn--steam {
  background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%);
  color: #c7d5e0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.btn--steam:hover,
.btn--steam:focus-visible {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  outline: none;
  color: #fff;
}

.profile-site-auth {
  padding: 1.25rem 1.35rem;
}

.profile-form__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
}

.profile-form__lead {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.profile-site-auth__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.profile-site-auth__actions .btn {
  flex: 1;
  min-width: min(100%, 140px);
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

.form-input:hover,
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-status {
  margin: 0;
  min-height: 1.25em;
  font-size: 0.85rem;
}

.form-status.is-error {
  color: #e85d5d;
}

.form-status.is-ok {
  color: var(--accent);
}

.profile-form__submit {
  margin-top: 0.25rem;
  width: 100%;
}

.profile-user {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.15rem;
  padding: 1.25rem 1.35rem;
}

.profile-user__avatar-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  background: var(--glass-highlight);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.profile-user__avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.profile-user__avatar-fb {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--accent);
}

.profile-user__col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.profile-user__main {
  flex: 1;
  min-width: 0;
}

.profile-user__hello {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.profile-user__name {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
}

.profile-user__meta {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  word-break: break-all;
}

.profile-user__provider {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.profile-user__logout {
  align-self: flex-start;
}

.btn-settings {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.btn-settings__icon {
  display: block;
  flex-shrink: 0;
}

.btn-settings:hover,
.btn-settings:focus-visible {
  background: var(--accent-soft);
  transform: scale(1.05);
  outline: none;
}

:root[data-theme="light"] .btn-settings {
  background: rgba(45, 28, 16, 0.92);
  border-color: rgba(255, 255, 255, 0.25);
}

/* —— Downloads —— */
.downloads {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  width: 100%;
}

.downloads li {
  border-bottom: 1px solid var(--glass-border);
}

.downloads li:last-child {
  border-bottom: none;
}

.downloads__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.downloads__link:hover,
.downloads__link:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

.downloads__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-display);
}

/* —— Footer —— */
.footer {
  position: relative;
  z-index: 2;
  width: calc(100% - 2rem);
  margin: 0 auto 1rem;
  padding: 1rem 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer p {
  margin: 0;
}

/* —— Modal —— */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#registerModal,
#loginModal {
  z-index: 110;
}

#accountModal {
  z-index: 115;
}

.modal__dialog--wide {
  max-width: min(440px, 100vw - 2rem);
}

.modal__body--scroll {
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding-right: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

.account-block {
  padding-bottom: 1.15rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.account-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.account-block__label {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.account-avatar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.account-avatar-preview {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  background: var(--glass-highlight);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.account-avatar-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.account-avatar-preview__fb {
  position: absolute;
  inset: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.account-file-label {
  cursor: pointer;
  text-align: center;
  margin: 0;
}

.account-hint {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  min-height: 1.2em;
}

.account-hint--muted {
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.account-check {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
}

.account-check input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
}

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: min(90vh, 640px);
  padding: 1.25rem 1.35rem;
  overflow-y: auto;
  animation: modal-in 0.35s ease both;
}

.modal__switch {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}

.modal__link {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.modal__link:hover,
.modal__link:focus-visible {
  color: var(--text);
  outline: none;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0;
}

.modal__close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: var(--glass-highlight);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.modal__close:hover,
.modal__close:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

.theme-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.theme-row__label {
  font-weight: 600;
  font-size: 0.95rem;
}

.theme-toggle {
  display: flex;
  gap: 0.5rem;
  padding: 4px;
  border-radius: 14px;
  background: var(--glass-highlight);
  border: 1px solid var(--glass-border);
}

.theme-toggle__btn {
  flex: 1;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.theme-toggle__btn:hover,
.theme-toggle__btn:focus-visible {
  color: var(--text);
  outline: none;
}

.theme-toggle__btn.is-active {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--glass-border);
}

/* —— Reveal animations —— */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Stagger inside groups */
.cards .reveal:nth-child(1) {
  transition-delay: 0.05s;
}

.cards .reveal:nth-child(2) {
  transition-delay: 0.12s;
}

.cards .reveal:nth-child(3) {
  transition-delay: 0.19s;
}

/* —— Mobile (Tecno / narrow phones) —— */
@media (max-width: 480px) {
  .blob {
    filter: blur(36px);
  }
}

@media (max-width: 720px) {
  .header {
    width: calc(100% - 1rem);
    margin-top: max(0.5rem, env(safe-area-inset-top));
    flex-wrap: wrap;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    order: 10;
    display: none;
    width: 100%;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.5rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 0.25rem;
  }

  .nav.is-open {
    display: flex;
  }

  .nav__link {
    padding: 0.85rem 1rem;
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .profile-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-oauth {
    flex-direction: column;
  }

  .profile-oauth .btn {
    width: 100%;
    min-width: 0;
  }

  .profile-site-auth__actions {
    flex-direction: column;
  }

  .profile-site-auth__actions .btn {
    width: 100%;
    min-width: 0;
  }

  .btn--google {
    width: 100%;
  }

  .btn-settings {
    width: 100%;
    height: 48px;
  }

  .profile-user {
    flex-direction: row;
    align-items: flex-start;
  }

  .profile-user__logout {
    width: 100%;
  }

  .modal {
    padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
    align-items: flex-end;
  }

  .modal__dialog {
    max-height: min(88dvh, 640px);
    border-radius: 20px 20px 0 0;
  }

  .modal__dialog--wide {
    max-width: 100%;
  }

  #accountModal .modal__dialog {
    width: 100%;
  }

  .main {
    padding: 0.5rem 0.75rem 1.5rem;
  }

  .btn--copy {
    max-width: none;
  }

  .hero__panel {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blob {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .view {
    filter: none;
    transition: none;
  }

  .view__inner,
  .view__inner--enter {
    animation: none;
  }

  .header {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}
