.page {
  width: min(100% - 2rem, var(--page-width));
  margin: 1.25rem auto 2.5rem;
}

.hero {
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--panel-shadow);
}

.hero-photo {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: var(--radius) var(--radius) 0 0;
}

.nav {
  background: var(--navy);
  padding: 0.75rem 1rem;
}

#menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}

.burger {
  display: none;
  width: 100%;
  background: none;
  border: none;
  color: var(--on-navy);
  font-size: 1.5rem;
  cursor: pointer;
}

#menu button,
#menu .submenu a {
  --lx: 50%;
  --ly: 50%;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 1rem;
  color: var(--on-navy);
  cursor: pointer;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(var(--on-navy-rgb), 0.15);
  background: linear-gradient(180deg, rgba(var(--on-navy-rgb), 0.12), rgba(var(--on-navy-rgb), 0.04));
  box-shadow: inset 0 1px 0 rgba(var(--on-navy-rgb), 0.08), 0 2px 8px rgba(var(--navy-rgb), 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
}

#menu button::before,
#menu .submenu a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    180px 180px at var(--lx) var(--ly),
    var(--light-color, rgba(var(--on-navy-rgb), 0.22)),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  #menu button:hover,
  #menu .submenu a:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(var(--on-navy-rgb), 0.2), 0 4px 16px rgba(var(--navy-rgb), 0.3);
  }

  #menu button:hover::before,
  #menu .submenu a:hover::before {
    opacity: 1;
  }
}

#menu button.active,
#menu .submenu a.active {
  box-shadow: inset 0 1px 0 rgba(var(--on-navy-rgb), 0.25), 0 0 0 1px rgba(var(--on-navy-rgb), 0.25);
}

.menu-group {
  position: relative;
  display: flex;
  align-items: stretch;
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  min-width: 240px;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 1200;
  border-radius: 8px;
  background: rgba(0, 11, 42, 0.92);
  border: 1px solid rgba(var(--on-navy-rgb), 0.12);
  box-shadow: 0 8px 24px rgba(var(--navy-rgb), 0.4);
}

.submenu[hidden] {
  display: none;
}

.page-heading {
  margin: 1.4rem 0 0.4rem;
}

h1 {
  margin: 0 0 0.4rem;
  font-size: var(--fs-h1);
  color: var(--burgundy);
}

#site-intro {
  margin: 0 0 1rem;
}

.panel {
  margin-top: 1rem;
  padding: 1.4rem 1.5rem 1.6rem;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--panel-shadow);
}

.panel[hidden] {
  display: none !important;
}

.section-label {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--burgundy);
}

.panel p {
  margin: 0 0 0.9rem;
}

.stream-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 11, 42, 0.08), rgba(0, 11, 42, 0.02));
  border: 1px solid rgba(0, 11, 42, 0.1);
}

.stream-status.offline {
  padding: 1rem;
  border-radius: 10px;
  background: rgba(255, 99, 132, 0.08);
  border: 1px dashed rgba(255, 99, 132, 0.4);
  color: #850e38;
}

.stream-status.offline a {
  color: #631d60;
  font-weight: 600;
}

.stream-status.live {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stream-status[hidden] {
  display: none !important;
}

.stream-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--navy);
}

.stream-player iframe,
.stream-player > div {
  width: 100%;
  height: 100%;
  display: block;
}

.stream-info {
  font-size: 0.95rem;
}

.stream-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--on-navy);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.stream-link:hover {
  opacity: 0.85;
}

.stream-link::after {
  content: '↗';
  font-size: 0.9em;
}

.link-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-top: 1.1rem;
}

.link-card {
  --lx: 50%;
  --ly: 50%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, var(--glass-from), var(--glass-to));
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(var(--on-navy-rgb), 0.25), 0 10px 24px rgba(var(--navy-rgb), 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.link-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    220px 220px at var(--lx) var(--ly),
    var(--light-color, rgba(var(--on-navy-rgb), 0.28)),
    transparent 60%
  );
  opacity: 0;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .link-card:hover {
    transform: translateY(-3px);
  }

  .link-card:hover::before {
    opacity: 1;
  }
}

.link-card-kicker,
.link-card-meta {
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  color: var(--muted);
}

.link-card strong {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
}

.spec-list {
  margin: 1.1rem 0 1.2rem;
  padding: 0;
}

.spec-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.75rem 1rem;
  margin: 0;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(var(--navy-rgb), 0.08);
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-list dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.spec-list dd {
  margin: 0;
  font-weight: 700;
}

.spec-note {
  font-weight: 400;
  color: var(--muted);
}

.spec-note::before {
  content: " · ";
}

body.dark-mode .spec-row {
  border-bottom-color: rgba(var(--on-navy-rgb), 0.12);
}

.played-list {
  margin: 0 0 1.2rem;
  padding: 0;
  list-style: none;
}

.played-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(var(--navy-rgb), 0.08);
}

.played-list li::after {
  content: "пройдено";
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.played-list li:last-child {
  border-bottom: none;
}

body.dark-mode .played-list li {
  border-bottom-color: rgba(var(--on-navy-rgb), 0.12);
}

.games-suggest {
  color: var(--muted);
}

@media (max-width: 768px) {
  .spec-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

.pc-photo {
  width: 100%;
  max-width: 560px;
  margin: 1rem auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(var(--navy-rgb), 0.18);
}

.theme-toggle,
.top-button {
  position: fixed;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--on-navy);
  background: var(--navy);
  box-shadow: 0 6px 18px rgba(0, 11, 42, 0.35);
  z-index: 1100;
}

.theme-toggle {
  top: 22px;
  right: 22px;
  width: 46px;
  height: 46px;
}

.theme-toggle::before {
  content: '☀';
  font-size: 20px;
}

.top-button {
  right: 22px;
  bottom: 30px;
  width: 56px;
  height: 56px;
  font-size: 20px;
  display: none;
}

.top-button.is-visible {
  display: block;
}

.site-footer {
  margin-top: 1.5rem;
  padding: 0.5rem 0 1rem;
  text-align: center;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.privacy-page {
  margin-top: 2rem;
}

.privacy-card h1 {
  border-bottom: 3px solid rgba(74, 144, 226, 0.45);
  padding-bottom: 0.6rem;
}

.privacy-card h2 {
  margin: 1.5rem 0 0.6rem;
}

.privacy-card h3 {
  margin: 1rem 0 0.4rem;
}

.privacy-card ul {
  margin: 0 0 1rem 1.3rem;
}

.last-updated {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  background: rgba(var(--navy-rgb), 0.05);
  border-left: 4px solid #4a90e2;
}

@media (min-width: 769px) {
  .nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-radius: 0 0 12px 12px;
  }

  #menu[hidden] {
    display: flex !important;
  }
}

@media (max-width: 768px) {
  .page {
    width: calc(100% - 1.2rem);
    margin-top: 0.75rem;
    padding-bottom: 4.5rem;
  }

  .hero {
    border-radius: 12px;
  }

  .hero-photo {
    max-height: 240px;
    border-radius: 12px 12px 0 0;
  }

  .nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    border-radius: 0;
    background: linear-gradient(180deg, rgba(0, 11, 42, 0.92), rgba(0, 11, 42, 0.98));
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border-top: 1px solid rgba(var(--on-navy-rgb), 0.15);
  }

  .burger {
    display: block;
  }

  #menu,
  #menu[hidden] {
    display: flex !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 56px;
    flex-direction: column-reverse;
    padding: 1rem;
    max-height: 80vh;
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(0, 11, 42, 0.9), rgba(0, 11, 42, 0.97));
    backdrop-filter: blur(28px) saturate(140%);
    -webkit-backdrop-filter: blur(28px) saturate(140%);
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: none;
  }

  #menu.menu-animating {
    transition: transform 280ms cubic-bezier(.2,.9,.2,1), opacity 180ms ease, visibility 0s linear 280ms;
  }

  #menu.menu-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  #menu button,
  #menu .submenu a {
    width: 100%;
  }

  .submenu {
    position: static;
    margin-top: 0.35rem;
  }

  #menu .tool-link-crush {
    display: none !important;
  }

  .theme-toggle {
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
  }

  .top-button {
    right: 16px;
    bottom: 92px;
  }
}

@media (hover: none) {
  #menu button::before,
  #menu .submenu a::before,
  .link-card::before {
    content: none;
  }

  #menu button,
  #menu .submenu a,
  .link-card {
    transition: none;
  }
}
