:root {
  --bg-start: #515764;
  --bg-mid: #2f343e;
  --bg-end: #1d222b;
  --screen: #ececec;
  --card: #f6f6f6;
  --card-alt: #e8e8e8;
  --glass-soft: rgba(247, 249, 255, 0.5);
  --glass-strong: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.55);
  --text: #17191d;
  --muted: #7f838a;
  --dark-btn: #17181c;
  --white: #ffffff;
  --shadow-outer: 0 28px 80px rgba(3, 7, 18, 0.55);
  --shadow-card: 0 10px 24px rgba(10, 18, 30, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 92%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", sans-serif;
  color: var(--text);
  background: linear-gradient(140deg, #d4d8e2 0%, #eef0f5 46%, #d9dee8 100%);
  overflow-x: hidden;
}

body::before {
  content: none;
}

body::after {
  content: none;
}

.scene {
  min-height: 100vh;
  display: grid;
  place-items: stretch;
  padding: 0;
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 40%),
    radial-gradient(circle at 88% 94%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 44%);
}

.phone-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  position: relative;
  transform: none;
  opacity: 1;
  animation: none;
}

.phone-shell::before,
.phone-shell::after {
  display: none;
}

.phone-screen {
  min-height: 100vh;
  width: 100%;
  border-radius: 0;
  background: linear-gradient(175deg, rgba(255, 255, 255, 0.95), rgba(245, 248, 253, 0.92));
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(132%);
  backdrop-filter: blur(14px) saturate(132%);
}

.phone-screen::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: clamp(260px, 42vh, 360px);
  height: 66px;
  transform: translateY(-33px);
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.95) 50%,
    rgba(255, 255, 255, 0)
  );
  filter: blur(8px);
  pointer-events: none;
  z-index: 1;
}

.hero {
  height: clamp(260px, 42vh, 360px);
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 2%, rgba(0, 0, 0, 0.02) 36%, rgba(0, 0, 0, 0.26) 100%),
    url("FARAK.png");
  background-size: cover;
  background-position: center 30%;
  position: relative;
  z-index: 2;
}

.hero-controls {
  padding: 18px 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.control-pill {
  height: 38px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(246, 248, 252, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.66);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 9px 20px rgba(10, 10, 12, 0.2);
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(247, 247, 247, 0.95);
  color: #17191d;
  display: grid;
  place-items: center;
  text-decoration: none;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.pill-btn {
  width: 30px;
  height: 30px;
  background: transparent;
  box-shadow: none;
}

.pill-btn i {
  font-size: 14px;
}

.primary-pill {
  background: #181a20;
  color: #fff;
}

.menu-btn {
  width: 38px;
  height: 38px;
  background: rgba(246, 248, 252, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.66);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.context-menu {
  position: fixed;
  top: 14px;
  left: 12px;
  width: min(340px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  border-radius: 18px;
  padding: 6px;
  background: rgba(248, 250, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 35px rgba(9, 15, 28, 0.22);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  backdrop-filter: blur(12px) saturate(130%);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 60;
}

.context-menu[hidden] {
  display: none !important;
}

.context-menu.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.context-item {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 12px 12px 11px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: transparent;
  cursor: pointer;
  transition: background 160ms ease;
}

.context-item:hover,
.context-item:focus-visible {
  background: rgba(20, 24, 34, 0.07);
  outline: none;
}

.context-title {
  font-family: "Manrope", sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: #161a22;
  line-height: 1.25;
}

.context-subtitle {
  font-size: 0.84rem;
  color: #616878;
  line-height: 1.35;
}

.icon-btn i {
  font-size: 16px;
}

.icon-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.icon-btn:active {
  transform: scale(0.96);
}

.sheet {
  position: relative;
  margin-top: -56px;
  padding: 0 13px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}

.identity-card,
.social-card {
  border-radius: 30px;
  background: linear-gradient(155deg, var(--glass-strong), var(--glass-soft));
  border: 1px solid var(--glass-border);
  box-shadow: 0 14px 30px rgba(12, 18, 30, 0.16);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}

.identity-card {
  padding: 22px 16px 18px;
  text-align: center;
}

.identity-card h1 {
  margin: 1px 0 0;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: clamp(1.92rem, 5.2vw, 2.18rem);
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.verified {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f8b213;
  color: #fff;
  font-size: 10px;
  display: grid;
  place-items: center;
  margin-top: 4px;
}

.subtitle {
  margin: 5px 0 15px;
  color: #747981;
  font-size: 1.03rem;
  letter-spacing: -0.01em;
}

.quick-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 18px;
}

.action-btn {
  width: 52px;
  height: 52px;
  background: rgba(251, 252, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 14px rgba(19, 23, 29, 0.09);
}

.action-btn i {
  font-size: 22px;
}

.save-contact {
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--dark-btn);
  color: #f8f8f8;
  padding: 17px 20px;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease;
}

.save-contact .save-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f7f8fb;
  color: #141821;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}

.save-contact .save-icon i {
  font-size: 11px;
  line-height: 1;
}

.save-contact:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.save-contact:active {
  transform: scale(0.98);
}

.social-card {
  background: linear-gradient(160deg, rgba(246, 248, 253, 0.56), rgba(232, 237, 244, 0.44));
  padding: 17px 8px 12px;
  flex: none;
}

.social-grid {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(80px, 1fr));
  align-content: center;
  row-gap: 13px;
}

.social-btn {
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  text-decoration: none;
  transform: none;
  opacity: 1;
  animation: none;
}

.social-badge {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 8px 14px rgba(0, 0, 0, 0.12);
}

.social-badge i {
  font-size: 40px;
}

.label {
  font-size: 0.94rem;
  line-height: 1.05;
  min-height: 0;
  text-align: center;
  letter-spacing: -0.012em;
}

.whatsapp {
  background: radial-gradient(circle at 28% 22%, #61e58b, #24c24f 70%);
}

.instagram {
  background:
    radial-gradient(circle at 32% 105%, #fdf497 0%, #fdf497 8%, #fd5949 42%, #d6249f 60%, #285aeb 88%);
}

.discord {
  background: radial-gradient(circle at 28% 22%, #7986ff, #5865f2 74%);
}

.linkedin {
  background: radial-gradient(circle at 28% 22%, #36a7ff, #0a66c2 72%);
}

.telegram {
  background: radial-gradient(circle at 28% 20%, #6ec8ff, #2ca4e0 78%);
}

.github {
  background: radial-gradient(circle at 30% 20%, #303640, #090b10 72%);
  color: #fff;
}

.card-lift {
  transform: none;
  opacity: 1;
  animation: none;
}

.social-card.card-lift {
  animation: none;
}

.page-address {
  margin: 2px auto 0;
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  border: 0.6px solid rgba(255, 255, 255, 0.56);
  background: linear-gradient(160deg, rgba(248, 250, 255, 0.78), rgba(236, 241, 248, 0.62));
  box-shadow: 0 8px 16px rgba(16, 22, 34, 0.09);
  text-align: center;
  color: #6b7280;
  font-size: 0.8rem;
  line-height: 1.4;
  font-weight: 500;
}

body.modal-open {
  overflow: hidden;
}

.context-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: end center;
  padding: 12px;
  background: rgba(10, 14, 20, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.context-modal-card {
  width: min(520px, 100%);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(165deg, rgba(250, 252, 255, 0.98), rgba(241, 245, 252, 0.95));
  box-shadow: 0 24px 46px rgba(7, 12, 20, 0.28);
  padding: 18px;
  position: relative;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 200ms ease, opacity 200ms ease;
}

.context-modal.show .context-modal-card {
  transform: translateY(0);
  opacity: 1;
}

.context-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: rgba(21, 25, 35, 0.1);
  color: #171b23;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.context-close:hover {
  background: rgba(21, 25, 35, 0.16);
}

.context-modal-card h2 {
  margin: 4px 0 14px;
  padding-right: 36px;
  font-family: "Manrope", sans-serif;
  font-size: 1.32rem;
  line-height: 1.2;
  letter-spacing: -0.012em;
}

.context-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.context-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.context-copy,
.about-pitch {
  margin: 0;
  line-height: 1.5;
  color: #2f3642;
  font-size: 0.96rem;
}

.share-link-row {
  display: flex;
  gap: 8px;
}

.share-link-input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(20, 24, 35, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  padding: 11px 12px;
  font-family: "Sora", sans-serif;
  font-size: 0.88rem;
  color: #131820;
}

.share-link-input:focus-visible {
  outline: 2px solid rgba(20, 24, 35, 0.24);
  outline-offset: 1px;
}

.copy-link-btn {
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  font-family: "Manrope", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f6f8fb;
  background: #171b24;
  cursor: pointer;
}

.copy-link-btn:hover {
  filter: brightness(1.08);
}

.share-qr-wrap {
  border-radius: 16px;
  border: 1px solid rgba(20, 24, 35, 0.12);
  background: rgba(255, 255, 255, 0.74);
  display: grid;
  place-items: center;
  padding: 14px;
}

.share-qr-image {
  width: min(220px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: #fff;
  object-fit: cover;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(14px);
  background: rgba(16, 19, 24, 0.94);
  color: #f7f7f7;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes card-rise {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes item-rise {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 430px) {
  .context-menu {
    width: calc(100vw - 20px);
    left: 10px;
  }

  .subtitle {
    font-size: 0.82rem;
    line-height: 1.35;
    margin: 6px 0 14px;
  }

  .share-link-row {
    flex-direction: column;
  }

  .copy-link-btn {
    height: 44px;
  }

  .sheet {
    margin-top: -50px;
    padding: 0 10px 16px;
  }

  .identity-card h1 {
    font-size: clamp(1.8rem, 9vw, 2.2rem);
  }

  .social-badge {
    width: 68px;
    height: 68px;
  }

  .social-badge i {
    font-size: 36px;
  }

  .label {
    font-size: 0.86rem;
  }
}

@media (min-width: 700px) {
  .context-modal {
    place-items: center;
    padding: 24px;
  }

  .context-modal-card {
    padding: 22px;
  }

  .scene {
    padding: 0;
    place-items: stretch;
  }

  .phone-shell {
    width: 100%;
    min-height: 100vh;
  }

  .phone-screen {
    height: 100vh;
    min-height: 100vh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns: minmax(320px, 46%) minmax(380px, 54%);
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    background: linear-gradient(178deg, rgba(253, 253, 254, 0.95), rgba(240, 243, 249, 0.94));
  }

  .phone-screen::before {
    top: 0;
    bottom: 0;
    left: 46%;
    right: auto;
    width: 74px;
    height: auto;
    transform: translateX(-50%);
    background: linear-gradient(
      to right,
      rgba(255, 255, 255, 0),
      rgba(255, 255, 255, 0.98) 50%,
      rgba(255, 255, 255, 0)
    );
    filter: blur(10px);
  }

  .hero {
    height: 100%;
    min-height: 0;
    background-position: center 76%;
  }

  .hero-controls {
    padding: 26px 20px 0;
  }

  .sheet {
    margin-top: 0;
    padding: clamp(20px, 4vw, 46px) clamp(22px, 5vw, 58px) clamp(22px, 4vw, 42px) clamp(10px, 2.6vw, 28px);
    min-height: 0;
    justify-content: center;
    gap: 20px;
    overflow-y: auto;
  }

  .sheet::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .identity-card,
  .social-card {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    border-radius: 34px;
  }

  .identity-card {
    padding: 30px 28px 24px;
  }

  .identity-card h1 {
    font-size: clamp(2.35rem, 4vw, 3.35rem);
  }

  .subtitle {
    font-size: 1.18rem;
    margin: 7px 0 20px;
  }

  .quick-actions {
    gap: 20px;
    margin-bottom: 20px;
  }

  .action-btn {
    width: 60px;
    height: 60px;
  }

  .action-btn i {
    font-size: 24px;
  }

  .save-contact {
    padding: 19px 24px;
    font-size: 1.3rem;
  }

  .social-card {
    padding: 24px 20px 18px;
  }

  .social-grid {
    grid-template-columns: repeat(3, minmax(98px, 1fr));
    column-gap: 10px;
    row-gap: 18px;
  }

  .social-badge {
    width: 88px;
    height: 88px;
  }

  .social-badge i {
    font-size: 45px;
  }

  .label {
    font-size: 1.04rem;
  }

  .page-address {
    font-size: 0.9rem;
    margin-top: 4px;
    padding: 9px 14px;
  }
}

@media (min-width: 1200px) {
  .phone-screen {
    grid-template-columns: minmax(420px, 44%) minmax(520px, 56%);
  }

  .phone-screen::before {
    left: 44%;
  }

  .hero-controls {
    padding: 30px 24px 0;
  }

  .sheet {
    padding: clamp(30px, 5vh, 56px) clamp(32px, 4.5vw, 72px) clamp(30px, 4vh, 56px) clamp(16px, 2vw, 34px);
    gap: 24px;
  }

  .identity-card,
  .social-card {
    max-width: 840px;
  }

  .identity-card {
    padding: 34px 32px 28px;
  }

  .identity-card h1 {
    font-size: clamp(2.6rem, 3.4vw, 3.8rem);
  }

  .save-contact {
    padding: 20px 26px;
  }

  .social-card {
    padding: 28px 24px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.context-menu[hidden] {
  display: none !important;
}

.context-modal[hidden] {
  display: none !important;
}