/* ==========================================================================
   CAS3D Links Hub - Purple Glassmorphism Theme
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Theme Variables & Design Tokens
   -------------------------------------------------------------------------- */
:root {
  --font-heading: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  /* Deep Violet & Purple Night Background */
  --bg-primary: #0a0614;
  --bg-secondary: #130a24;

  /* Purple Glass Variables */
  --glass-bg: rgba(168, 85, 247, 0.08);
  --glass-bg-hover: rgba(192, 132, 252, 0.14);
  --glass-border: rgba(192, 132, 252, 0.22);
  --glass-border-hover: rgba(216, 180, 254, 0.45);
  --glass-blur: 24px;
  --glass-shine: rgba(255, 255, 255, 0.35);

  /* Purple Accents */
  --primary-accent: #a855f7;       /* Vibrant Purple */
  --secondary-accent: #c084fc;     /* Soft Bright Purple */
  --light-accent: #e9d5ff;         /* Pastel Lavender */
  --glow-color: rgba(168, 85, 247, 0.35);

  /* Text */
  --text-main: #f5f3ff;
  --text-muted: #a78bfa;
  --text-sub: #ddd6fe;

  /* Radii */
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent !important;
  user-select: none;
  outline: none !important;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  width: 100%;
  overflow-x: hidden;
  background-color: var(--bg-primary);
}

body {
  font-family: var(--font-body);
  background-color: transparent;
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2.5rem 1rem 3rem 1rem;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   3. Ambient Purple Background
   -------------------------------------------------------------------------- */
.bg-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.gradient-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(168, 85, 247, 0.38) 0%, rgba(147, 51, 234, 0.18) 35%, transparent 65%),
    radial-gradient(circle at 82% 80%, rgba(168, 85, 247, 0.32) 0%, rgba(126, 34, 206, 0.16) 35%, transparent 65%),
    radial-gradient(ellipse at 50% 50%, #0f0720 0%, #07030e 100%);
}

/* Floating Purple Glow Orbs (smooth radial gradients without heavy GPU blur filters) */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: float 22s ease-in-out infinite;
  will-change: transform;
}

.orb-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle,
    rgba(168, 85, 247, 0.42) 0%,
    rgba(147, 51, 234, 0.22) 30%,
    rgba(126, 34, 206, 0.08) 55%,
    transparent 75%);
  top: -12%;
  left: -10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle,
    rgba(192, 132, 252, 0.36) 0%,
    rgba(168, 85, 247, 0.20) 35%,
    rgba(126, 34, 206, 0.06) 55%,
    transparent 75%);
  bottom: -10%;
  right: -10%;
  animation-delay: -8s;
}

.orb-3 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle,
    rgba(216, 180, 254, 0.28) 0%,
    rgba(168, 85, 247, 0.14) 40%,
    transparent 70%);
  top: 35%;
  left: 52%;
  animation-delay: -15s;
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  20% { transform: translate3d(35px, -40px, 0) scale(1.05); }
  40% { transform: translate3d(-25px, 25px, 0) scale(0.95); }
  60% { transform: translate3d(20px, 35px, 0) scale(1.03); }
  80% { transform: translate3d(-15px, -15px, 0) scale(0.97); }
}

.noise-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   4. App Container & Top Bar
   -------------------------------------------------------------------------- */
.app-container {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  z-index: 1;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.brand-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light-accent);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.16) 0%, rgba(126, 34, 206, 0.08) 100%);
  border: 1px solid rgba(192, 132, 252, 0.30);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.20),
    0 4px 15px rgba(168, 85, 247, 0.15);
}

/* --------------------------------------------------------------------------
   5. Profile Card
   -------------------------------------------------------------------------- */
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  margin-bottom: 0.5rem;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(192, 132, 252, 0.40);
  box-shadow:
    0 0 0 4px rgba(168, 85, 247, 0.25),
    0 0 35px rgba(168, 85, 247, 0.30),
    0 10px 40px rgba(0, 0, 0, 0.6);
  transition: all var(--transition-fast);
}

.avatar-wrapper:hover .avatar-img {
  box-shadow:
    0 0 0 5px rgba(192, 132, 252, 0.45),
    0 0 55px rgba(168, 85, 247, 0.45),
    0 14px 50px rgba(0, 0, 0, 0.7);
  transform: scale(1.03);
}

.avatar-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border: 3px solid var(--bg-primary);
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.6);
}

/* --------------------------------------------------------------------------
   6. Purple Glass Link Cards
   -------------------------------------------------------------------------- */
.links-section {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-left: 0.1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.links-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

/* ---- Purple Glassmorphic Card ---- */
.glass-card {
  position: relative;
  width: 100%;
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.12) 0%,
    rgba(126, 34, 206, 0.05) 50%,
    rgba(192, 132, 252, 0.08) 100%
  );
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(168, 85, 247, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.20),
    inset 0 -1px 2px rgba(126, 34, 206, 0.25);
  transition: all var(--transition-fast);
  overflow: hidden;
}

/* 2.1 Shimmer Light Sweep on Hover (specular reflection beam across the glass) */
.glass-card .glass-shimmer {
  position: absolute;
  top: 0;
  left: -150%;
  width: 80%;
  height: 100%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(216, 180, 254, 0.04) 30%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(216, 180, 254, 0.08) 60%,
    transparent 100%
  );
  transform: skewX(-25deg);
  pointer-events: none;
  z-index: 3;
  transition: none;
}

.glass-card:hover .glass-shimmer {
  animation: glassSweep 1.35s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes glassSweep {
  0% {
    left: -150%;
  }
  100% {
    left: 200%;
  }
}

/* Top highlight edge shine (with purple tint) */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(216, 180, 254, 0.35) 20%,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(216, 180, 254, 0.35) 80%,
    transparent 100%
  );
  z-index: 1;
}

/* Inner purple glass reflection */
.glass-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(
    180deg,
    rgba(192, 132, 252, 0.08) 0%,
    transparent 100%
  );
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  pointer-events: none;
  z-index: 0;
}

.link-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.4rem;
  text-decoration: none;
  color: var(--text-main);
  cursor: pointer;
  z-index: 2;
  width: 100%;
}

.glass-card:hover {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.20) 0%,
    rgba(147, 51, 234, 0.10) 50%,
    rgba(192, 132, 252, 0.16) 100%
  );
  border-color: var(--glass-border-hover);
  transform: translateY(-3px) scale(1.005);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.45),
    0 0 35px rgba(168, 85, 247, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.30),
    inset 0 -1px 2px rgba(168, 85, 247, 0.35);
}

.glass-card:hover::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(216, 180, 254, 0.50) 20%,
    rgba(255, 255, 255, 0.90) 50%,
    rgba(216, 180, 254, 0.50) 80%,
    transparent 100%
  );
}

.link-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.25);
  flex-shrink: 0;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* Platform-Specific Icon Colors */
.link-icon.etsy { color: #f97316; }
.link-icon.tiktok { color: #ff2d60; }
.link-icon.youtube { color: #ff3b30; }
.link-icon.instagram { color: #f43f5e; }

/* Hover glow per platform */
.glass-card:hover .link-icon.etsy {
  background: rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.4);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}
.glass-card:hover .link-icon.tiktok {
  background: rgba(255, 45, 96, 0.15);
  border-color: rgba(255, 45, 96, 0.4);
  box-shadow: 0 0 20px rgba(255, 45, 96, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}
.glass-card:hover .link-icon.youtube {
  background: rgba(255, 59, 48, 0.15);
  border-color: rgba(255, 59, 48, 0.4);
  box-shadow: 0 0 20px rgba(255, 59, 48, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}
.glass-card:hover .link-icon.instagram {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.link-text-content {
  flex: 1;
  margin: 0 1rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.link-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.link-sublabel {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.chevron {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.glass-card:hover .chevron {
  transform: translateX(4px);
  color: var(--secondary-accent);
}

/* --------------------------------------------------------------------------
   7. Footer & Social Bar
   -------------------------------------------------------------------------- */
.footer-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.3rem;
  margin-top: 1rem;
  text-align: center;
}

.social-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
}

.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.10) 0%, rgba(126, 34, 206, 0.05) 100%);
  border: 1px solid rgba(192, 132, 252, 0.25);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  text-decoration: none;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  transition: all var(--transition-fast);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

/* Top shine on social icons */
.social-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 50%;
}

.social-icon:hover {
  background: rgba(168, 85, 247, 0.25);
  color: #fff;
  border-color: rgba(216, 180, 254, 0.50);
  transform: translateY(-3px) scale(1.05);
  box-shadow:
    0 8px 25px rgba(168, 85, 247, 0.35),
    inset 0 1px 2px rgba(255, 255, 255, 0.25);
}

/* --------------------------------------------------------------------------
   8. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  body {
    padding: 1.5rem 0.75rem 2.5rem 0.75rem;
  }

  .avatar-wrapper {
    width: 110px;
    height: 110px;
  }

  .orb-1 { width: 320px; height: 320px; }
  .orb-2 { width: 260px; height: 260px; }
  .orb-3 { width: 190px; height: 190px; }
}
