/* ═══════════════════════════════════════════════════════
   SPILLZ HUB — Purple / Cyan / Lime Gaming Theme
   ═══════════════════════════════════════════════════════ */

/* ── Colour palette ─────────────────────────────── */
:root {
  --purple-light: #c4b5fd;
  --purple:       #7c3aed;
  --purple-dark:  #5b21b6;
  --yellow-light: #fde68a;
  --yellow:       #f59e0b;
  --yellow-dark:  #d97706;
  --lime-light:   #bbf7d0;
  --lime:         #22c55e;
  --lime-dark:    #16a34a;
  --cyan-light:   #a5f3fc;
  --cyan:         #06b6d4;
  --cyan-dark:    #0891b2;
  --white:        #f5f3ff;
  --white-pure:   #ffffff;
  --text:         #e2e0f0;
  --text-muted:   #a7a3c2;
  --card-bg:      rgba(20, 15, 40, 0.75);
  --card-radius:  24px;
  --btn-radius:   40px;
  --shadow:       0 8px 32px rgba(124, 58, 237, 0.18);
}

/* ── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
}

/*
  Z-INDEX LAYER ORDER:
    1  bg-fluid            — animated gradient background
    2  bg-blur             — frosted blur overlay
    3  petal-canvas        — falling emojis
    5  hub / footer        — the main content
    6  sparkle-particles   — hover sparkles
   10  emoji-bouncer       — bouncing emojis
   11  emoji-bubble        — chat bubbles above emojis
*/

/* ── Animated fluid gradient background ─────────────── */
.bg-fluid {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 1;
  background:
    radial-gradient(ellipse 600px 600px at 20% 30%, rgba(124, 58, 237, 0.6), transparent),
    radial-gradient(ellipse 500px 500px at 80% 20%, rgba(6, 182, 212, 0.5), transparent),
    radial-gradient(ellipse 700px 700px at 60% 70%, rgba(34, 197, 94, 0.4), transparent),
    radial-gradient(ellipse 550px 550px at 30% 80%, rgba(245, 158, 11, 0.5), transparent),
    radial-gradient(ellipse 400px 400px at 70% 50%, rgba(124, 58, 237, 0.3), transparent),
    linear-gradient(135deg, #1e1b4b 0%, #0f172a 50%, #1e1b4b 100%);
  animation: fluid-drift 20s ease-in-out infinite alternate;
}

@keyframes fluid-drift {
  0%   { transform: translate(0%, 0%) rotate(0deg) scale(1); }
  25%  { transform: translate(-5%, 3%) rotate(2deg) scale(1.02); }
  50%  { transform: translate(3%, -4%) rotate(-1deg) scale(0.98); }
  75%  { transform: translate(-3%, -2%) rotate(3deg) scale(1.01); }
  100% { transform: translate(4%, 2%) rotate(-2deg) scale(1); }
}

/* ── Blur overlay ─────────────────────────────────────── */
.bg-blur {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  background: rgba(15, 23, 42, 0.15);
  pointer-events: none;
}

/* ── Petal canvas (falling emojis) ────────────────────── */
#petal-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

/* ── Bouncing emoji container ─────────────────────────── */
#emoji-bouncer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

#emoji-bouncer .bouncing-emoji {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  font-size: 48px;
  line-height: 1;
  user-select: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* ── Emoji chat bubbles ──────────────────────────────── */
.emoji-bubble {
  position: absolute;
  pointer-events: none;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 600;
  color: #3b1f6e;
  background: rgba(245, 243, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid var(--purple-light);
  border-radius: 14px;
  padding: 5px 12px;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.18);
  transform: translate(-50%, -100%);
  transition: opacity 0.3s ease;
  z-index: 11;
}

.emoji-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid var(--purple-light);
}

.emoji-bubble strong { color: var(--purple-dark); }
.emoji-bubble em { font-style: italic; }
.emoji-bubble s { opacity: 0.6; }
.emoji-bubble code {
  background: var(--purple-light);
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 0.78rem;
}

/* ═══════════════════════════════════════════════════════
   HUB LAYOUT — Vertical, centered, stacked
   ═══════════════════════════════════════════════════════ */
.hub {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(480px, 92vw);
  height: min(620px, 92vh);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow), 0 0 80px rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  overflow: hidden;
  animation: hub-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hub-enter {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ── Profile Header ──────────────────────────────────── */
.hub__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px 12px;
  width: 100%;
  flex-shrink: 0;
}

/* Animated ring around avatar */
.avatar-ring {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(
    var(--purple), var(--cyan), var(--lime), var(--yellow), var(--purple)
  );
  animation: ring-spin 4s linear infinite;
  margin-bottom: 12px;
}

@keyframes ring-spin {
  to { transform: rotate(360deg); }
}

.hub__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(20, 15, 40, 1);
  display: block;
}

.hub__name {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white-pure);
  letter-spacing: 0.04em;
  text-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
}

.hub__tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Social Icons (in header) ────────────────────────── */
.hub__socials {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

.social-link {
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
}

.social-link:hover {
  transform: scale(1.2);
}

.social-link img {
  filter: brightness(0) invert(1) opacity(0.6);
  transition: filter 0.2s;
}

.social-link:hover img {
  filter: brightness(0) invert(1) opacity(1) drop-shadow(0 0 6px rgba(6, 182, 212, 0.6));
}

/* ── Tab Navigation ──────────────────────────────────── */
.hub__tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  margin-top: 16px;
  width: 100%;
  flex-shrink: 0;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 8px 8px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s;
  border-radius: 12px 12px 0 0;
  position: relative;
}

.tab__icon {
  font-size: 1.2rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tab__label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.25s;
}

.tab:hover .tab__icon {
  transform: scale(1.15) translateY(-2px);
}

.tab:hover .tab__label {
  color: var(--text);
}

.tab.active {
  background: rgba(124, 58, 237, 0.12);
  border-bottom-color: var(--purple);
}

.tab.active .tab__label {
  color: var(--purple-light);
}

.tab.active .tab__icon {
  transform: scale(1.1);
  animation: tab-bounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tab-bounce {
  0%   { transform: scale(0.8) translateY(4px); }
  60%  { transform: scale(1.2) translateY(-4px); }
  100% { transform: scale(1.1) translateY(0); }
}

/* ── Divider line under tabs ─────────────────────────── */
.hub__tabs::after {
  content: none;
}

/* ── Content Area ────────────────────────────────────── */
.hub__content {
  flex: 1;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 28px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.hub__content[data-active-page="home"] .panel[data-page="home"],
.hub__content[data-active-page="giveaways"] .panel[data-page="giveaways"],
.hub__content[data-active-page="content"] .panel[data-page="content"],
.hub__content[data-active-page="business"] .panel[data-page="business"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.panel__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  width: 100%;
  max-width: 360px;
}

/* ── Panel text styles ───────────────────────────────── */
.panel__hero-text {
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.5;
}

.panel__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white-pure);
  letter-spacing: 0.03em;
}

.panel__description {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 320px;
}

.panel__sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.panel__flair {
  font-size: 0.85rem;
  color: var(--purple-light);
  letter-spacing: 0.02em;
}

.panel__divider {
  width: 60%;
  border: none;
  border-top: 1px solid rgba(124, 58, 237, 0.25);
  margin: 4px 0;
}

.panel__disclaimer {
  font-size: 0.6rem;
  color: rgba(167, 163, 194, 0.45);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* ── CTA Link ────────────────────────────────────────── */
.cta-link {
  color: var(--purple-light);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s, text-shadow 0.2s;
}

.cta-link:hover {
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
}

/* ── Giveaway CTA Button ────────────────────────────── */
.giveaway-cta {
  display: inline-block;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  padding: 0.65rem 1.8rem;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
  animation: cta-glow 2s ease-in-out infinite alternate;
}

.giveaway-cta:hover {
  transform: scale(1.06);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.6), 0 0 60px rgba(6, 182, 212, 0.3);
  filter: brightness(1.15);
}

@keyframes cta-glow {
  from { box-shadow: 0 0 20px rgba(139, 92, 246, 0.4); }
  to   { box-shadow: 0 0 30px rgba(6, 182, 212, 0.5); }
}

/* ── Email Code Block ────────────────────────────────── */
.email-code-block {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.email-code-block:hover {
  border-color: var(--purple);
  background: rgba(0, 0, 0, 0.5);
}

.email-code-text {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  color: var(--cyan);
  user-select: all;
  letter-spacing: 0.03em;
}

.email-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s, opacity 0.2s;
  opacity: 0;
}

.email-code-block:hover .email-copy-btn {
  opacity: 1;
}

.email-copy-btn:hover {
  color: var(--cyan);
  background: rgba(255, 255, 255, 0.08);
}

.email-copy-btn.copied {
  color: #4ade80;
  opacity: 1;
}

/* ── Social tooltip ──────────────────────────────────── */
.social-tooltip {
  position: fixed;
  pointer-events: none;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white-pure);
  background: rgba(20, 15, 40, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 10px;
  padding: 4px 12px;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.25);
  transform: translate(-50%, -100%);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.social-tooltip.visible {
  opacity: 1;
}

.social-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(124, 58, 237, 0.3);
}

/* ── Sparkle floating particles ──────────────────────── */
#sparkle-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
}

.sparkle-particle {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  font-size: 1.1rem;
  animation: sparkle-float 2s ease-out forwards;
  user-select: none;
}

@keyframes sparkle-float {
  0% {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-80px) translateX(var(--drift, 0px)) scale(0.4) rotate(var(--spin, 0deg));
  }
}

/* ── Cursor sparkle trail ────────────────────────────── */
.cursor-sparkle {
  position: absolute;
  pointer-events: none;
  font-size: 0.7rem;
  opacity: 0.7;
  animation: cursor-sparkle-float 1.2s ease-out forwards;
  user-select: none;
}

@keyframes cursor-sparkle-float {
  0% {
    opacity: 0.7;
    transform: translateY(0) translateX(0) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-50px) translateX(var(--drift, 0px)) scale(0.2) rotate(var(--spin, 0deg));
  }
}

/* ── 404 Page ────────────────────────────────────────── */
.card--404 {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: min(420px, 88vw);
  height: min(320px, 70vh);
  padding: 48px 36px;
  gap: 12px;
}

.four04__title {
  font-size: 5rem;
  font-weight: 800;
  color: var(--purple-dark);
  letter-spacing: 0.05em;
  line-height: 1;
}

.four04__subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.four04__btn {
  display: inline-block;
  text-decoration: none;
  padding: 12px 32px;
  border-radius: var(--btn-radius);
  background: var(--purple-light);
  color: #3b1f6e;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
  cursor: pointer;
}

.four04__btn:hover {
  background: var(--purple);
  color: var(--white-pure);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 520px) {
  .hub {
    width: 96vw;
    height: auto;
    max-height: 96vh;
    border-radius: 18px;
  }

  .hub__header {
    padding: 20px 16px 8px;
  }

  .avatar-ring {
    width: 80px;
    height: 80px;
    margin-bottom: 8px;
  }

  .hub__name {
    font-size: 1.3rem;
  }

  .hub__tabs {
    padding: 0 8px;
    gap: 2px;
  }

  .tab {
    padding: 8px 4px 6px;
  }

  .tab__label {
    font-size: 0.6rem;
  }

  .panel {
    padding: 16px 16px;
  }

  .giveaway-cta {
    font-size: 1.1rem;
    padding: 0.5rem 1.4rem;
  }
}
