/* newwave — «Сайттың иесі»: 3D телефонның ішінде Instagram профилі */

#insta {
  --bg: #0c0f14;
  --card: #2b2f35;
  --txt: #f5f5f5;
  --sub: #a8afb5;
  --ring: #3a4048;
}

#insta {
  --ig: linear-gradient(45deg, #feda75, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: 96px;
}

/* Фондағы баяу жылжитын жарық */
.ig-aurora {
  position: absolute;
  inset: -20% -10%;
  z-index: -1;
  background:
    radial-gradient(38% 45% at 70% 40%, rgba(214, 41, 118, 0.22), transparent 70%),
    radial-gradient(35% 40% at 85% 75%, rgba(79, 91, 213, 0.25), transparent 70%),
    radial-gradient(30% 35% at 55% 80%, rgba(46, 230, 214, 0.16), transparent 70%);
  filter: blur(20px);
  animation: igAurora 16s ease-in-out infinite alternate;
}

@keyframes igAurora {
  to {
    transform: translate3d(-6%, 4%, 0) rotate(8deg) scale(1.1);
  }
}

.ig-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.ig-copy h2 i {
  font-style: normal;
  background: var(--ig);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: igShift 6s linear infinite;
}

@keyframes igShift {
  to {
    background-position: -200% 0;
  }
}

.ig-lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 42ch;
  margin: 0 0 22px;
}

.ig-points {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 12px;
}

.ig-points li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ig-points b {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.ig-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.ig-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  background: var(--ig) !important;
  color: #fff !important;
  box-shadow: 0 10px 30px -10px rgba(214, 41, 118, 0.7);
}

.ig-btn:hover {
  box-shadow: 0 14px 40px -8px rgba(214, 41, 118, 0.9) !important;
}

.ig-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.ig-btn svg .dot {
  fill: currentColor;
  stroke: none;
}

.ig-dm {
  color: var(--ink);
  font-weight: 600;
}

.ig-hint {
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ───── Сахна және 3D телефон ───── */
.ig-stage {
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1400px;
  min-height: 640px;
}

.ig-phone {
  --rx: 0deg;
  --ry: -14deg;
  position: relative;
  width: 300px;
  height: 610px;
  border-radius: 46px;
  padding: 12px;
  background: linear-gradient(145deg, #2a2a35, #0c0c12 60%, #1d1d27);
  box-shadow:
    inset 0 0 0 2px #3a3a48,
    inset 0 0 0 5px #111,
    0 50px 90px -30px rgba(0, 0, 0, 0.9),
    0 0 80px -20px rgba(214, 41, 118, 0.45),
    0 0 120px -30px rgba(46, 230, 214, 0.35);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation: igFloat 6s ease-in-out infinite;
}

@keyframes igFloat {
  50% {
    translate: 0 -14px;
  }
}

.ig-phone.live {
  transition: transform 0.12s linear;
}

/* Шыны жарқылы */
.ig-phone::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 36px;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.09) 45%, transparent 55%);
  background-size: 250% 100%;
  background-position: var(--gx, 60%) 0;
  z-index: 3;
}

.ig-island {
  position: absolute;
  top: 22px;
  left: 50%;
  translate: -50% 0;
  width: 92px;
  height: 26px;
  border-radius: 20px;
  background: #000;
  z-index: 4;
}

.ig-screen {
  position: relative;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: #000;
  color: #f5f5f5;
  font: 13px/1.35 var(--body);
}

.ig-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  font-size: 3.4rem;
  line-height: 1;
  color: #fff;
  pointer-events: none;
  translate: -50% -50%;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5));
  animation: igBurst 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}

@keyframes igBurst {
  0% {
    transform: scale(0) rotate(-15deg);
    opacity: 0;
  }
  25% {
    transform: scale(1.25) rotate(6deg);
    opacity: 1;
  }
  45% {
    transform: scale(0.95);
  }
  75% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.15) translateY(-30px);
    opacity: 0;
  }
}

/* Телефоннан ұшып шығатын жүректер */
.ig-floats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.ig-fly {
  position: absolute;
  bottom: 18%;
  left: 50%;
  font-size: var(--s, 22px);
  pointer-events: none;
  animation: igFly var(--t, 2.6s) cubic-bezier(0.3, 0.6, 0.4, 1) forwards;
}

@keyframes igFly {
  0% {
    transform: translate(0, 0) scale(0.4);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx, 0px), var(--dy, -320px)) scale(1.1) rotate(var(--r, 0deg));
    opacity: 0;
  }
}

/* Телефон айналасындағы «қалқыған» хабарламалар */
.ig-bubble {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  color: var(--ink);
  background: rgba(21, 20, 29, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
  animation: igBubble 7s ease-in-out infinite;
  white-space: nowrap;
}

.ig-bubble b {
  font-size: 1.1rem;
}

.ig-bubble.b1 {
  left: -36px;
  top: 16%;
}

.ig-bubble.b2 {
  right: -24px;
  top: 38%;
  animation-delay: -2.5s;
}

.ig-bubble.b3 {
  left: -36px;
  bottom: 10%;
  animation-delay: -4.5s;
}

@keyframes igBubble {
  50% {
    translate: 0 -12px;
  }
}

@media (max-width: 900px) {
  .ig-wrap {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .ig-stage {
    min-height: 560px;
  }
  .ig-phone {
    --ry: 0deg;
    width: 270px;
    height: 550px;
  }
  .ig-bubble.b1 {
    left: 0;
    top: 6%;
  }
  .ig-bubble.b2 {
    right: 0;
    top: auto;
    bottom: 30%;
  }
  .ig-bubble.b3 {
    left: 0;
    bottom: 4%;
  }
}

@media (max-width: 420px) {
  .ig-bubble {
    font-size: 0.75rem;
    padding: 8px 10px;
  }
  .ig-bubble.b3 {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ig-aurora,
  .ig-phone,
  .ig-scroll,
  .ig-ava::before,
  .ig-copy h2 i,
  .ig-bubble {
    animation: none;
  }
}


/* ───── Телефон ішіндегі Instagram профилі ───── */
.ig-screen {
  background: var(--bg);
}

.ig-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 26px 0;
  height: 44px;
  font: 600 13px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #fff;
}

.ig-status i {
  font-style: normal;
  letter-spacing: 1px;
  font-size: 11px;
}

.ig-screen .iga {
  zoom: 0.69;
  width: 400px;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding-top: 4px;
}

/* ───── Профиль (телефон экранының өлшемі) ───── */
.iga {
  max-width: 460px;
  margin: 0 auto;
  padding: 10px 0 14px;
  background: var(--bg);
  color: var(--txt);
  border-radius: 28px;
  border: 1px solid #1f262c;
  box-shadow:
    0 50px 100px -40px rgba(0, 0, 0, 0.95),
    0 0 80px -30px rgba(214, 41, 118, 0.35);
  font: 15px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
}

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

.iga svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

/* Жоғарғы жол: + · аты ⌄ · ☰ */
.iga-top {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  padding: 6px 14px 14px;
}

.iga-top svg {
  width: 28px;
  height: 28px;
}

.iga-top a:last-child {
  justify-self: end;
}

.iga-user {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.iga-user .chev {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

/* Аватар + аты + сандар */
.iga-head {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 22px;
  align-items: center;
  padding: 18px 18px 0;
}

.iga-ava {
  position: relative;
  width: 100px;
  height: 100px;
  display: block;
}

.iga-ava > img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Заметка: «I miss you / Santiz» */
.iga-note {
  position: absolute;
  left: -2px;
  top: -30px;
  display: grid;
  justify-items: center;
  padding: 6px 12px 7px;
  border-radius: 16px;
  background: #3a4048;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  z-index: 2;
}

.iga-note::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a4048;
}

.iga-note b {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
}

.iga-note b i {
  width: 2px;
  height: 8px;
  background: #fff;
  border-radius: 1px;
  animation: igEq 0.9s ease-in-out infinite;
}

.iga-note b i:nth-child(2) {
  animation-delay: -0.3s;
}

.iga-note b i:nth-child(3) {
  animation-delay: -0.6s;
}

@keyframes igEq {
  50% {
    transform: scaleY(0.45);
  }
}

.iga-note small {
  font-size: 11px;
  color: var(--sub);
}

.iga-plus {
  position: absolute;
  right: -2px;
  bottom: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #000;
  font: 700 22px/1 Arial, sans-serif;
  border: 3px solid var(--bg);
}

.iga-right {
  display: grid;
  gap: 8px;
}

.iga-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.iga-stats {
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  padding: 0 4px 0 0;
}

.iga-stats li {
  display: grid;
  line-height: 1.25;
}

.iga-stats b {
  font-size: 17px;
  font-weight: 700;
}

.iga-stats span {
  font-size: 14px;
}

.iga-bio {
  padding: 18px 18px 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* Чиптер */
.iga-chips {
  display: flex;
  gap: 10px;
  padding: 14px 18px 0;
}

.iga-chips a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--ring);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.iga-chips a.dim {
  color: var(--sub);
}

.iga-chips svg {
  width: 14px;
  height: 14px;
}

/* «Ваша панель» */
.iga-panel {
  display: grid;
  gap: 2px;
  margin: 14px 18px 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--card);
}

.iga-panel b {
  font-size: 15px;
  font-weight: 700;
}

.iga-panel span {
  font-size: 13.5px;
  color: var(--sub);
}

/* Батырмалар */
.iga-btns {
  display: grid;
  grid-template-columns: 1fr 1fr 36px;
  gap: 6px;
  padding: 12px 18px 0;
}

.iga-btns a {
  display: grid;
  place-items: center;
  height: 36px;
  border-radius: 10px;
  background: var(--card);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: filter 0.2s;
}

.iga-btns a:hover,
.iga-panel:hover,
.iga-chips a:hover {
  filter: brightness(1.2);
}

.iga-btns .sq svg {
  width: 18px;
  height: 18px;
}

/* Хайлайттар */
.iga-hl {
  display: flex;
  gap: 22px;
  padding: 20px 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.iga-hl::-webkit-scrollbar {
  display: none;
}

.iga-hl a {
  display: grid;
  justify-items: center;
  gap: 6px;
  font-size: 12.5px;
}

.iga-hl i {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  padding: 4px;
  border: 2px solid var(--ring);
  display: grid;
  place-items: center;
  transition: transform 0.25s;
}

.iga-hl a:hover i {
  transform: scale(1.05);
}

.iga-hl i.add {
  border: 1px solid #3a4048;
}

.iga-hl i.add svg {
  width: 34px;
  height: 34px;
  stroke-width: 1.6;
}

.iga-hl img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Табтар */
.iga-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 18px;
}

.iga-tabs span {
  display: grid;
  place-items: center;
  height: 46px;
  color: var(--sub);
  border-bottom: 2px solid transparent;
}

.iga-tabs span.on {
  color: var(--txt);
  border-bottom-color: var(--txt);
  margin: 0 18px;
}

.iga-tabs svg {
  width: 24px;
  height: 24px;
}

.iga-tabs span.on svg {
  fill: currentColor;
  stroke: none;
}

/* Посттар */
.iga-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.iga-grid a {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #121212;
}

.iga-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.iga-grid a:hover img {
  transform: scale(1.05);
}

.iga-multi {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 4px;
  box-shadow: 3px 3px 0 -1px #fff;
}

/* Төменгі мәзір */
.iga-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 14px 0;
  padding: 6px 6px 6px 18px;
  border-radius: 999px;
  background: rgba(30, 35, 40, 0.92);
  border: 1px solid #2f363d;
}

.iga-nav svg {
  width: 26px;
  height: 26px;
}

.iga-nav a.me {
  display: grid;
  place-items: center;
  width: 82px;
  height: 46px;
  border-radius: 999px;
  background: #3a4048;
}

.iga-nav a.me img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
}


/* Сыртқы адам көретін профиль: ‹ аты ⋯ */
.iga-top2 {
  grid-template-columns: 40px 1fr 40px;
}

.iga-top2 .iga-user {
  justify-self: start;
  padding-left: 10px;
}

.iga-top2 .iga-dots svg {
  fill: currentColor;
  stroke: none;
}

.iga-btns a.blue {
  background: #4a5df6;
  color: #fff;
}

.iga-btns {
  padding-top: 16px;
}

.iga-grid {
  margin-bottom: 4px;
}

/* Телефон ішіндегі нақтылаулар */
.ig-phone {
  height: 560px;
}

.ig-screen .iga-head {
  grid-template-columns: 92px 1fr;
  gap: 16px;
}

.ig-screen .iga-ava {
  width: 90px;
  height: 90px;
}

.ig-screen .iga-stats {
  gap: 8px;
}

.ig-screen .iga-stats span {
  font-size: 12.5px;
}

.ig-screen .iga-stats b {
  font-size: 16px;
}

.ig-screen .iga-grid a {
  cursor: pointer;
}

@media (max-width: 900px) {
  .ig-phone {
    height: 515px;
  }
  .ig-screen .iga {
    zoom: 0.615;
  }
}
