:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: rgba(18, 18, 18, 0.84);
  --panel-strong: rgba(24, 24, 24, 0.96);
  --ink: #f8fafc;
  --muted: #a6a6a6;
  --line: rgba(248, 250, 252, 0.12);
  --line-strong: rgba(248, 250, 252, 0.22);
  --blue: #f8fafc;
  --blue-soft: #262626;
  --cyan: #f8fafc;
  --danger: #e5484d;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.48);
  --radius: 8px;
  --body-font: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  --heading-font: "Space Grotesk", Manrope, ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  font-family:
    var(--body-font), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.12), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(118deg, rgba(16, 16, 16, 0.98), rgba(3, 3, 3, 1) 44%, rgba(12, 12, 12, 0.98)),
    repeating-linear-gradient(136deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 68px),
    var(--bg);
  background-size: auto, auto, auto, 260px 260px, auto;
}

body.is-intro-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

body::after {
  content: "";
  position: fixed;
  inset: -20vh -10vw;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 8%, rgba(255, 255, 255, 0.075) 18%, transparent 30%),
    linear-gradient(145deg, transparent 52%, rgba(255, 255, 255, 0.07) 62%, transparent 78%),
    linear-gradient(30deg, rgba(255, 255, 255, 0.03), transparent 44%);
  filter: blur(18px);
  opacity: 0.82;
  transform: rotate(-2deg);
}

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

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

button {
  cursor: pointer;
}

#siteTexture {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.82;
}

.intro-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #f8fafc;
  background:
    radial-gradient(circle at var(--intro-x, 50%) var(--intro-y, 50%), rgba(255, 255, 255, 0.13), transparent 22%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), transparent 36%),
    linear-gradient(135deg, #0f0f0f, #030303 58%, #090909);
  transition:
    opacity 0.75s ease,
    visibility 0.75s ease;
}

.intro-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

.intro-gate.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

#introParticles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.72;
}

.intro-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 28px;
  width: min(760px, calc(100% - 42px));
}

.intro-copy {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 22px;
  width: min(260px, 62vw);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: #f8fafc;
  opacity: var(--intro-copy-opacity, 1);
  transform:
    translateY(calc(var(--intro-progress, 0) * -18px))
    scale(calc(1 - var(--intro-progress, 0) * 0.08));
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.intro-copy span,
.intro-copy strong {
  display: block;
  font-family: var(--heading-font);
  letter-spacing: 0.56em;
  text-align: center;
  text-indent: 0.56em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.28);
}

.intro-copy span {
  color: rgba(248, 250, 252, 0.74);
  font-size: 13px;
  font-weight: 800;
}

.intro-copy strong {
  font-size: 22px;
  font-weight: 900;
}

.intro-copy i {
  width: 132px;
  height: 3px;
  background: #f8fafc;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.38);
  transform: scaleX(max(0.16, var(--intro-progress, 0)));
  transform-origin: left center;
}

.intro-mark {
  position: relative;
  width: min(610px, 82vw);
  aspect-ratio: 1.2 / 1;
  filter: drop-shadow(0 28px 52px rgba(0, 0, 0, 0.68));
  opacity: var(--intro-logo-opacity, 0);
  transform:
    translateY(8px)
    scale(calc(0.9 + var(--intro-logo-opacity, 0) * 0.06));
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.intro-gate.is-bursting .intro-mark {
  opacity: 0;
  transform: translateY(8px) scale(1.04);
  transition:
    opacity 0.32s ease,
    transform 0.45s ease;
}

.intro-mark svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  shape-rendering: geometricPrecision;
}

.intro-mark path {
  vector-effect: non-scaling-stroke;
}

.intro-mark-ghost {
  fill: rgba(248, 250, 252, 0.13);
  stroke: rgba(248, 250, 252, 0.22);
  stroke-width: 1;
}

.intro-mark-fill {
  fill: url("#introMetal");
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 0.45;
  stroke-linejoin: miter;
  transition: clip-path 0.08s linear;
}

.intro-fill-f {
  clip-path: inset(0 calc((1 - var(--intro-f, 0)) * 100%) 0 0);
}

.intro-fill-m {
  clip-path: inset(0 calc((1 - var(--intro-m, 0)) * 100%) 0 0);
}

.intro-mark-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 190;
  stroke-dashoffset: calc(190 * (1 - var(--intro-progress, 0)));
}

.hold-label {
  margin: -22px 0 0;
  color: #f8fafc;
  background: transparent;
  letter-spacing: 0;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 900;
  opacity: 0.72;
  animation: holdPulse 1.5s ease-in-out infinite;
}

.top-marquee {
  position: sticky;
  top: 0;
  z-index: 30;
  overflow: hidden;
  height: 42px;
  border-block: 1px solid rgba(248, 250, 252, 0.1);
  color: #f8fafc;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.015)),
    rgba(3, 3, 3, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  min-width: max-content;
  height: 100%;
  animation: marqueeMove 42s linear infinite;
  will-change: transform;
}

.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.marquee-track span::after {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid rgba(248, 250, 252, 0.72);
  border-radius: 999px;
}

.app-shell {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 56px;
}

.topbar {
  position: sticky;
  top: 58px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px;
  border: 1px solid rgba(248, 250, 252, 0.14);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(12, 12, 12, 0.74)),
    rgba(9, 9, 9, 0.8);
  backdrop-filter: blur(24px) saturate(125%);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.36);
  transition:
    border-color 0.35s ease,
    background 0.35s ease,
    transform 0.35s ease;
}

.social-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.social-links.is-hidden {
  display: none;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(248, 250, 252, 0.18);
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.055);
  font-size: 12px;
  font-weight: 850;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    color 0.25s ease;
}

.social-links a:hover {
  color: #080808;
  background: #f8fafc;
  transform: translateY(-2px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand img {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand strong {
  font-size: 15px;
  font-family: var(--heading-font);
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.nav-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 58px;
  padding: 6px;
  border: 1px solid rgba(248, 250, 252, 0.22);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
}

.nav-tabs a,
.segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  text-align: center;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  transition:
    color 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease;
}

.nav-tabs a:hover,
.nav-tabs a.is-active,
.segmented button:hover,
.segmented button.is-active {
  color: var(--ink);
  border-color: var(--line-strong);
  background: rgba(248, 250, 252, 0.07);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(248, 250, 252, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
}

.lang-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  line-height: 1;
  font-size: 12px;
  font-weight: 800;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease;
}

.lang-switch button:hover,
.lang-switch button.is-active {
  color: #05070d;
  background: #f8fafc;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

main {
  min-height: 720px;
}

.view {
  display: none;
  padding-top: 44px;
}

.view.is-visible {
  display: block;
  animation: enter 0.72s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes marqueeMove {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes holdPulse {
  0%,
  100% {
    opacity: 0.45;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(2px);
  }
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 26px;
  align-items: center;
  min-height: calc(100vh - 178px);
  padding: 54px 0 34px;
}

.hero-copy {
  max-width: 760px;
}

.profile-strip {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  margin: 0 0 24px;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035)),
    rgba(12, 12, 12, 0.74);
  box-shadow: 0 16px 54px rgba(0, 0, 0, 0.22);
  animation: softFloat 5.8s ease-in-out infinite;
}

.client-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 26px;
}

.client-bar span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(248, 250, 252, 0.12);
  border-radius: 999px;
  color: #d8d8d8;
  background: rgba(255, 255, 255, 0.055);
  font-size: 12px;
}

.profile-strip img {
  width: 58px;
  height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  object-fit: cover;
  background: #030303;
}

.profile-strip strong,
.profile-strip span {
  display: block;
}

.profile-strip strong {
  margin-bottom: 4px;
}

.profile-strip span {
  color: var(--muted);
  font-size: 13px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 22px;
  font-family: var(--heading-font);
  font-size: clamp(42px, 6.4vw, 82px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-family: var(--heading-font);
  font-size: clamp(32px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-family: var(--heading-font);
  font-size: 20px;
}

.lead {
  max-width: 680px;
  margin-bottom: 28px;
  color: #d8d8d8;
  font-size: 20px;
  line-height: 1.55;
}

.hero-actions,
.admin-actions,
.lock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-actions.compact {
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 28px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  transition:
    transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.32s ease,
    background 0.32s ease,
    box-shadow 0.32s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.58);
  box-shadow: 0 14px 34px rgba(255, 255, 255, 0.08);
}

.btn-primary {
  border-color: rgba(255, 255, 255, 0.92);
  color: #05070d;
  background: linear-gradient(180deg, #ffffff, #dfdfdf);
  font-weight: 800;
}

.btn-secondary {
  border-color: rgba(248, 250, 252, 0.28);
  background: rgba(255, 255, 255, 0.065);
}

.btn-danger {
  border-color: rgba(229, 72, 77, 0.7);
  background: rgba(229, 72, 77, 0.16);
}

.import-site-state {
  position: relative;
  overflow: hidden;
}

.import-site-state input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.hero-console,
.service-card,
.portfolio-card,
.game-panel,
.admin-block,
.lead-form,
.admin-login {
  border: 1px solid rgba(248, 250, 252, 0.13);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    var(--panel);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
}

.hero-console {
  overflow: hidden;
  animation: consoleDrift 7s ease-in-out infinite;
}

.console-head {
  display: flex;
  gap: 7px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.console-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}

.console-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
}

.console-grid article {
  min-height: 126px;
  padding: 22px;
  background: rgba(12, 12, 12, 0.9);
}

.console-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 42px;
  line-height: 1;
}

.console-grid small,
.muted {
  color: var(--muted);
}

.hero-console pre {
  margin: 0;
  padding: 22px;
  overflow: auto;
  color: #e5e5e5;
  background: rgba(0, 0, 0, 0.34);
}

.quick-stats,
.service-grid,
.portfolio-grid,
.games-layout,
.admin-grid {
  display: grid;
  gap: 16px;
}

.quick-stats {
  grid-template-columns: repeat(3, 1fr);
  padding-bottom: 18px;
}

.quick-stats article {
  padding: 18px;
  border: 1px solid rgba(248, 250, 252, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.quick-stats span,
.timeline span,
.service-card span {
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-stats strong {
  display: block;
  margin: 8px 0;
}

.quick-stats p,
.service-card p,
.portfolio-card p,
.timeline p,
.game-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.section-head {
  max-width: 880px;
  margin-bottom: 26px;
}

.section-head.with-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  max-width: none;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
}

.service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-card,
.portfolio-card,
.game-panel,
.admin-block {
  padding: 22px;
  transition:
    transform 0.46s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.46s ease,
    background 0.46s ease,
    box-shadow 0.46s ease;
}

.service-card:hover,
.portfolio-card:hover,
.game-panel:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(22, 22, 22, 0.94);
  box-shadow: 0 28px 92px rgba(0, 0, 0, 0.58);
}

.service-card strong {
  display: block;
  margin-top: 24px;
  color: var(--ink);
}

.portfolio-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portfolio-empty {
  grid-column: 1 / -1;
  max-width: 720px;
  padding: 30px;
  border: 1px dashed rgba(248, 250, 252, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    rgba(12, 12, 12, 0.86);
  box-shadow: var(--shadow);
}

.portfolio-empty span {
  display: block;
  margin-bottom: 12px;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.portfolio-empty p {
  max-width: 540px;
  color: var(--muted);
  line-height: 1.6;
}

.portfolio-card {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  animation: cardRise 0.72s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.portfolio-cover {
  display: block;
  height: 132px;
  margin: -22px -22px 20px;
  background:
    linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.16), transparent),
    linear-gradient(135deg, color-mix(in srgb, var(--project-accent), white 18%), transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 24px),
    #111111;
  background-size:
    200% 100%,
    auto,
    auto,
    auto;
  animation: cardScan 6.5s ease-in-out infinite;
}

.portfolio-cover.has-image {
  background-position: center;
  background-size: cover;
  animation: imageBreathe 8s ease-in-out infinite;
}

.portfolio-cover.has-image::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.38)),
    linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  background-size: auto, 220% 100%;
  animation: cardScan 7s ease-in-out infinite;
}

.portfolio-card:nth-child(2) {
  animation-delay: 0.06s;
}

.portfolio-card:nth-child(3) {
  animation-delay: 0.12s;
}

.portfolio-card:nth-child(4) {
  animation-delay: 0.18s;
}

.portfolio-card:nth-child(5) {
  animation-delay: 0.24s;
}

.portfolio-card:nth-child(6) {
  animation-delay: 0.3s;
}

.portfolio-card h3 {
  padding-right: 38px;
}

.portfolio-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.portfolio-card .tag,
.site-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  text-align: center;
}

.site-link {
  color: var(--ink);
  border-color: rgba(102, 227, 255, 0.3);
  background: rgba(31, 111, 235, 0.18);
  transition:
    transform 0.28s ease,
    background 0.28s ease;
}

.site-link:hover {
  transform: translateY(-1px);
  background: rgba(31, 111, 235, 0.32);
}

.portfolio-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  line-height: 1;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.timeline article {
  min-height: 260px;
  padding: 24px;
  background: rgba(8, 14, 25, 0.9);
}

.games-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.game-panel {
  position: relative;
  overflow: hidden;
}

.game-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.52;
  background:
    radial-gradient(circle at 18% 14%, rgba(102, 227, 255, 0.22), transparent 28%),
    radial-gradient(circle at 88% 20%, rgba(255, 88, 188, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 48%);
}

.game-panel > * {
  position: relative;
  z-index: 1;
}

.game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.game-head strong {
  color: #f8fafc;
}

.game-note {
  min-height: 52px;
  margin-bottom: 16px;
  color: #b7c6d9;
  font-size: 14px;
  line-height: 1.55;
}

.game-stats,
.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.game-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(248, 250, 252, 0.12);
  border-radius: 999px;
  color: #e8e8e8;
  background: rgba(255, 255, 255, 0.07);
  font-size: 13px;
}

.game-stats b {
  margin-left: 4px;
  color: #ffffff;
}

.rush-grid,
.pulse-pads {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.rush-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rush-grid button {
  aspect-ratio: 1;
  border: 1px solid rgba(248, 250, 252, 0.12);
  border-radius: 18px;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.045);
  transition:
    transform 0.24s ease,
    background 0.24s ease,
    box-shadow 0.24s ease;
}

.rush-grid button:hover {
  transform: scale(0.96);
}

.rush-grid button.is-target {
  animation: targetPulse 0.78s ease-in-out infinite;
  transform: scale(1.04);
}

.rush-grid button.is-miss {
  background: rgba(229, 72, 77, 0.38);
  box-shadow: 0 0 24px rgba(229, 72, 77, 0.32);
}

.rush-blue {
  background: linear-gradient(145deg, #2f81f7, #66e3ff) !important;
  box-shadow: 0 0 32px rgba(102, 227, 255, 0.52);
}

.rush-cyan {
  background: linear-gradient(145deg, #00d4ff, #7dd3fc) !important;
  box-shadow: 0 0 32px rgba(125, 211, 252, 0.52);
}

.rush-pink {
  background: linear-gradient(145deg, #ff4ecd, #7c3aed) !important;
  box-shadow: 0 0 32px rgba(255, 78, 205, 0.44);
}

.rush-lime {
  background: linear-gradient(145deg, #a3e635, #22c55e) !important;
  box-shadow: 0 0 32px rgba(163, 230, 53, 0.42);
}

.rush-amber {
  background: linear-gradient(145deg, #fbbf24, #f97316) !important;
  box-shadow: 0 0 32px rgba(251, 191, 36, 0.42);
}

.pulse-status {
  min-height: 24px;
  margin-bottom: 14px;
  color: #e2e8f0;
}

.pulse-pads {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pulse-pad {
  min-height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  opacity: 0.78;
  transition:
    transform 0.2s ease,
    filter 0.2s ease,
    opacity 0.2s ease,
    box-shadow 0.2s ease;
}

.pulse-pad:hover,
.pulse-pad.is-lit {
  transform: translateY(-3px) scale(1.02);
  opacity: 1;
  filter: saturate(135%) brightness(1.08);
}

.pulse-ocean {
  background: linear-gradient(145deg, #0ea5e9, #1d4ed8);
  box-shadow: 0 20px 54px rgba(14, 165, 233, 0.25);
}

.pulse-violet {
  background: linear-gradient(145deg, #a855f7, #4c1d95);
  box-shadow: 0 20px 54px rgba(168, 85, 247, 0.24);
}

.pulse-sun {
  background: linear-gradient(145deg, #facc15, #f97316);
  box-shadow: 0 20px 54px rgba(250, 204, 21, 0.22);
}

.pulse-mint {
  background: linear-gradient(145deg, #34d399, #0f766e);
  box-shadow: 0 20px 54px rgba(52, 211, 153, 0.22);
}

.pulse-pad.is-lit {
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.2),
    0 0 58px rgba(255, 255, 255, 0.34);
}

@keyframes targetPulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.25) saturate(1.25);
  }
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 28px;
}

.lead-form,
.admin-login {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 22px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 13px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.22);
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 255, 255, 0.58);
}

.span-2 {
  grid-column: span 2;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: #f8fafc;
}

.telegram-status {
  font-size: 14px;
  line-height: 1.45;
}

.cloud-panel {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  align-items: center;
}

.cloud-status {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 13px;
  line-height: 1.35;
}

.cloud-status[data-tone="good"] {
  border-color: rgba(87, 255, 168, 0.5);
  color: #c8ffe0;
}

.cloud-status[data-tone="bad"] {
  border-color: rgba(255, 105, 105, 0.58);
  color: #ffd1d1;
}

.admin-login {
  max-width: 560px;
  align-items: end;
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-grid.is-hidden,
.admin-login.is-hidden {
  display: none;
}

.admin-block {
  display: grid;
  gap: 14px;
  background: var(--panel-strong);
}

.admin-block.wide {
  grid-column: span 2;
}

.avatar-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.avatar-preview img {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}

.avatar-preview small {
  color: var(--muted);
  line-height: 1.4;
}

.editor-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
}

.text-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.text-editor-grid label {
  min-width: 0;
}

.text-editor-grid textarea {
  min-height: 96px;
}

.project-manager {
  display: grid;
  gap: 12px;
}

.project-edit-card {
  display: grid;
  grid-template-columns: 1fr 150px 1fr 90px;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.project-image-admin,
.project-edit-card textarea,
.project-edit-actions {
  grid-column: span 4;
}

.project-image-admin {
  display: grid;
  grid-template-columns: 170px minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.project-image-preview {
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 18px),
    #111111;
}

.project-image-preview.has-image {
  background-position: center;
  background-size: cover;
}

.project-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--muted);
  font-size: 13px;
}

th {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.project-form {
  display: grid;
  grid-template-columns: 1fr 160px 1fr 88px 1fr;
  gap: 12px;
}

.project-photo-field {
  grid-column: span 2;
}

.project-form textarea,
.project-form button {
  grid-column: span 5;
}

.dialog-image {
  width: 100%;
  max-height: 320px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  object-fit: cover;
}

dialog {
  width: min(720px, calc(100% - 32px));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background: #070d17;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

#dialogContent {
  padding: 24px 34px 24px 10px;
}

@keyframes softFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes consoleDrift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
}

@keyframes cardScan {
  0%,
  100% {
    background-position:
      -120% 0,
      0 0,
      0 0,
      0 0;
  }
  50% {
    background-position:
      120% 0,
      0 0,
      0 0,
      0 0;
  }
}

@keyframes imageBreathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.035);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .marquee-track {
    animation-duration: 42s !important;
    animation-iteration-count: infinite !important;
  }
}

@media (max-width: 1020px) {
  .hero-band,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .service-grid,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .intro-content {
    width: min(100% - 28px, 520px);
    gap: 18px;
  }

  .intro-copy {
    width: min(230px, 70vw);
  }

  .intro-copy span,
  .intro-copy strong {
    letter-spacing: 0.34em;
    text-indent: 0.34em;
  }

  .intro-mark {
    width: min(430px, 92vw);
  }

  .top-marquee {
    height: 34px;
    border-color: rgba(248, 250, 252, 0.12);
  }

  .marquee-track span {
    padding: 0 14px;
    font-size: 11px;
    letter-spacing: 0;
  }

  .marquee-track span::after {
    width: 6px;
    height: 6px;
  }

  .app-shell {
    width: min(100% - 28px, 1240px);
    padding-top: 10px;
  }

  .topbar {
    top: 42px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 12px;
    padding: 12px;
    border-radius: 28px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    width: 100%;
    overflow: hidden;
  }

  .brand span {
    min-width: 0;
    overflow: hidden;
  }

  .brand img {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
  }

  .brand strong {
    max-width: 180px;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand small {
    max-width: 180px;
    overflow: hidden;
    font-size: 9px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .menu-toggle {
    grid-column: 2;
    grid-row: 1;
    display: block;
    flex: 0 0 auto;
  }

  .nav-tabs {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    justify-content: stretch;
    padding: 8px;
    border: 1px solid var(--line);
    background: rgba(10, 10, 10, 0.96);
    border-radius: 24px;
  }

  .nav-tabs.is-open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-tabs a {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .lang-switch {
    grid-column: 1;
    grid-row: 2;
    width: max-content;
    justify-content: center;
    margin-left: 0;
  }

  .lang-switch button {
    width: 50px;
    height: 36px;
  }

  .social-links {
    grid-column: 2;
    grid-row: 2;
    width: auto;
    justify-content: flex-end;
  }

  .social-links a {
    min-width: 42px;
    height: 42px;
    padding: 0 13px;
  }

  .hero-band {
    min-height: auto;
    gap: 18px;
    padding-top: 28px;
  }

  .profile-strip {
    align-items: flex-start;
    width: 100%;
    padding: 10px;
    border-radius: 16px;
  }

  .profile-strip img {
    width: 54px;
    height: 54px;
    border-radius: 12px;
  }

  .profile-strip strong {
    font-size: 15px;
    line-height: 1.25;
  }

  .profile-strip span {
    font-size: 12px;
    line-height: 1.35;
  }

  .client-bar span {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .console-grid {
    grid-template-columns: 1fr;
  }

  .rush-grid {
    gap: 8px;
  }

  .pulse-pad {
    min-height: 104px;
  }

  .quick-stats,
  .service-grid,
  .portfolio-grid,
  .timeline,
  .games-layout,
  .admin-grid,
  .lead-form,
  .project-form {
    grid-template-columns: 1fr;
  }

  .section-head.with-tools {
    display: grid;
  }

  .span-2,
  .admin-block.wide,
  .project-form textarea,
  .project-photo-field,
  .project-form button,
  .project-image-admin,
  .project-edit-card textarea,
  .project-edit-actions {
    grid-column: auto;
  }

  .editor-toolbar,
  .text-editor-grid,
  .cloud-panel,
  .project-image-admin,
  .project-edit-card {
    grid-template-columns: 1fr;
  }

  .cloud-status {
    width: 100%;
    border-radius: 18px;
  }

  h1 {
    font-size: clamp(38px, 10vw, 46px);
    line-height: 1.05;
    word-break: normal;
    overflow-wrap: normal;
  }

  h2 {
    font-size: clamp(30px, 10vw, 46px);
  }
}

@media (max-width: 420px) {
  .app-shell {
    width: min(100% - 24px, 1240px);
  }

  .topbar {
    gap: 9px;
    padding: 10px;
  }

  .brand {
    gap: 10px;
  }

  .brand strong {
    max-width: 150px;
    font-size: 13px;
  }

  .brand small {
    max-width: 150px;
    font-size: 8px;
  }

  .lang-switch button {
    width: 45px;
  }

  .social-links {
    gap: 5px;
  }

  .social-links a {
    min-width: 39px;
    height: 39px;
    padding: 0 11px;
  }

  .hero-copy .lead {
    font-size: 20px;
    line-height: 1.55;
  }

  h1 {
    font-size: clamp(34px, 9.8vw, 42px);
  }
}
