/* ===========================
   Pooplands — Global Styles
   =========================== */

:root{
  --nav-h:60px;
  --blur:10px;
  --ink:#0f172a;

  --violet:#7a3fff;
  --pink:#ff66b3;
  --yellow:#ffd93d;

  /* Visual knobs */
  --sheen:.42;          /* 0.10–0.30 darker overlay - 20% darker than before */
  --spark-size:12px;    /* sparkle dot size */
  --spark-glow:16px;    /* sparkle glow radius */

  /* Mobile hero vertical lift (how far to move the banner UP) */
  --mobile-hero-lift:96px;
}

*{ box-sizing:border-box }
html,body{ 
  height:100%; 
  margin:0; 
  padding:0; 
  overflow-x:hidden;
}
body{
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--ink);
  background:#0e0b16;
  width:100vw;
  min-height:100vh;
}

/* ===========================
   Top Navigation
   =========================== */

.topnav{
  position:fixed; inset:0 0 auto 0; z-index:50;
  display:flex; align-items:center; gap:12px;
  padding:10px 16px;
  background:rgba(255,255,255,.55);
  backdrop-filter:blur(var(--blur));
  border-bottom:1px solid #00000010;
}

/* Brand styling */
.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 20px;
}

.poop-emoji {
  font-size: 24px;
  margin-right: 8px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  margin-right: 8px;
  display: inline-block;
  vertical-align: middle;
}

.brand-text {
  display: block;
}

/* Hide brand text on mobile, show only brand icon */
@media (max-width: 768px) {
  .brand-text {
    display: none;
  }
  
  .brand-icon {
    margin-right: 0;
    width: 28px;
    height: 28px;
  }
}

/* Right-align links */
.parent-links{
  margin-left:auto !important;
  display:flex; gap:16px; align-items:center;
  justify-content:flex-end !important;
}

/* Mobile styles will be consolidated at the bottom */
.parent-links a{
  padding:8px 12px; border-radius:10px;
  text-decoration:none; color:var(--ink);
}
.parent-links a:hover{ background:#ffffffcc }
.parent-links a:active,
.parent-links a:visited {
  background: #ffffffcc;
  color: var(--ink);
}

/* ===========================
   Hero
   =========================== */

.hero{
  position:relative; min-height:100vh; overflow:hidden;
  margin-top:0; display:grid; place-items:center;
}

/* Content */
.hero-content{
  position:relative; z-index:6;
  padding:calc(var(--nav-h) + 1.5rem) 1rem 2rem;
  text-align:center;
}
.headline-card{
  display:inline-block;
  padding:20px 24px; border-radius:20px;
  background: linear-gradient(135deg, 
    rgba(255, 182, 193, 0.9) 0%,    /* Light pink */
    rgba(255, 218, 185, 0.9) 25%,   /* Peach */
    rgba(255, 255, 182, 0.9) 50%,   /* Light yellow */
    rgba(185, 255, 185, 0.9) 75%,   /* Light green */
    rgba(182, 185, 255, 0.9) 100%   /* Light purple */
  );
  backdrop-filter:blur(15px);
  box-shadow:0 16px 40px rgba(0,0,0,.2),
             0 8px 16px rgba(255, 182, 193, 0.3),
             inset 0 0 0 3px rgba(255,255,255,.6);
  border: 2px solid rgba(255, 255, 255, 0.8);
}
.title{
  margin:0; font-weight:900; line-height:.95;
  font-size:clamp(42px,8vw,88px);
  text-shadow:0 3px 0 #ffffff, 0 6px 12px rgba(0,0,0,0.3);
}
.title-line{ 
  color: #e91e63; /* Darker pink */
  text-shadow:0 3px 0 #ffffff, 0 6px 12px rgba(233, 30, 99, 0.4);
}
.title-accent{ 
  color: #00acc1; /* Darker teal */
  text-shadow:0 3px 0 #ffffff, 0 6px 12px rgba(0, 172, 193, 0.4);
}
.subtitle{ 
  margin:18px 0 16px; 
  font-size:clamp(16px,2.4vw,22px);
  color: #000000; /* Black */
  font-weight: 600;
  text-shadow: none;
}

/* Character Introduction - Removed */

/* Video Background */
.bg-media{
  position:fixed; top:0; left:0; width:100vw; height:100vh; z-index:-3;
  overflow:hidden;
}
.hero-video{
  position:absolute; top:50%; left:50%; 
  width:100vw; height:100vh;
  object-fit:cover; z-index:-3;
  min-width:100vw; min-height:100vh;
  transform: translate(-50%, -50%) scale(1.1) translateZ(0);
  /* Scale up slightly to eliminate any potential gaps */
  object-position: center center;
  
  /* Performance optimizations for smooth playback */
  will-change: transform; /* Hint browser to optimize */
  backface-visibility: hidden; /* Prevent flickering */
  -webkit-backface-visibility: hidden;
  image-rendering: optimizeSpeed; /* Faster rendering */
  image-rendering: -webkit-optimize-contrast;
}

/* Pastel overlay removed for cleaner video display */

/* ===========================
   VORTEX CHARACTER SUCTION ANIMATIONS
   =========================== */

.vortex-characters{
  position:absolute; inset:0; z-index:4; pointer-events:none;
}

.character-vortex{
  position:absolute;
  animation:vortex-suction 15s ease-in-out infinite;
}

.character-avatar{
  width:clamp(60px, 8vw, 120px);
  height:auto;
  filter:drop-shadow(0 0 16px rgba(255,255,255,0.8));
  animation:character-spin 4s linear infinite;
  transition:opacity 0.3s ease;
}

.character-trail{
  position:absolute; top:50%; left:50%;
  width:120px; height:6px; background:linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
  transform:translate(-50%, -50%) rotate(45deg);
  animation:trail-fade 15s ease-in-out infinite;
}

/* Sunny - Starts top-left, spirals to center */
.sunny-vortex{
  top:15%; left:20%;
  animation-delay:0s;
  animation-duration:15s;
}
.sunny-vortex .character-avatar{
  filter:drop-shadow(0 0 20px #FFD600) hue-rotate(0deg);
}

/* Cosmo - Starts top-right, spirals to center */
.cosmo-vortex{
  top:20%; right:25%;
  animation-delay:5s;
  animation-duration:18s;
}
.cosmo-vortex .character-avatar{
  filter:drop-shadow(0 0 20px #FF5DA2) hue-rotate(0deg);
}

/* Nova - Starts bottom-left, spirals to center */
.nova-vortex{
  bottom:25%; left:15%;
  animation-delay:10s;
  animation-duration:16s;
}
.nova-vortex .character-avatar{
  filter:drop-shadow(0 0 20px #7C4DFF) hue-rotate(0deg);
}

/* Comet - Starts bottom-right, spirals to center */
.comet-vortex{
  bottom:20%; right:20%;
  animation-delay:12s;
  animation-duration:14s;
}
.comet-vortex .character-avatar{
  filter:drop-shadow(0 0 20px #ff6b6b) hue-rotate(0deg);
}

/* Main vortex suction animation */
@keyframes vortex-suction{
  0%{
    transform:translate(0, 0) scale(1) rotate(0deg);
    opacity:1;
  }
  25%{
    transform:translate(25vw, 25vh) scale(0.8) rotate(90deg);
    opacity:0.9;
  }
  50%{
    transform:translate(0, 0) scale(0.6) rotate(180deg);
    opacity:0.7;
  }
  75%{
    transform:translate(-15vw, -15vh) scale(0.4) rotate(270deg);
    opacity:0.4;
  }
  100%{
    transform:translate(0, 0) scale(0.1) rotate(360deg);
    opacity:0;
  }
}

/* Character spinning while being sucked in */
@keyframes character-spin{
  0%{ transform:rotate(0deg) scale(1); }
  50%{ transform:rotate(180deg) scale(1.1); }
  100%{ transform:rotate(360deg) scale(1); }
}

/* Trail effect that follows the character */
@keyframes trail-fade{
  0%{ opacity:0; transform:translate(-50%, -50%) rotate(45deg) scale(0.5); }
  25%{ opacity:0.8; transform:translate(-50%, -50%) rotate(135deg) scale(1); }
  50%{ opacity:0.6; transform:translate(-50%, -50%) rotate(225deg) scale(0.8); }
  75%{ opacity:0.3; transform:translate(-50%, -50%) rotate(315deg) scale(0.6); }
  100%{ opacity:0; transform:translate(-50%, -50%) rotate(405deg) scale(0.2); }
}

/* Banner animation removed - keeping it simple */

/* Floating World Previews in Portal */
.world-preview{
  position:absolute; z-index:-2;
  font-size:clamp(24px, 4vw, 48px);
  opacity:0.7;
  filter:drop-shadow(0 0 8px rgba(255,255,255,0.3));
  animation:float-world 8s ease-in-out infinite;
}

.world-preview:nth-child(1){
  top:15%; left:20%; animation-delay:0s;
  animation-duration:6s;
}
.world-preview:nth-child(2){
  top:25%; right:15%; animation-delay:1.5s;
  animation-duration:7s;
}
.world-preview:nth-child(3){
  bottom:30%; left:10%; animation-delay:3s;
  animation-duration:8s;
}
.world-preview:nth-child(4){
  bottom:20%; right:25%; animation-delay:4.5s;
  animation-duration:6.5s;
}
.world-preview:nth-child(5){
  top:60%; left:50%; animation-delay:2s;
  animation-duration:9s;
}

@keyframes float-world{
  0%, 100%{ 
    transform:translateY(0px) rotate(0deg) scale(1);
    opacity:0.7;
  }
  25%{ 
    transform:translateY(-20px) rotate(5deg) scale(1.1);
    opacity:0.9;
  }
  50%{ 
    transform:translateY(-10px) rotate(-3deg) scale(0.9);
    opacity:0.6;
  }
  75%{ 
    transform:translateY(-30px) rotate(8deg) scale(1.05);
    opacity:0.8;
  }
}
/* Duplicate removed - hero-video already defined above */

/* Overlays removed for cleaner video display */

/* ===========================
   Character Burst Effects (Chirplops)
   =========================== */

.fireflies{
  position:absolute; inset:0; z-index:5; pointer-events:none;
  mix-blend-mode:screen;
}

/* Removed floating background elements and spinning circle - keeping only original sparkle system */

/* Sunny's Stars - Portal Travel Bursts */
.fireflies span:nth-child(odd){
  position:absolute;
  width:var(--spark-size); height:var(--spark-size);
  background:radial-gradient(circle, #FFD600 0%, #F4A300 50%, rgba(255,255,255,0) 70%);
  clip-path:polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  opacity:0.6;
  filter:drop-shadow(0 0 var(--spark-glow) #FFD600) hue-rotate(0deg);
  animation:twinkle 2.4s ease-in-out infinite, drift 8s linear infinite;
}

/* Cosmo's Jellybeans - Portal Travel Bursts */
.fireflies span:nth-child(even){
  position:absolute;
  width:calc(var(--spark-size) * 0.8); height:calc(var(--spark-size) * 1.2);
  background:linear-gradient(45deg, #FF5DA2 0%, #FFB3D1 50%, #FF5DA2 100%);
  border-radius:50% 50% 50% 50% / 60% 60% 40% 40%;
  opacity:0.6;
  filter:drop-shadow(0 0 var(--spark-glow) #FF5DA2) hue-rotate(300deg);
  animation:twinkle 2.8s ease-in-out infinite, drift 10s linear infinite;
}

/* Portal burst effect - like traveling through dimensions */
@keyframes portal-burst{
  0%, 90%, 100%{ 
    transform:scale(1) rotate(0deg);
    filter:drop-shadow(0 0 var(--spark-glow) currentColor) hue-rotate(0deg);
  }
  5%{ 
    transform:scale(1.5) rotate(180deg);
    filter:drop-shadow(0 0 calc(var(--spark-glow) * 2) currentColor) hue-rotate(120deg);
  }
  10%{ 
    transform:scale(0.8) rotate(360deg);
    filter:drop-shadow(0 0 calc(var(--spark-glow) * 1.5) currentColor) hue-rotate(240deg);
  }
}

/* Scatter + randomize - positioned at edges to create vortex effect */
.fireflies span:nth-child(1){top:0%;left:0%;animation-delay:.1s,0s;   animation-duration:2.2s,6s}
.fireflies span:nth-child(2){top:0%;right:0%;animation-delay:.6s,1s;   animation-duration:2.8s,7s}
.fireflies span:nth-child(3){top:0%;left:25%;animation-delay:1.1s,.5s; animation-duration:2.0s,5s}
.fireflies span:nth-child(4){bottom:0%;left:0%;animation-delay:.3s,2s;   animation-duration:2.5s,8s}
.fireflies span:nth-child(5){top:0%;right:25%;animation-delay:1.4s,.8s; animation-duration:2.9s,9s}
.fireflies span:nth-child(6){bottom:0%;right:0%;animation-delay:.9s,1.3s; animation-duration:2.3s,6s}
.fireflies span:nth-child(7){bottom:0%;left:25%;animation-delay:.2s,.4s;  animation-duration:2.6s,7s}
.fireflies span:nth-child(8){top:0%;right:50%;animation-delay:1.0s,1.1s;animation-duration:2.4s,5s}
.fireflies span:nth-child(9){top:0%;left:50%;animation-delay:.7s,.2s;  animation-duration:2.7s,6s}
.fireflies span:nth-child(10){bottom:0%;right:25%;animation-delay:1.3s,.7s; animation-duration:2.8s,7s}
.fireflies span:nth-child(11){top:0%;left:75%;animation-delay:.5s,1.5s; animation-duration:2.1s,4s}
.fireflies span:nth-child(12){bottom:0%;right:75%;animation-delay:1.2s,.9s;  animation-duration:2.6s,6s}
.fireflies span:nth-child(13){top:25%;left:10%;animation-delay:.8s,1.4s; animation-duration:2.3s,7s}
.fireflies span:nth-child(14){top:25%;right:10%;animation-delay:1.5s,.3s; animation-duration:2.7s,5s}
.fireflies span:nth-child(15){top:25%;left:35%;animation-delay:.4s,1.7s; animation-duration:2.1s,8s}
.fireflies span:nth-child(16){top:25%;right:35%;animation-delay:1.8s,.6s; animation-duration:2.9s,6s}
.fireflies span:nth-child(17){top:25%;left:60%;animation-delay:.7s,1.1s; animation-duration:2.4s,7s}
.fireflies span:nth-child(18){top:25%;right:60%;animation-delay:1.3s,.8s; animation-duration:2.6s,5s}
/* Removed extra sparkle spans 19-30 for better performance */

@keyframes twinkle{
  0%,100%{ opacity:0; transform:scale(.7) }
  12%    { opacity:1; transform:scale(1.1) }
  40%    { opacity:.25 }
  65%    { opacity:.8 }
}
@keyframes drift{
  0%{ 
    transform:translate3d(0,0,0) scale(1);
    opacity:0.8;
  }
  25%{ 
    transform:translate3d(50px,-50px,0) scale(0.9);
    opacity:0.6;
  }
  50%{ 
    transform:translate3d(100px,-100px,0) scale(0.8);
    opacity:0.4;
  }
  75%{ 
    transform:translate3d(150px,-150px,0) scale(0.7);
    opacity:0.2;
  }
  100%{ 
    transform:translate3d(200px,-200px,0) scale(0.6);
    opacity:0;
  }
}

/* ===========================
   Kid Button Bar (bottom)
   =========================== */

.kidbar{
  position:fixed !important;
  left:0; right:0; bottom:0;
  z-index:80;
  padding:12px;
  display:flex; gap:12px; justify-content:center; flex-wrap:wrap;
  background:linear-gradient(180deg, #0000 0%, #0002 40%, #0006 100%);
}

/* Make kids menu non-sticky on subpages (not home page) */
body:not(.home-page) .kidbar {
  position: relative !important;
  bottom: auto !important;
  margin-top: 40px;
  background: linear-gradient(180deg, #0002 0%, #0006 100%);
}

.kidbar a{
  text-decoration:none !important;
  display:flex; align-items:center; justify-content:center; gap:10px;
  min-width:min(46%,240px);
  padding:14px 18px;
  border-radius:16px;
  font-weight:800;
  color:#111;
  background:rgba(255,255,255,.85);
  backdrop-filter:blur(10px);
  box-shadow:0 10px 24px #0003, inset 0 0 0 2px #fff8;
  transition:transform .12s ease, box-shadow .12s ease;
}
.kidbar a:hover{ transform:translateY(-2px); box-shadow:0 14px 28px #0005, inset 0 0 0 2px #fff }
.icon{ font-size:1.25rem }

/* ===========================
   Mobile Tweaks
   =========================== */

@media (max-width:480px){
  /* Show brand icon on mobile, hide text */
  .topnav .brand{ 
    display: flex !important; 
    align-items: center;
    height: 32px;
    line-height: 1;
  }
  
  .brand-text {
    display: none !important;
  }
  
  .brand-icon {
    width: 32px !important;
    height: 32px !important;
    margin-right: 0 !important;
    vertical-align: middle !important;
    display: inline-block !important;
  }
  
  .topnav{ 
    padding:8px 10px; 
    background:rgba(255,255,255,.75); 
    border-bottom: none !important;
    border: none !important;
  }
  
  /* Center parent links on mobile */
  .parent-links{ 
    margin-left:0 !important;
    justify-content:center !important;
    gap:6px; 
    flex-wrap:nowrap; 
    overflow-x:auto; 
    -webkit-overflow-scrolling:touch; 
  }
  .parent-links a{ 
    font-size:16px; 
    white-space:nowrap; 
    padding:6px 8px; 
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
  }
  .parent-links a:active,
  .parent-links a:visited {
    background: #ffffffcc !important;
    color: var(--ink) !important;
  }

  /* Mobile hero layout */
  .hero-content{
    position: absolute !important;
    top: 80px !important;
    left: 12px !important;
    right: 12px !important;
    padding: 0 !important;
    transform: none !important;
  }
  .headline-card{
    max-width:94vw; 
    padding:18px 20px; 
    border-radius:18px;
    background: linear-gradient(135deg, 
      rgba(255, 182, 193, 0.9) 0%,    /* Light pink */
      rgba(255, 218, 185, 0.9) 25%,   /* Peach */
      rgba(255, 255, 182, 0.9) 50%,   /* Light yellow */
      rgba(185, 255, 185, 0.9) 75%,   /* Light green */
      rgba(182, 185, 255, 0.9) 100%   /* Light purple */
    );
    margin:0 auto;
    box-shadow:0 12px 28px rgba(0,0,0,.20), inset 0 0 0 2px rgba(255,255,255,.50);
    animation:none !important;
  }
  .title{ 
    font-size: clamp(32px, 7vw, 48px) !important; 
    line-height:1.1; 
    text-shadow:0 2px 0 #ffffffcc;
    margin-bottom:8px;
  }
  .subtitle{ 
    font-size:16px; 
    margin-top:8px; 
    line-height:1.3;
  }
  
  /* Mobile: hide character animations completely */
  .vortex-characters{
    display: none !important;
  }
  
  /* Fix mobile button styling */
  .kidbar a{
    min-width:100% !important;
    border-radius:14px !important;
    font-size:16px !important;
    padding:14px 18px !important;
    background:rgba(255,255,255,.85) !important;
    backdrop-filter:blur(10px) !important;
    box-shadow:0 10px 24px #0003, inset 0 0 0 2px #fff8 !important;
    transition:transform .12s ease, box-shadow .12s ease !important;
  }
  .kidbar a:hover{
    transform:translateY(-2px) !important;
    box-shadow:0 14px 28px #0005, inset 0 0 0 2px #fff !important;
  }

  /* Slightly darker veil + bigger sparkles on phones */
  :root{ --sheen:.22; --spark-size:12px; --spark-glow:14px; }
  .fireflies span{ animation-duration:2.2s, 9s }

  /* Kid buttons: full width + safe area */
  .kidbar{ padding:10px 10px calc(10px + env(safe-area-inset-bottom)); gap:10px; }
  .kidbar a{ min-width:100%; border-radius:14px; font-size:16px; }
}

/* Tiny phones */
@media (max-width:360px){
  .title{ font-size:clamp(26px,9.5vw,36px) }
  .subtitle{ display:none }
}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
  .fireflies span{ animation: twinkle 3s ease-in-out infinite }
                }

/* Remove the line under the top menu - mobile only */
@media (max-width: 768px) {
  header, header nav, .navbar, .site-nav, .topnav, .topnav nav {
    border-bottom: 0 !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
  }

  /* No link underlines/indicators */
  header nav a, .topnav nav a { 
    text-decoration: none !important; 
  }
  header nav a::after, .topnav nav a::after { 
    content: none !important; 
  }

  /* If you're using a tabs-style indicator (common in frameworks) */
  .tabs .indicator { display: none !important; }
  
  /* Brand logo on mobile */
  .brand-icon {
    width: 40px !important;
    height: 40px !important;
  }
}