/* Página /links de CatSuii3D: mobile-first, paleta oficial y animaciones ligeras */
.links-page {
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.links-aura {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.aura-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(55px);
  opacity: .55;
  animation: aura-drift 16s ease-in-out infinite alternate;
}
.aura-1 {
  width: min(72vw, 420px);
  aspect-ratio: 1;
  top: -80px;
  left: -80px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
}
.aura-2 {
  width: min(78vw, 460px);
  aspect-ratio: 1;
  bottom: -100px;
  right: -90px;
  background: radial-gradient(circle, var(--pill), transparent 70%);
  animation-delay: -7s;
}
@keyframes aura-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(24px, 20px) scale(1.08); }
}

.links-topbar {
  position: relative;
  z-index: 2;
  background: transparent;
  border: 0;
  backdrop-filter: none;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 20px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.links-topbar .theme-control {
  margin-right: 0;
}
.links-home-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 50px;
  text-decoration: none;
  font-size: .8rem;
  font-weight: 600;
  color: var(--rose-dark);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .25s var(--ease-out), border-color .25s, background .25s;
}
.links-home-pill:hover {
  transform: translateY(-2px);
  border-color: var(--rose-dark);
  background: var(--surface);
}

.links-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 16px 20px 44px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Perfil + logo flotante */
.links-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 26px;
  animation: rise .8s var(--ease-out) both;
}

.links-avatar-stage {
  position: relative;
  width: 152px;
  height: 152px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}
.links-orbit {
  position: absolute;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  border: 1.5px dashed color-mix(in srgb, var(--rose-dark) 48%, transparent);
  animation: spin 26s linear infinite;
}
.links-orbit::after {
  content: "";
  position: absolute;
  top: 7%;
  left: 16%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rose-dark);
  box-shadow: 0 0 12px var(--rose);
}
.links-orbit-outer {
  width: 148px;
  height: 112px;
  border-style: solid;
  border-color: color-mix(in srgb, var(--pill-text) 24%, transparent);
  rotate: -14deg;
  animation: orbit 8s ease-in-out infinite;
}
.links-orbit-outer::after { display: none; }

.hero-spark.ls1 { top: 14%; left: 10%; width: 7px; height: 7px; }
.hero-spark.ls2 { top: 18%; right: 8%; width: 5px; height: 5px; animation-delay: .9s; }
.hero-spark.ls3 { bottom: 18%; left: 12%; width: 5px; height: 5px; animation-delay: 1.7s; }
.hero-spark.ls4 { bottom: 14%; right: 12%; width: 7px; height: 7px; animation-delay: 2.3s; }

.links-avatar-float {
  position: relative;
  z-index: 2;
  animation: links-float 5.2s ease-in-out infinite;
}
@keyframes links-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}
.links-avatar {
  display: block;
  width: 98px;
  height: 98px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 20px 36px -14px color-mix(in srgb, var(--rose-dark) 45%, transparent),
    0 0 0 5px color-mix(in srgb, var(--surface) 72%, transparent);
  transition: transform .45s var(--ease-out);
}
.links-avatar-stage:hover .links-avatar {
  transform: scale(1.06) rotate(-4deg);
}

.links-wordmark {
  width: 190px;
  height: auto;
  margin-top: 4px;
}
.links-handle {
  margin: 10px 0 0;
  padding: 5px 15px;
  border-radius: 50px;
  background: color-mix(in srgb, var(--pill) 65%, transparent);
  border: 1px solid color-mix(in srgb, var(--app-line) 70%, transparent);
  color: var(--pill-text);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .01em;
}

/* Lista de enlaces con entrada escalonada, destello y elevación */
.links-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.link-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 18px;
  text-decoration: none;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px -20px color-mix(in srgb, var(--ink) 28%, transparent);
  transition: transform .35s var(--ease-out), border-color .25s, box-shadow .35s, background .25s;
  animation: link-enter .65s var(--ease-out) calc(.08s + var(--i, 0) * .07s) both;
}

@keyframes link-enter {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to { opacity: 1; transform: none; }
}

.link-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent-soft) 55%, transparent), transparent 72%);
  opacity: 0;
  transition: opacity .3s;
}
.link-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 28%, color-mix(in srgb, var(--surface) 65%, transparent) 50%, transparent 72%);
  transform: translateX(-115%);
  transition: transform .75s var(--ease-out);
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-4px) scale(1.012);
  border-color: color-mix(in srgb, var(--rose-dark) 55%, var(--line));
  box-shadow: 0 20px 38px -20px color-mix(in srgb, var(--rose-dark) 48%, transparent);
}
.link-card:hover::before { opacity: 1; }
.link-card:hover::after { transform: translateX(115%); }
.link-card:active { transform: translateY(-1px) scale(.99); }

.link-card-featured {
  background: linear-gradient(125deg,
    color-mix(in srgb, var(--accent-soft) 58%, var(--surface)),
    color-mix(in srgb, var(--app-surface) 62%, var(--surface)));
  border-color: color-mix(in srgb, var(--rose) 65%, var(--line));
}

.link-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface));
  color: var(--rose-dark);
  border: 1px solid color-mix(in srgb, var(--rose) 35%, var(--line));
  transition: transform .35s var(--ease-out), background .25s;
}
.link-card-featured .link-ico {
  background: var(--surface);
}
.link-ico svg {
  width: 19px;
  height: 19px;
  display: block;
}
.link-ico-avatar img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: block;
}
.link-ico-img img[src*="tiktok"] { border-radius: 5px; }
.link-ico-img img {
  width: 19px;
  height: 19px;
  object-fit: contain;
  display: block;
  filter: var(--icon-filter);
}
.link-card:hover .link-ico {
  transform: scale(1.08) rotate(-5deg);
}

.link-text {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.link-title {
  display: block;
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.link-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: .88rem;
  font-weight: 700;
  color: var(--rose-dark);
  background: color-mix(in srgb, var(--paper) 65%, transparent);
  transition: transform .3s var(--ease-out), background .25s, color .25s;
}
.link-card:hover .link-arrow {
  transform: translate(2px, -2px);
  background: var(--button);
  color: var(--button-text);
}

/* Pie compacto */
.links-footer {
  margin-top: 30px;
  padding-top: 18px;
  width: 100%;
  border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .78rem;
}
.links-back-main {
  text-decoration: none;
  font-weight: 600;
  color: var(--rose-dark);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.links-back-main:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 420px) {
  .links-shell { padding: 10px 16px 36px; }
  .links-topbar { padding: 14px 16px 4px; }
  .links-topbar .theme-control > span { display: none; }
  .links-avatar-stage { width: 136px; height: 136px; }
  .links-avatar { width: 90px; height: 90px; }
  .links-orbit { width: 114px; height: 114px; }
  .links-orbit-outer { width: 136px; height: 102px; }
  .link-card { padding: 12px 13px; border-radius: 16px; }
  .link-ico { width: 36px; height: 36px; }
  .link-arrow { width: 28px; height: 28px; }
}

@media (hover: none) {
  .link-card::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .aura-blob,
  .links-profile,
  .links-orbit,
  .links-orbit-outer,
  .links-avatar-float,
  .hero-spark,
  .link-card {
    animation: none !important;
  }
  .link-card,
  .link-card::after,
  .link-ico,
  .link-arrow,
  .links-avatar {
    transition: none !important;
  }
}
