:root {
  --switch-login-label: "Log in";
  --switch-signup-label: "Sign up";
  --bg: linear-gradient(180deg, #f3efe9 0%, #fffdf8 60%, #f5eee6 100%);
  --panel: rgba(255, 255, 255, 0.95);
  --card: #ffffff;
  --text: #2d2a26;
  --muted: #74695f;
  --accent: #db7a2d;
  --border: #d9cbbd;
}

html[data-theme="dark"] {
  --bg: linear-gradient(165deg, #141416 0%, #0e0e10 38%, #080809 100%);
  --panel: rgba(24, 24, 28, 0.94);
  --card: #16161a;
  --text: #ececf0;
  --muted: #9a9aa4;
  --accent: #ff8a3c;
  --border: #323238;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.26) 0, transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(255, 190, 120, 0.14) 0, transparent 24%),
    radial-gradient(circle at 50% 85%, rgba(120, 90, 70, 0.10) 0, transparent 28%);
}
/* РўС‘РјРЅР°СЏ С‚РµРјР°: Р·РІС‘Р·РґС‹ РІ РІРµСЂС…РЅРµР№ С‡Р°СЃС‚Рё СЌРєСЂР°РЅР° + Р»С‘РіРєР°СЏ РґС‹РјРєР° */
html[data-theme="dark"] body::before {
  background:
    radial-gradient(1.2px 1.2px at 6% 6%, rgba(255, 255, 255, 0.95) 50%, transparent 52%),
    radial-gradient(1px 1px at 11% 14%, rgba(255, 255, 255, 0.55) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 18% 8%, rgba(255, 255, 255, 0.75) 50%, transparent 52%),
    radial-gradient(1px 1px at 24% 18%, rgba(255, 255, 255, 0.45) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 31% 5%, rgba(255, 255, 255, 0.88) 50%, transparent 52%),
    radial-gradient(1px 1px at 38% 22%, rgba(255, 255, 255, 0.5) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 44% 10%, rgba(255, 255, 255, 0.7) 50%, transparent 52%),
    radial-gradient(1px 1px at 52% 16%, rgba(255, 255, 255, 0.4) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 58% 7%, rgba(255, 255, 255, 0.85) 50%, transparent 52%),
    radial-gradient(1px 1px at 65% 20%, rgba(255, 255, 255, 0.5) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 72% 9%, rgba(255, 255, 255, 0.65) 50%, transparent 52%),
    radial-gradient(1px 1px at 78% 24%, rgba(255, 255, 255, 0.42) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 85% 6%, rgba(255, 255, 255, 0.9) 50%, transparent 52%),
    radial-gradient(1px 1px at 91% 15%, rgba(255, 255, 255, 0.55) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 95% 22%, rgba(255, 255, 255, 0.48) 50%, transparent 52%),
    radial-gradient(1px 1px at 8% 28%, rgba(255, 255, 255, 0.38) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 16% 32%, rgba(255, 255, 255, 0.52) 50%, transparent 52%),
    radial-gradient(1px 1px at 28% 30%, rgba(255, 255, 255, 0.35) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 42% 34%, rgba(255, 255, 255, 0.6) 50%, transparent 52%),
    radial-gradient(1px 1px at 55% 28%, rgba(255, 255, 255, 0.4) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 68% 32%, rgba(255, 255, 255, 0.58) 50%, transparent 52%),
    radial-gradient(1px 1px at 80% 30%, rgba(255, 255, 255, 0.36) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 92% 34%, rgba(255, 255, 255, 0.5) 50%, transparent 52%),
    radial-gradient(1px 1px at 5% 38%, rgba(255, 255, 255, 0.33) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 22% 40%, rgba(255, 255, 255, 0.45) 50%, transparent 52%),
    radial-gradient(1px 1px at 48% 38%, rgba(255, 255, 255, 0.32) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 74% 40%, rgba(255, 255, 255, 0.42) 50%, transparent 52%),
    radial-gradient(1px 1px at 88% 42%, rgba(255, 255, 255, 0.35) 50%, transparent 52%),
    linear-gradient(180deg, rgba(28, 28, 32, 0.35) 0%, transparent 42%),
    radial-gradient(ellipse 100% 55% at 50% -5%, rgba(55, 55, 62, 0.45) 0%, transparent 55%);
}

/* Р›СѓРЅР° (РїРѕР»СѓРјРµСЃСЏС†) РІРІРµСЂС…Сѓ СЃРїСЂР°РІР° */
html[data-theme="dark"] body::after {
  content: "";
  position: fixed;
  top: 108px;
  right: min(11vw, 120px);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 12px 5px 0 1px rgba(232, 228, 218, 0.94);
  transform: rotate(-22deg);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
  filter: drop-shadow(0 0 14px rgba(255, 248, 230, 0.14));
}

#app {
  min-height: 100%;
  position: relative;
  z-index: 1;
}

.fox-bg {
  position: fixed;
  right: 26px;
  bottom: 22px;
  font-size: 62px;
  opacity: 0.5;
  filter: saturate(1.28) brightness(1.06) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.38));
  pointer-events: none;
  user-select: none;
}

.fox-link {
  position: fixed;
  right: 26px;
  bottom: 22px;
  z-index: 12;
  display: inline-block;
  text-decoration: none;
}

.fox-link .fox-bg {
  position: static;
  display: inline-block;
  pointer-events: auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.fox-link:hover .fox-bg {
  transform: scale(1.08);
  opacity: 0.55;
}

/* Птицы (светлая тема): «галочки» как раньше, ниже и левее кнопки языка */
.topbar-lang-wrap {
  position: relative;
  display: inline-block;
  padding-bottom: 40px;
}

.topbar-lang-wrap .bird-bg {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-150%) rotate(-18deg);
  font-size: 30px;
  line-height: 1;
  opacity: 0.36;
  color: rgba(10, 10, 12, 0.92);
  text-shadow:
    -28px -10px 0 rgba(0, 0, 0, 0.55),
    -15px -18px 0 rgba(0, 0, 0, 0.45),
    12px -18px 0 rgba(0, 0, 0, 0.48),
    28px -8px 0 rgba(0, 0, 0, 0.52);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 5;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35));
}

html[data-theme="dark"] .topbar-lang-wrap .bird-bg {
  opacity: 0;
  filter: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  backdrop-filter: blur(6px);
}
html[data-theme="dark"] .topbar {
  background: linear-gradient(
    180deg,
    rgba(12, 12, 16, 0.28) 0%,
    rgba(10, 10, 14, 0.12) 45%,
    rgba(8, 8, 12, 0.04) 100%
  );
  backdrop-filter: blur(16px) saturate(1.05);
  -webkit-backdrop-filter: blur(16px) saturate(1.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar-actions { display: flex; align-items: flex-start; gap: 10px; }

.btn {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

/* From Uiverse.io by JustCode14 — переключатель темы (класс theme-switch, не .switch у формы входа) */
.theme-switch {
  font-size: 17px;
  position: relative;
  display: inline-block;
  width: 4em;
  height: 2.2em;
  border-radius: 30px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-switch .theme-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #2a2a2a;
  transition: 0.4s;
  border-radius: 30px;
  overflow: hidden;
}

.theme-switch .theme-switch-slider::before {
  position: absolute;
  content: "";
  height: 1.2em;
  width: 1.2em;
  border-radius: 20px;
  left: 0.5em;
  bottom: 0.5em;
  transition: 0.4s;
  transition-timing-function: cubic-bezier(0.81, -0.04, 0.38, 1.5);
  box-shadow: inset 8px -4px 0px 0px #fff;
}

.theme-switch input:checked + .theme-switch-slider {
  background-color: #00a6ff;
}

.theme-switch input:checked + .theme-switch-slider::before {
  transform: translateX(1.8em);
  box-shadow: inset 15px -4px 0px 15px #ffcf48;
}

.theme-switch .star {
  background-color: #fff;
  border-radius: 50%;
  position: absolute;
  width: 5px;
  transition: all 0.4s;
  height: 5px;
}

.theme-switch .star_1 {
  left: 2.5em;
  top: 0.5em;
}

.theme-switch .star_2 {
  left: 2.2em;
  top: 1.2em;
}

.theme-switch .star_3 {
  left: 3em;
  top: 0.9em;
}

.theme-switch input:checked + .theme-switch-slider .star {
  opacity: 0;
}

.theme-switch .cloud {
  width: 3.5em;
  position: absolute;
  bottom: -1.4em;
  left: -1.1em;
  opacity: 0;
  transition: all 0.4s;
}

.theme-switch input:checked + .theme-switch-slider .cloud {
  opacity: 1;
}

.video-sections-row {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin: 6px 0 18px;
}

.sections-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: min(260px, calc(100vw - 48px));
  box-sizing: border-box;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] .sections-panel {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}
.sections-panel ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sections-panel li button {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 18px 28px;
}

.brand-title {
  margin: 2px 0 14px;
  text-align: center;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 1px;
  font-family: "Segoe Print", "Brush Script MT", "Comic Sans MS", cursive;
  color: var(--text);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pagination {
  margin: 18px 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pagination .btn {
  min-width: 44px;
}

.page-info {
  min-width: 140px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.03));
  position: relative;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}
.thumb::after {
  content: "в–¶";
  position: absolute;
  right: 12px;
  bottom: 8px;
  color: #fff;
  opacity: .85;
}
.thumb-loading {
  filter: saturate(0.85) brightness(0.96);
}

.thumb-has-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.25));
}
.meta {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.title { font-size: 14px; font-weight: 700; }
.sub { font-size: 12px; color: var(--muted); }
.badge {
  align-self: flex-start;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  border: 1px solid var(--border);
}
.sub-cta {
  width: 100%;
  margin-top: 6px;
  font-size: 13px;
  padding: 8px 10px;
}

.modal[hidden] { display: none !important; }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.account-card {
  position: relative;
  width: min(92vw, 430px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 42px 16px 16px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
}
.account-card h3 {
  margin: 0 0 14px;
}
.account-row {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text);
}
.account-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.account-actions .btn {
  flex: 1;
}
.account-message {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.modal-inner {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
  padding: 44px 18px 18px;
  overflow: visible;
}
.close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
}

.wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 8px 0 18px;
}

html[data-theme="dark"] .wrapper {
  --font-color: #ececf0;
  --font-color-sub: #9a9aa4;
  --bg-color: #1a1a1f;
  --main-color: #c8c8d4;
}
.form-container {
  width: min(100%, 350px);
  min-height: 430px;
  background-color: var(--bg-color);
  box-shadow: rgba(0, 0, 0, 0.2) 0 12px 28px;
  border-radius: 16px;
  box-sizing: border-box;
  padding: 26px 30px 24px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.auth-form-panel,
.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.form {
  margin-bottom: 15px;
}

.form[hidden],
.auth-form-panel[hidden],
.form-container[hidden],
.auth-extra-panel[hidden] {
  display: none !important;
}

.input {
  width: 100%;
  border-radius: 20px;
  border: 1px solid #c0c0c0;
  outline: 0;
  box-sizing: border-box;
  padding: 12px 15px;
  background: var(--bg-color);
  font-size: 15px;
  color: var(--font-color);
}

.input::placeholder {
  color: var(--font-color-sub);
  opacity: 0.9;
}

.input:focus {
  border-color: #148f8f;
}

.input.input-error {
  border-color: #e24b4b;
  box-shadow: 0 0 0 3px rgba(226, 75, 75, 0.08);
}

.form-error {
  min-height: 18px;
  font-size: 12px;
  color: #d63b3b;
  font-weight: 600;
  text-align: left;
  padding-left: 2px;
}

.form-error-centered {
  text-align: center;
  padding-left: 0;
}

.page-link {
  text-decoration: underline;
  margin: -4px 0 0;
  text-align: end;
  color: #747474;
  text-decoration-color: #747474;
}

.page-link-label {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

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

.form-btn {
  padding: 10px 15px;
  border-radius: 20px;
  border: 0;
  outline: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: rgba(0, 0, 0, 0.24) 0 3px 8px;
  font-size: 15px;
  font-weight: 700;
}

.form-btn:hover {
  filter: brightness(1.06);
}

.form-btn:active {
  box-shadow: none;
  filter: brightness(0.98);
}

.sign-up-label {
  margin: 0;
  font-size: 12px;
  color: #747474;
  text-align: center;
}

.sign-up-link {
  margin-left: 4px;
  font-size: 13px;
  text-decoration: underline;
  text-decoration-color: teal;
  color: teal;
  cursor: pointer;
  font-weight: 800;
}

.auth-panel-links .sign-up-link {
  margin-left: 0;
}

.auth-link-btn {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--font-color-sub);
  text-decoration: underline;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}

.auth-extra-panel {
  width: min(100%, 350px);
  margin: 8px auto 0;
  border-radius: 16px;
  background: var(--bg-color);
  padding: 26px 30px 24px;
  box-shadow: rgba(0, 0, 0, 0.2) 0 12px 28px;
}

.form-container .title,
.auth-extra-panel .title {
  text-align: center;
  font-size: 30px;
  margin: 8px 0 28px;
}

.auth-extra-hint {
  margin: 8px 0 12px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

.auth-extra-timer {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  color: var(--accent);
}

.verify-code-group {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 4px 0 8px;
}

.verify-code-digit {
  width: 46px;
  height: 58px;
  border-radius: 12px;
  border: 2px solid rgba(86, 114, 255, 0.22);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(86, 114, 255, 0.08);
  text-align: center;
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  outline: none;
}

.forgot-code-digit {
  width: 46px;
  height: 58px;
  border-radius: 12px;
  border: 2px solid rgba(86, 114, 255, 0.22);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(86, 114, 255, 0.08);
  text-align: center;
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  outline: none;
}

.forgot-code-digit:focus {
  border-color: #5672ff;
  box-shadow: 0 0 0 4px rgba(86, 114, 255, 0.12);
}

.forgot-code-digit.verify-code-error {
  border-color: #df5a5a;
  box-shadow: 0 0 0 4px rgba(223, 90, 90, 0.12);
  background: rgba(255, 240, 240, 0.96);
}

.verify-code-digit:focus {
  border-color: #5672ff;
  box-shadow: 0 0 0 4px rgba(86, 114, 255, 0.12);
}

.verify-code-digit.verify-code-error {
  border-color: #df5a5a;
  box-shadow: 0 0 0 4px rgba(223, 90, 90, 0.12);
  background: rgba(255, 240, 240, 0.96);
}

html[data-theme="dark"] .verify-code-digit {
  background: rgba(26, 26, 31, 0.95);
  color: var(--text);
  border-color: rgba(112, 138, 255, 0.35);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .forgot-code-digit {
  background: rgba(26, 26, 31, 0.95);
  color: var(--text);
  border-color: rgba(112, 138, 255, 0.35);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .verify-code-digit.verify-code-error {
  background: rgba(76, 28, 28, 0.95);
  border-color: rgba(255, 117, 117, 0.85);
  box-shadow: 0 0 0 4px rgba(255, 117, 117, 0.1);
}

html[data-theme="dark"] .forgot-code-digit.verify-code-error {
  background: rgba(76, 28, 28, 0.95);
  border-color: rgba(255, 117, 117, 0.85);
  box-shadow: 0 0 0 4px rgba(255, 117, 117, 0.1);
}

@media (max-width: 480px) {
  .modal-inner {
    margin: 10px;
    padding: 42px 10px 12px;
  }
  .form-container,
  .auth-extra-panel {
    padding: 18px 16px;
  }
  .verify-code-group {
    gap: 6px;
  }
  .verify-code-digit {
    width: 40px;
    height: 52px;
    font-size: 24px;
  }
  .brand-title {
    font-size: 28px;
  }
}

/* Pricing tiers (layout inspired by Uiverse-style cards) */
.pricing-panel {
  position: relative;
  width: min(96vw, 920px);
  max-height: min(92vh, 900px);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 20px 24px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
}

.pricing-heading {
  margin: 0 0 20px;
  font-size: 1.35rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  letter-spacing: -0.02em;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

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

.tier-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 24px;
  border: 1px solid var(--border);
  overflow: hidden;
  min-height: 100%;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tier-card-featured {
  box-shadow: 0 0 0 2px var(--accent);
}

.tier-card:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] .tier-card:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.tier-card-body {
  padding: 28px 22px 20px;
}

@media (min-width: 640px) {
  .tier-card-body {
    padding: 32px 28px 24px;
  }
}

.tier-card-text {
  text-align: left;
}

.tier-name {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--muted);
}

.tier-desc {
  margin: 10px 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
}

.tier-price-wrap {
  margin-top: 22px;
}

.tier-price-line {
  margin: 0;
  line-height: 1;
}

.tier-price-num {
  font-size: clamp(2.5rem, 6vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--text);
}

.tier-price-period {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}

.tier-card-footer {
  padding: 0 22px 28px;
}

@media (min-width: 640px) {
  .tier-card-footer {
    padding: 0 28px 32px;
  }
}

.tier-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 22px;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  color: #fff;
  background: #0a0a0a;
  border: 2px solid #0a0a0a;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tier-cta:hover:not(:disabled) {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}

.tier-cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pricing-error {
  margin: 16px 8px 0;
  text-align: center;
  font-size: 0.875rem;
  color: #d63b3b;
  font-weight: 600;
}

.video-modal-card {
  position: relative;
  width: min(96vw, 960px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 44px 12px 12px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
}

.video-modal-title {
  margin: 0 36px 10px 6px;
  font-size: 18px;
  font-weight: 700;
}

.video-player {
  width: 100%;
  max-height: min(72vh, 620px);
  border-radius: 10px;
  background: #000;
  display: block;
}

.video-loading,
.video-error {
  margin: 0 6px 10px;
  font-size: 14px;
}

.video-error {
  color: #d63b3b;
  font-weight: 600;
}

.about-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.about-card {
  width: min(92vw, 760px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 22px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
}

.about-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}

.about-theme-btn {
  min-width: 46px;
  font-size: 18px;
  line-height: 1;
}

.about-title {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 38px);
}

.about-text {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
}

.about-socials {
  margin-top: 34px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.about-socials-title {
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: 0.4px;
}

.about-social-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.about-telegram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  background: transparent;
  transition: transform 0.2s ease;
}

.about-telegram:hover {
  transform: translateY(-2px) scale(1.02);
}

.telegram-icon {
  width: 86px;
  height: 86px;
  display: block;
}

.about-tiktok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  text-decoration: none;
  background: transparent;
  transition: transform 0.2s ease;
}

.about-tiktok:hover {
  transform: translateY(-2px) scale(1.02);
}

.tiktok-icon {
  width: 86px;
  height: 86px;
  display: block;
}

.about-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-back:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

/* App shell: sidebar categories + main */
.app-layout {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

.app-layout-main {
  flex: 1;
  min-width: 0;
  position: relative;
}

.category-sidebar {
  flex: 0 0 236px;
  width: 236px;
  padding: 20px 16px 28px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.45) 100%);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  align-self: flex-start;
  min-height: 100vh;
  box-sizing: border-box;
  z-index: 2;
}

@media (min-width: 761px) {
  html.page-category .category-sidebar {
    transition:
      flex 0.22s ease,
      opacity 0.2s ease,
      padding 0.22s ease,
      border-color 0.22s ease;
  }

  html.page-category.sidebar-collapsed .category-sidebar {
    flex: 0 0 0;
    width: 0;
    min-width: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    border-right-width: 0;
  }

  html.page-category:not(.sidebar-collapsed) .category-sidebar {
    opacity: 1;
  }
}

.category-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.category-sidebar-head .category-sidebar-title {
  margin: 0;
  flex: 1;
}

.category-sidebar-collapse-btn {
  flex-shrink: 0;
  padding: 7px 10px;
  font-size: 14px;
  line-height: 1;
  min-width: auto;
}

.category-sidebar-open-fab {
  position: fixed;
  left: 0;
  top: min(186px, 30vh);
  z-index: 35;
  border-radius: 0 12px 12px 0;
  padding: 14px 10px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  line-height: 1.25;
  box-shadow: 4px 6px 22px rgba(0, 0, 0, 0.16);
}

html[data-theme="dark"] .category-sidebar-open-fab {
  box-shadow: 4px 8px 28px rgba(0, 0, 0, 0.42);
}

html.page-home .category-sidebar-collapse-btn,
html.page-home .category-sidebar-open-fab {
  display: none !important;
}

html[data-theme="dark"] .category-sidebar {
  background: linear-gradient(
    180deg,
    rgba(18, 18, 22, 0.34) 0%,
    rgba(12, 12, 16, 0.2) 55%,
    rgba(10, 10, 14, 0.12) 100%
  );
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  border-right-color: rgba(255, 255, 255, 0.06);
}

.category-sidebar-title {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

.category-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.category-nav-link:hover {
  background: var(--card);
  border-color: var(--border);
}

.category-nav-link.is-active {
  background: var(--card);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(219, 122, 45, 0.22);
}

html.page-home #videoBrowse {
  display: none !important;
}

html.page-category #homeAbout {
  display: none !important;
}

html.page-home .topbar,
html.page-category .topbar {
  justify-content: flex-end;
}

.home-brand-banner {
  margin: 4px auto 26px;
  max-width: 100%;
  text-align: center;
}

html.page-home .fox-link {
  display: none !important;
}

.home-about-full {
  width: 100%;
  max-width: none;
  padding: clamp(28px, 5vw, 56px) clamp(18px, 5vw, 48px) 48px;
  box-sizing: border-box;
}

.home-about-inner {
  max-width: min(920px, 100%);
  margin: 0;
}

.home-about-full .about-title {
  text-align: left;
}

.home-about-full .about-text {
  max-width: 62ch;
}

.home-about-socials.about-socials {
  text-align: left;
}

.home-about-socials .about-social-links {
  justify-content: flex-start;
}

@media (max-width: 760px) {
  .app-layout {
    flex-direction: column;
  }

  .category-sidebar {
    position: relative;
    width: 100%;
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 14px 14px 12px;
  }

  .category-sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .category-nav-link {
    flex: 1 1 auto;
    min-width: 44%;
    text-align: center;
  }
}
