:root {
  --vk-blue: #0077ff;
  --vk-text: #000000;
  --vk-muted: #818c99;
  --vk-bg: #ffffff;
  --vk-soft: #f0f2f5;
  --vk-line: #e7e8ec;
  --like: #e64646;
  --phone-ratio: 9 / 16;
  --screen-radius: 36px;
  --bezel: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: "VK Sans Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--vk-text);
  background-color: #1a2228;
  touch-action: pan-y;
}

.stage {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(18, 24, 30, 0.28) 0%, rgba(18, 24, 30, 0.18) 40%, rgba(18, 24, 30, 0.4) 100%),
    url("../img/museum-hall-bg.png") center / cover no-repeat;
  filter: blur(2.5px) saturate(0.92) brightness(0.92);
  transform: scale(1.04);
  pointer-events: none;
}

.stage-scale {
  position: relative;
  z-index: 1;
  transform-origin: center center;
  will-change: transform;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: default;
}

a {
  color: var(--vk-blue);
  text-decoration: none;
}

.phone {
  width: calc(100dvh * 9 / 16);
  height: 100dvh;
  max-width: 100vw;
  background: #0b0d10;
  border-radius: calc(var(--screen-radius) + var(--bezel));
  padding: var(--bezel);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 0 0 2px #2a2f38;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  touch-action: pan-y;
  isolation: isolate;
}

.phone-notch {
  position: absolute;
  top: calc(var(--bezel) + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 28px;
  background: #0b0d10;
  border-radius: 20px;
  z-index: 5;
  pointer-events: none;
}

.phone-screen {
  height: 100%;
  width: 100%;
  background: var(--vk-bg);
  border-radius: var(--screen-radius);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  position: relative;
  isolation: isolate;
  clip-path: inset(0 round var(--screen-radius));
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 4px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-icons svg {
  fill: #111;
}

.battery {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}

.battery-body {
  width: 22px;
  height: 11px;
  border: 1.5px solid #111;
  border-radius: 3px;
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 1px;
}

.battery-body::after {
  content: "";
  position: absolute;
  right: -3px;
  width: 2px;
  height: 5px;
  background: #111;
  border-radius: 0 1px 1px 0;
}

.battery-body i {
  display: block;
  width: 85%;
  height: 100%;
  background: #111;
  border-radius: 1px;
}

.vk-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px 4px;
}

.vk-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vk-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.vk-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

.vk-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #222;
  border-radius: 10px;
}

.vk-tabs {
  display: flex;
  gap: 18px;
  padding: 4px 16px 0;
  border-bottom: 1px solid var(--vk-line);
}

.tab {
  position: relative;
  padding: 10px 0 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--vk-muted);
}

.tab.active {
  color: var(--vk-text);
  font-weight: 650;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--vk-blue);
  border-radius: 2px 2px 0 0;
}

.chev {
  font-size: 11px;
}

.feed {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--vk-bg);
  scrollbar-width: none;
}

.feed::-webkit-scrollbar {
  display: none;
}

.post {
  padding: 12px 0 8px;
  border-bottom: 8px solid var(--vk-soft);
}

.post-head {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 0 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #d7dde5;
}

.author {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.sub {
  margin-top: 2px;
  font-size: 13px;
  color: var(--vk-muted);
}

.more {
  font-size: 22px;
  line-height: 1;
  color: var(--vk-muted);
  padding: 0 4px;
}

.caption {
  margin: 10px 12px 4px;
  font-size: 15px;
  line-height: 1.35;
}

.hashtags {
  margin: 0 12px 10px;
  font-size: 15px;
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
}

.post-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #cfd6df;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 6px;
}

.action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  border-radius: 8px;
  color: #2c2d2e;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.action.like-btn {
  cursor: pointer;
}

.action.like-btn .ico path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.action .ico {
  display: block;
  flex-shrink: 0;
}

.action.liked {
  color: #e64646;
}

.action.like-btn.liked .ico path {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.2;
}

.action .count {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.vk-bottom {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--vk-line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  padding: 6px 2px 12px;
  border-radius: 0 0 var(--screen-radius) var(--screen-radius);
  overflow: hidden;
  z-index: 2;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #99a2ad;
  font-size: 9px;
  font-weight: 500;
}

.nav-item.active {
  color: var(--vk-blue);
}
