/* ============================================================
   VLink — Tech / Cyberpunk Dark Theme Override
   Loaded last to override the default light theme + inline theme.
   Uses !important to beat inline styles injected from __NEXT_DATA__.
   ============================================================ */

:root {
  --tt-bg-0: #05060d;
  --tt-bg-1: #0a0f1f;
  --tt-bg-2: #0d1428;
  --tt-cyan: #38e1ff;
  --tt-blue: #4d7cff;
  --tt-violet: #a855f7;
  --tt-text: #e6f0ff;
  --tt-text-dim: #8aa0c4;
  --tt-card: rgba(13, 20, 40, 0.55);
  --tt-card-border: rgba(56, 225, 255, 0.28);
  --tt-glow: 0 0 24px rgba(56, 225, 255, 0.35);
}

/* ---------- Base / Background ---------- */
html,
body {
  background: var(--tt-bg-0) !important;
  color: var(--tt-text) !important;
}

body {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(77, 124, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(168, 85, 247, 0.14), transparent 55%),
    linear-gradient(180deg, var(--tt-bg-1) 0%, var(--tt-bg-0) 100%) !important;
  background-attachment: fixed !important;
}

/* subtle tech grid overlay on top of everything via body::before */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(56, 225, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 225, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 80%);
}

/* The background layer injected from theme.back (a <div style="...">) */
.VLink_back__JW46n div,
.VLink_back-generate__4d0Yn div {
  background:
    radial-gradient(1000px 600px at 50% -10%, rgba(77, 124, 255, 0.22), transparent 60%),
    radial-gradient(800px 500px at 100% 110%, rgba(168, 85, 247, 0.18), transparent 55%),
    linear-gradient(180deg, var(--tt-bg-1), var(--tt-bg-0)) !important;
}

/* ---------- Home container ---------- */
.VLink_home__nr7us {
  color: var(--tt-text) !important;
}

/* ---------- Top nav (pill bar) ---------- */
.VLink_top-nav__UysS2 .VLink_subscribe__pcJwx,
.VLink_top-nav__UysS2 .VLink_share__Emqcy,
.VLink_top-nav__UysS2 .VLink_share-left__Dlap7 {
  background: rgba(13, 20, 40, 0.55) !important;
  border: 1px solid var(--tt-card-border) !important;
  color: var(--tt-text) !important;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.VLink_top-nav-active__ERa6G {
  background: rgba(13, 20, 40, 0.45) !important;
  border: 1px solid var(--tt-card-border) !important;
  backdrop-filter: blur(14px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(150%) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4), var(--tt-glow) !important;
}

/* ---------- Avatar (glowing ring) ---------- */
.VLink_avatar__yGfQx {
  border-radius: 50% !important;
  padding: 3px;
  background: linear-gradient(135deg, var(--tt-cyan), var(--tt-violet)) !important;
  box-shadow:
    0 0 0 1px rgba(56, 225, 255, 0.4),
    0 0 30px rgba(77, 124, 255, 0.55),
    0 0 60px rgba(168, 85, 247, 0.25) !important;
}
.VLink_avatar__yGfQx .VLink_img-avatar__rbwgx {
  border-radius: 50% !important;
  display: block;
}
.VLink_avatar-replace__3KscX {
  background: linear-gradient(135deg, #0d1428, #1a2240) !important;
  color: var(--tt-cyan) !important;
  border: 1px solid var(--tt-card-border) !important;
  box-shadow: var(--tt-glow) !important;
}

/* ---------- Name & intro ---------- */
.VLink_name__OisxL,
.theme-name {
  color: var(--tt-text) !important;
  text-shadow: 0 0 18px rgba(56, 225, 255, 0.55), 0 0 36px rgba(77, 124, 255, 0.25) !important;
}

.VLink_intro__Trv4_,
.theme-intro {
  color: var(--tt-text-dim) !important;
}

/* ---------- Link cards (.theme-vlink is applied to each item) ---------- */
.theme-vlink {
  background: var(--tt-card) !important;
  color: var(--tt-text) !important;
  border: 1px solid var(--tt-card-border) !important;
  border-radius: 16px !important;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
}

/* top sheen */
.theme-vlink::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(56, 225, 255, 0.10) 45%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* animated neon edge on hover */
.theme-vlink::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--tt-cyan), var(--tt-blue), var(--tt-violet));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.theme-vlink:hover {
  transform: translateY(-3px) !important;
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.55),
    0 0 26px rgba(56, 225, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(56, 225, 255, 0.55) !important;
}
.theme-vlink:hover::before { opacity: 1; }
.theme-vlink:hover::after { opacity: 1; }

/* item title text */
.VLink_item-title__axSWL,
.VLink_item-title-noicon__P0Yke {
  color: var(--tt-text) !important;
  text-shadow: 0 0 10px rgba(56, 225, 255, 0.25) !important;
}

/* link icons (circle images) */
.VLink_icon-img__5Kv_A {
  border: 1px solid var(--tt-card-border) !important;
  box-shadow: 0 0 14px rgba(56, 225, 255, 0.4) !important;
  background: rgba(13, 20, 40, 0.6) !important;
}

/* the divider line some items render */
.VLink_item-line__OPsFO {
  border-bottom: 1px solid rgba(56, 225, 255, 0.25) !important;
}

/* ---------- Link image cards (banner type) ---------- */
.VLink_vlink-img-container__fSek8 {
  border-radius: 18px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--tt-card-border) !important;
}
.VLink_vlink-img-container__fSek8 .VLink_vlink-img__Qcsqd {
  border-radius: 18px !important;
}

/* ---------- Logo / footer ---------- */
.VLink_logo__lThiD {
  color: var(--tt-text-dim) !important;
  opacity: 0.85;
}

/* ---------- Scrollbar (dark) ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--tt-cyan), var(--tt-blue)) !important;
  border-radius: 6px !important;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04) !important;
}

/* ---------- Dialogs / popups (keep readable) ---------- */
.Dialog_dialog-content__tmGAw,
.PopupCustom_content__mFd__ {
  background: var(--tt-bg-2) !important;
  color: var(--tt-text) !important;
  border: 1px solid var(--tt-card-border) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), var(--tt-glow) !important;
}
.PopupCustom_closeButton__fDEyQ { color: var(--tt-text-dim) !important; }
.Dialog_dialog-buttons__Ox5Ds button {
  background: var(--tt-bg-2) !important;
  color: var(--tt-text-dim) !important;
  border-color: rgba(56, 225, 255, 0.2) !important;
}
.Dialog_confirm__cvmCx {
  color: var(--tt-cyan) !important;
}

/* ---------- Toastify (dark friendly) ---------- */
.Toastify__toast-theme--light {
  background: var(--tt-bg-2) !important;
  color: var(--tt-text) !important;
  border: 1px solid var(--tt-card-border) !important;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .theme-vlink,
  .theme-vlink::before,
  .theme-vlink::after {
    transition: none !important;
  }
  .theme-vlink:hover { transform: none !important; }
}
