:root {
  color-scheme: dark;
  --bg: #000000;
  --bg-2: #000000;
  --surface: rgba(14, 20, 34, 0.76);
  --surface-strong: rgba(10, 14, 26, 0.9);
  --surface-soft: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f4f7ff;
  --muted: rgba(228, 235, 255, 0.7);
  --soft: rgba(228, 235, 255, 0.48);
  --cyan: #8f63ff;
  --blue: #6d43d7;
  --pink: #c58dff;
  --lime: #9dff6f;
  --gold: #ffd36e;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.24);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --container: min(760px, calc(100vw - 24px));
  --gradient-main: linear-gradient(135deg, var(--cyan), var(--blue) 44%, var(--pink));
}

body.theme-light {
  color-scheme: light;
  --bg: #eff2fb;
  --bg-2: #dfe7fa;
  --surface: rgba(255, 255, 255, 0.75);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(20, 31, 54, 0.05);
  --border: rgba(20, 31, 54, 0.08);
  --text: #0b1222;
  --muted: rgba(11, 18, 34, 0.72);
  --soft: rgba(11, 18, 34, 0.5);
  --shadow: 0 26px 60px rgba(82, 104, 146, 0.16);
  --shadow-soft: 0 16px 30px rgba(82, 104, 146, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Tajawal", "Segoe UI Variable", "Segoe UI", sans-serif;
  color: var(--text);
  background-color: #000;
  background:
    radial-gradient(circle at top, rgba(124, 83, 255, 0.18), transparent 34%),
    radial-gradient(circle at 18% 12%, rgba(95, 57, 189, 0.2), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(70, 41, 140, 0.16), transparent 26%),
    #000;
  overflow-x: hidden;
  transition: background 260ms ease, color 260ms ease;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 50% -8%, rgba(160, 120, 255, 0.18), transparent 34%),
    radial-gradient(circle at 14% 22%, rgba(110, 72, 216, 0.16), transparent 24%),
    radial-gradient(circle at 86% 16%, rgba(88, 58, 170, 0.14), transparent 26%);
  opacity: 1;
  animation: sky-glow 16s ease-in-out infinite;
}

body::after {
  background: transparent;
  opacity: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

#particle-canvas,
.ambient-layer,
.page-loader,
.toast,
.scroll-top {
  position: fixed;
}

#particle-canvas,
.ambient-layer {
  inset: 0;
  pointer-events: none;
}

#particle-canvas {
  z-index: 0;
  display: block;
  opacity: 0.95;
}

.ambient-layer {
  display: block;
  z-index: 0;
  overflow: hidden;
}

.ambient-layer::before,
.ambient-layer::after {
  content: "";
  position: absolute;
  inset: -10%;
  background-image:
    radial-gradient(circle at 8% 22%, rgba(255, 255, 255, 0.96) 0 1px, transparent 1.8px),
    radial-gradient(circle at 18% 72%, rgba(255, 255, 255, 0.9) 0 1.1px, transparent 1.9px),
    radial-gradient(circle at 28% 38%, rgba(205, 224, 255, 0.92) 0 1px, transparent 2px),
    radial-gradient(circle at 38% 14%, rgba(255, 255, 255, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle at 46% 58%, rgba(220, 202, 255, 0.82) 0 1.2px, transparent 2px),
    radial-gradient(circle at 56% 26%, rgba(255, 255, 255, 0.94) 0 1px, transparent 2px),
    radial-gradient(circle at 66% 74%, rgba(214, 226, 255, 0.86) 0 1px, transparent 1.8px),
    radial-gradient(circle at 76% 34%, rgba(255, 255, 255, 0.92) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 16%, rgba(226, 210, 255, 0.82) 0 1.1px, transparent 2px),
    radial-gradient(circle at 92% 62%, rgba(255, 255, 255, 0.9) 0 1px, transparent 1.8px);
  background-size: 560px 560px;
  opacity: 0.44;
  animation: star-drift 40s linear infinite, star-twinkle 6s ease-in-out infinite alternate;
}

.ambient-layer::after {
  background-size: 760px 760px;
  opacity: 0.26;
  filter: blur(0.4px);
  animation-duration: 62s, 8.5s;
  animation-delay: -18s, -3s;
}

.light,
.scan-grid {
  position: absolute;
}

.light {
  border-radius: 999px;
  filter: blur(34px);
  opacity: 0.5;
  animation: drift 18s ease-in-out infinite;
}

.light-a {
  top: 5%;
  left: -8%;
  width: 22rem;
  height: 22rem;
  background: radial-gradient(circle, rgba(86, 26, 170, 0.28), transparent 68%);
}

.light-b {
  top: 14%;
  right: -6%;
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle, rgba(142, 78, 230, 0.24), transparent 70%);
  animation-delay: -5s;
}

.light-c {
  bottom: 10%;
  left: 28%;
  width: 20rem;
  height: 20rem;
  background: radial-gradient(circle, rgba(61, 18, 120, 0.24), transparent 70%);
  animation-delay: -10s;
}

.scan-grid {
  inset: auto 12% 8%;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(136, 96, 221, 0.16), transparent 68%);
  filter: blur(50px);
  opacity: 0.7;
}

.page-loader {
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  gap: 1rem;
  background: rgba(4, 8, 15, 0.84);
  backdrop-filter: blur(16px);
  transition: opacity 320ms ease, visibility 320ms ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-core {
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 1.4rem;
  background: var(--gradient-main);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 30px rgba(0, 233, 255, 0.34), 0 0 52px rgba(255, 79, 216, 0.22);
  animation: loader-pulse 1.4s ease-in-out infinite;
}

.page-loader p {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-shell,
.site-footer {
  width: var(--container);
  margin-inline: auto;
}

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  padding: 1rem 0 1.25rem;
}

.glass-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.theme-light .glass-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.68));
}

body.theme-dark .glass-card {
  background: linear-gradient(180deg, rgba(12, 8, 20, 0.92), rgba(7, 6, 14, 0.84));
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(0, 233, 255, 0.14), transparent 34%),
    linear-gradient(315deg, rgba(255, 79, 216, 0.12), transparent 36%);
  pointer-events: none;
}

.stream-card,
.links-panel,
.site-footer {
  padding: 1rem;
}

.utility-bar,
.utility-actions,
.hero-badges,
.links-head,
.social-link,
.social-link__lead,
.support-button,
.site-footer {
  display: flex;
  align-items: center;
}

.utility-bar,
.links-head,
.site-footer {
  justify-content: space-between;
}

.utility-bar {
  gap: 0.75rem;
  margin-bottom: 0.7rem;
  justify-content: flex-end;
}

.section-kicker,
.site-footer__title,
.links-panel h2,
.support-banner h2,
.empty-state h3 {
  margin: 0;
}

.social-link__title,
.support-button__content strong,
.support-banner h2,
.links-panel h2,
#full-name,
.empty-state h3 {
  font-family: "Changa", "Segoe UI", sans-serif;
}

.utility-actions {
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body[dir="rtl"] .utility-actions {
  justify-content: flex-start;
}

.mini-button,
.theme-toggle,
.support-button,
.social-link,
.scroll-top {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.mini-button,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.45rem;
  padding: 0.54rem 0.72rem;
  border-radius: 999px;
  background: rgba(117, 65, 192, 0.14);
  border: 1px solid rgba(173, 111, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), var(--shadow-soft);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

body.theme-light .mini-button,
body.theme-light .theme-toggle {
  background: rgba(126, 74, 209, 0.1);
  border-color: rgba(126, 74, 209, 0.18);
  color: #171a2b;
}

.mini-button:hover,
.theme-toggle:hover,
.support-button:hover,
.social-link:hover,
.scroll-top:hover {
  transform: translateY(-3px);
}

.mini-button svg {
  width: 0.95rem;
  height: 0.95rem;
}

.theme-toggle {
  min-width: 4.9rem;
  justify-content: space-between;
}

.theme-toggle__track {
  width: 2.8rem;
  height: 1.55rem;
  padding: 0.14rem;
  border-radius: 999px;
  background: rgba(126, 74, 209, 0.22);
}

body.theme-light .theme-toggle__track {
  background: rgba(126, 74, 209, 0.18);
}

.theme-toggle__thumb {
  display: block;
  width: 1.28rem;
  height: 1.28rem;
  border-radius: 50%;
  background: var(--gradient-main);
  box-shadow: 0 8px 20px rgba(0, 233, 255, 0.3);
  transition: transform 220ms ease;
}

body.theme-light .theme-toggle__thumb {
  transform: translateX(1.2rem);
}

body[dir="rtl"] body.theme-light .theme-toggle__thumb {
  transform: translateX(-1.2rem);
}

.top-logo {
  display: grid;
  justify-items: center;
  padding: 0.15rem 0 0.6rem;
}

.avatar-shell {
  position: relative;
  width: min(100%, 11rem);
  aspect-ratio: 1;
}

.avatar-shell__ring,
.profile-image {
  position: absolute;
  inset: 0;
  border-radius: 34px;
}

.avatar-shell__ring {
  background: linear-gradient(135deg, rgba(83, 30, 160, 1), rgba(44, 11, 89, 0.96), rgba(156, 95, 255, 0.88));
  box-shadow: 0 0 0 1px rgba(186, 129, 255, 0.16), 0 0 34px rgba(119, 57, 209, 0.28), 0 30px 72px rgba(0, 0, 0, 0.52);
}

.avatar-shell__ring::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 33px;
  background: linear-gradient(180deg, rgba(8, 13, 24, 0.2), rgba(8, 13, 24, 0.74));
}

.profile-image {
  inset: 0.95rem;
  width: calc(100% - 1.9rem);
  height: calc(100% - 1.9rem);
  object-fit: cover;
  background: linear-gradient(180deg, rgba(30, 14, 48, 0.82), rgba(8, 8, 12, 0.96));
}

.section-kicker,
.meta-card__label {
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body[dir="rtl"] .support-banner,
body[dir="rtl"] .links-head,
body[dir="rtl"] .links-caption {
  text-align: right;
}

#full-name {
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 2.15rem);
  line-height: 1;
}

.hero-bio,
.support-banner p,
.site-footer small,
.empty-state p {
  margin: 0;
  color: var(--muted);
}

.hero-bio {
  max-width: 21rem;
  margin-inline: auto;
  font-size: 0.76rem;
  line-height: 1.55;
}

.hero-bio:empty {
  display: none;
}

.support-banner {
  display: grid;
  gap: 0.8rem;
  margin-top: 0;
  padding: 1rem;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-light .support-banner {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 239, 255, 0.92));
  border-color: rgba(126, 74, 209, 0.14);
}

.section-kicker {
  margin-bottom: 0.45rem;
  color: #bb8cff;
  font-size: 0.58rem;
}

.support-banner h2,
.links-panel h2 {
  font-size: clamp(1rem, 3vw, 1.45rem);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.support-button {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  min-height: 3.45rem;
  padding: 0.58rem 0.72rem;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(15, 9, 24, 0.98), rgba(35, 14, 60, 0.92));
  border: 1px solid rgba(173, 111, 255, 0.24);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.theme-light .support-button {
  background: linear-gradient(135deg, #6f37c9, #9157eb);
  border-color: rgba(111, 55, 201, 0.28);
  color: #fff;
  box-shadow: 0 18px 34px rgba(111, 55, 201, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.support-button::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(116, 52, 204, 0.22), rgba(255, 255, 255, 0.02) 44%, rgba(174, 112, 255, 0.18));
}

body.theme-light .support-button::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05) 44%, rgba(255, 255, 255, 0.16));
}

.support-button__glow {
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 180deg, rgba(111, 49, 201, 0.08), rgba(167, 96, 255, 0.26), rgba(78, 23, 150, 0.18), rgba(111, 49, 201, 0.08));
  filter: blur(22px);
  animation: spin 10s linear infinite;
}

.support-button__content,
.social-link__content {
  position: relative;
  z-index: 1;
  display: grid;
}

.support-button__content {
  width: 100%;
  justify-items: center;
  text-align: center;
}

.support-button__content strong {
  font-size: 0.84rem;
  line-height: 1.1;
}

.social-link__meta {
  color: var(--soft);
}



.links-panel {
  display: grid;
  gap: 0.8rem;
}

.links-head {
  gap: 1rem;
  align-items: end;
  justify-content: flex-end;
}

.links-head > div {
  width: 100%;
  text-align: right;
}

body[dir="rtl"] .social-link::before {
  inset: 0 0 0 auto;
}

body[dir="rtl"] .social-link__lead,
body[dir="rtl"] .support-button,
body[dir="rtl"] .mini-button,
body[dir="rtl"] .theme-toggle {
  flex-direction: row-reverse;
}

body[dir="rtl"] .support-button__content,
body[dir="rtl"] .social-link__content {
  text-align: right;
}

.social-grid {
  display: grid;
  gap: 0.8rem;
}

.social-link {
  justify-content: space-between;
  gap: 0.8rem;
  min-height: 3.95rem;
  padding: 0.68rem 0.78rem;
  border-radius: 22px;
  background: rgba(86, 40, 150, 0.12);
  border: 1px solid rgba(173, 111, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--shadow-soft);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

body.theme-light .social-link {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(126, 74, 209, 0.14);
  color: #171a2b;
  box-shadow: 0 14px 28px rgba(82, 104, 146, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.social-link::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--platform-glow, var(--gradient-main));
}

.social-link:hover,
.social-link:focus-visible {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.26), 0 0 28px rgba(0, 233, 255, 0.08);
}

body.theme-light .social-link:hover,
body.theme-light .social-link:focus-visible {
  border-color: rgba(111, 55, 201, 0.24);
  box-shadow: 0 18px 32px rgba(82, 104, 146, 0.18);
}

.social-link__lead {
  gap: 0.75rem;
  min-width: 0;
}

.social-link__icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 18px;
  background: rgba(182, 121, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.theme-light .social-link__icon {
  background: rgba(126, 74, 209, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.social-link__icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.social-link__title {
  display: block;
  margin-bottom: 0.28rem;
  font-size: 0.8rem;
  font-weight: 700;
}

body.theme-light .support-button__content strong {
  color: #fff;
}

.social-link__meta {
  font-size: 0.66rem;
  line-height: 1.35;
}

.empty-state {
  display: grid;
  gap: 0.7rem;
  justify-items: center;
  text-align: center;
  padding: 1.3rem;
  border-radius: 24px;
  background: rgba(70, 31, 126, 0.12);
  border: 1px dashed rgba(173, 111, 255, 0.18);
}

.empty-state[hidden] {
  display: none;
}

.empty-state__icon {
  display: inline-grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 1rem;
  background: var(--gradient-main);
  color: #07111e;
  font-size: 1.55rem;
  font-weight: 700;
}

.toast {
  left: 50%;
  bottom: 1.2rem;
  z-index: 40;
  transform: translate(-50%, 1.2rem);
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  background: rgba(15, 8, 24, 0.94);
  border: 1px solid rgba(173, 111, 255, 0.18);
  box-shadow: var(--shadow-soft);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.scroll-top {
  right: 1rem;
  bottom: 1rem;
  z-index: 12;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  background: rgba(10, 14, 26, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top span {
  display: inline-block;
  width: 0.78rem;
  height: 0.78rem;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: translateY(4px) rotate(45deg);
}

.interactive:active,
.social-link:active,
.support-button:active,
.scroll-top:active {
  transform: translateY(0) scale(0.98);
}

.ripple {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  transform: translate(-50%, -50%) scale(0);
  animation: ripple 0.65s ease-out forwards;
  pointer-events: none;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px) scale(0.985);
  transition: opacity 650ms ease, transform 650ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0.8rem, -1.2rem, 0) scale(1.08);
  }
}

@keyframes star-drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-2.5rem, 1.4rem, 0);
  }
}

@keyframes star-twinkle {
  0% {
    opacity: 0.18;
  }
  50% {
    opacity: 0.42;
  }
  100% {
    opacity: 0.3;
  }
}

@keyframes sky-glow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@keyframes loader-pulse {
  0%,
  100% {
    transform: scale(0.95) rotate(0deg);
  }
  50% {
    transform: scale(1.03) rotate(8deg);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes ripple {
  to {
    transform: translate(-50%, -50%) scale(18);
    opacity: 0;
  }
}

@media (min-width: 700px) {
  .hero-layout {
    grid-template-columns: 1fr;
    align-items: center;
  }

  .support-banner {
    grid-template-columns: minmax(0, 1fr) minmax(290px, 330px);
    align-items: center;
  }

  .social-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-logo {
    order: initial;
  }
}

@media (max-width: 699px) {
  .links-head,
  .utility-bar {
    flex-direction: column;
    align-items: flex-end;
  }

  .utility-actions {
    justify-content: flex-end;
  }

  .mini-button,
  .theme-toggle {
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .stream-card,
  .links-panel {
    padding: 0.9rem;
  }

  .support-banner h2,
  .links-panel h2 {
    font-size: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .light,
  .support-button__glow {
    animation: none !important;
  }
}
