/* ===== Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg: #04050a;
  --card: rgba(255, 255, 255, 0.05);
  --text: #f5f7fa;
  --muted: #97a2b2;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: 'Vazirmatn', ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  cursor: default;
}

/* ===================== Animated background ===================== */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(1200px 800px at 20% 10%, #0a0d16 0%, transparent 60%),
    radial-gradient(1000px 900px at 90% 90%, #111422 0%, transparent 55%),
    #030408;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.6;
  mix-blend-mode: screen;
  will-change: transform;
}
.blob-1 {
  width: 48vw; height: 48vw;
  background: radial-gradient(circle at 30% 30%, rgba(154, 132, 81, 0.08), transparent 70%);
  top: -10vw; right: -8vw;
  animation: float1 16s ease-in-out infinite;
}
.blob-2 {
  width: 42vw; height: 42vw;
  background: radial-gradient(circle at 50% 50%, rgba(148, 163, 184, 0.12), transparent 70%);
  bottom: -12vw; left: -8vw;
  animation: float2 20s ease-in-out infinite;
}
.blob-3 {
  width: 38vw; height: 38vw;
  background: radial-gradient(circle at 50% 50%, rgba(71, 85, 105, 0.15), transparent 70%);
  top: 35%; left: 40%;
  animation: float3 24s ease-in-out infinite;
}
@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-6vw, 8vh) scale(1.18); } }
@keyframes float2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(8vw, -6vh) scale(1.22); } }
@keyframes float3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-10vw, -8vh) scale(0.82); } }

#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 75%);
  animation: gridpan 40s linear infinite;
}
@keyframes gridpan { from { background-position: 0 0, 0 0; } to { background-position: 46px 46px, 46px 46px; } }

.scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(229, 213, 169, 0.02) 50%, transparent 100%);
  height: 40%;
  animation: scan 8s linear infinite;
  pointer-events: none;
}
@keyframes scan { 0% { transform: translateY(-120%); } 100% { transform: translateY(320%); } }

.noise {
  position: absolute; inset: 0; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* cursor spotlight */
.spotlight {
  position: fixed;
  z-index: 2;
  width: 480px; height: 480px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(229, 213, 169, 0.05), transparent 65%);
  transform: translate(-50%, -50%);
  left: 50%; top: 30%;
  transition: opacity .4s;
  mix-blend-mode: screen;
}

/* ===================== Layout ===================== */
.wrap {
  position: relative;
  z-index: 3;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  perspective: 1200px;
}

.card {
  position: relative;
  width: 100%;
  max-width: 470px;
  border-radius: 30px;
  padding: 42px 26px 30px;
  text-align: center;
  background: var(--card);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 40px 90px -25px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.09);
  transform-style: preserve-3d;
  transition: transform .15s ease-out;
  animation: cardIn 1s cubic-bezier(.2,.8,.2,1) both;
}
/* flowing gradient border */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 30px;
  padding: 1.5px;
  background: conic-gradient(from var(--angle, 0deg), #9a8451, #e5d5a9, #473a21, #e5d5a9, #9a8451);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.8;
  animation: borderSpin 8s linear infinite;
}
@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes borderSpin { to { --angle: 360deg; } }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(40px) scale(.94) rotateX(8deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotateX(0); }
}
/* glare that follows pointer */
.card .glare {
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,0.12), transparent 45%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.card:hover .glare { opacity: 1; }

.inner { position: relative; z-index: 1; transform: translateZ(40px); }

/* avatar */
.avatar-ring {
  position: relative;
  width: 122px; height: 122px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  animation: bob 5s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.avatar-ring::before {
  content: "";
  position: absolute; inset: -5px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #9a8451, #e5d5a9, #473a21, #e5d5a9, #9a8451);
  animation: spin 8s linear infinite;
}
.avatar-ring::after {
  content: "";
  position: absolute; inset: -5px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #9a8451, #e5d5a9, #473a21, #e5d5a9, #9a8451);
  filter: blur(20px);
  opacity: 0.35;
  animation: spin 8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar {
  position: relative;
  z-index: 1;
  width: 108px; height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #04050a;
  background: #0b0d1a;
}

.name {
  font-size: 28px;
  font-weight: 900;
  margin: 4px 0 8px;
  background: linear-gradient(90deg, #ffffff, #e2e8f0, #e5d5a9, #e2e8f0, #ffffff);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 8s linear infinite;
}
@keyframes shimmer { to { background-position: 300% 0; } }

.tagline {
  color: var(--muted);
  font-size: 14px;
  min-height: 20px;
  margin-bottom: 6px;
}
.tagline .cursor {
  display: inline-block;
  width: 2px;
  height: 15px;
  background: #e5d5a9;
  margin-inline-start: 2px;
  vertical-align: middle;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #c9d3e0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 5px 12px;
  border-radius: 999px;
  margin: 12px 0 4px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22e07a;
  box-shadow: 0 0 0 0 rgba(34,224,122,0.6);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,224,122,0.6); }
  70% { box-shadow: 0 0 0 10px rgba(34,224,122,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,224,122,0); }
}

/* ===================== Link buttons ===================== */
.links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
}

.link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-radius: 18px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s, background .25s;
  opacity: 0;
  transform: translateY(22px);
  will-change: transform;
}
.link.in { opacity: 1; transform: translateY(0); }

.link .sheen {
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-20deg);
  transition: left .6s ease;
}
.link:hover { border-color: transparent; background: rgba(255,255,255,0.09); }
.link:hover .sheen { left: 130%; }

.link .icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  transition: transform .3s;
}
.link:hover .icon { transform: scale(1.12) rotate(-6deg); }
.link .icon svg { width: 23px; height: 23px; }
.link .label { flex: 1; text-align: right; }
.link .sub { display:block; font-weight:400; font-size:11.5px; color: var(--muted); }
.link .arrow { color: var(--muted); transition: transform .25s, color .25s; }
.link:hover .arrow { transform: translateX(-6px); color:#fff; }

/* brand tints */
.link.telegram:hover { box-shadow: 0 16px 40px -15px rgba(55, 187, 254, 0.35); }
.link.telegram .icon { background: linear-gradient(145deg,#37bbfe,#007dbb); }
.link.youtube:hover { box-shadow: 0 16px 40px -15px rgba(255, 82, 82, 0.3); }
.link.youtube .icon { background: linear-gradient(145deg,#ff5252,#c4302b); }
.link.kick:hover { box-shadow: 0 16px 40px -15px rgba(83, 252, 24, 0.25); }
.link.kick .icon { background: linear-gradient(145deg,#53fc18,#37a80f); color:#04140a; }
.link.instagram:hover { box-shadow: 0 16px 40px -15px rgba(214, 41, 118, 0.3); }
.link.instagram .icon { background: linear-gradient(45deg,#feda75,#fa7e1e,#d62976,#962fbf,#4f5bd5); }

.footer {
  margin-top: 28px;
  font-size: 12px;
  color: var(--muted);
}
.footer span { color:#e5d5a9; }

/* ===================== Language Switcher ===================== */
.lang-switch {
  display: flex;
  justify-content: flex-end;
  margin-bottom: -10px;
  position: relative;
  z-index: 10;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #e5d5a9;
  transform: translateY(-1px);
}

.lang-btn:active {
  transform: translateY(0);
}

/* ===================== LTR support overrides ===================== */
[dir="ltr"] .link .label {
  text-align: left;
}
[dir="ltr"] .link .arrow {
  transform: rotate(180deg);
}
[dir="ltr"] .link:hover .arrow {
  transform: rotate(180deg) translateX(-6px);
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  .link { opacity: 1; transform: none; }
}
