
/* global typography */
html, body{
  font-family: Arial, Helvetica, sans-serif;
}
button, input, textarea, select{
  font-family: inherit;
}

/* style.css (REPLACE YOUR WHOLE FILE) */

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family:"Times New Roman", Times, serif;
  color: var(--text);
  background:#000;
  overflow-x:hidden;
}

/* background image set by JS */
body.bg{
  background-position:center center;
  background-size:cover;
  background-repeat:no-repeat;
}

/* tiny dimmer at night only */
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:0;
  background: rgba(0,0,0,0.00);
}
body.dark::before{ background: rgba(0,0,0,0.10); }

/* theme vars */
:root{
  --text:#3f4349;

  --panel-bg: rgba(255,255,255,0.26);
  --panel-bg2: rgba(255,255,255,0.18);
  --panel-border: rgba(255,255,255,0.55);

  --btn-outline-day: rgba(130,200,255,0.95);
  --btn-outline-dark: rgba(255,255,255,0.10);
}

body.dark{
  --text:#ffffff;

  --panel-bg: rgba(0,0,0,0.40);
  --panel-bg2: rgba(0,0,0,0.26);
  --panel-border: rgba(255,255,255,0.18);
}

/* layout */
.shell{
  max-width:1300px;
  margin:48px auto 28px;
  padding:0 16px;
  display:grid;
  grid-template-columns:280px 1fr 280px;
  grid-template-rows:auto 1fr auto;
  gap:14px;
  position:relative;
  z-index:3;
}

/* glass panel */
.panel{
  border-radius:18px;
  padding:16px;
  border:1px solid var(--panel-border);
  background: linear-gradient(180deg, var(--panel-bg), var(--panel-bg2));
  backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.70),
    inset 0 -1px 0 rgba(0,0,0,0.20),
    0 18px 44px rgba(0,0,0,0.35);
}

/* header */
.header{
  grid-column:1 / 4;
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px;
}

/* faint day backing */
body:not(.dark) .header{
  background: linear-gradient(180deg, rgba(255,255,255,0.30), rgba(255,255,255,0.16));
}

.title-wrap{ flex:1; display:flex; justify-content:center; }

/* MORE solid block behind Loqi.tv (day mode readability) */
body:not(.dark) .title-wrap{
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius:14px;
  padding:10px 16px;
}

.title{ text-align:center; color:var(--text); line-height:1.0; }
.title strong{
  display:block;
  font-size:44px;
  font-weight:800;
  letter-spacing:0.02em;
}
/* (legacy) title uses .site-title now */

.title span{
  display:block;
  margin-top:6px;
  font-size:14px;
  opacity:0.95;
}

/* header icons */
.header-icons{ display:flex; gap:10px; margin-left:auto; }
.icon-btn{
  width:40px; height:40px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.55);
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.36));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.98),
    inset 0 -10px 14px rgba(0,0,0,0.14),
    0 8px 14px rgba(0,0,0,0.24);
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  overflow:hidden;
  transition: transform 120ms ease;
}
body.dark .icon-btn{
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(0,0,0,0.56));
  border-color: rgba(255,255,255,0.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.24),
    inset 0 -10px 14px rgba(0,0,0,0.56),
    0 10px 18px rgba(0,0,0,0.52);
}
.icon-btn img{ width:22px; height:22px; }

/* nav toggle */
.nav-toggle{
  width:46px; height:46px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.45);
  background: linear-gradient(180deg, rgba(255,255,255,0.60), rgba(0,0,0,0.14));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.90),
    inset 0 -12px 16px rgba(0,0,0,0.16),
    0 10px 16px rgba(0,0,0,0.26);
  cursor:pointer;
  position:relative;
  overflow:hidden;
  flex:0 0 auto;
  transition: transform 120ms ease;
  display:flex;
  align-items:center;
  justify-content:center;
}
body.dark .nav-toggle{
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(0,0,0,0.62));
  border-color: rgba(255,255,255,0.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -12px 16px rgba(0,0,0,0.58),
    0 12px 18px rgba(0,0,0,0.54);
}


/* hamburger icon (3 lines) */
.hamburger{
  width:22px;
  height:14px;
  display:block;
  position:relative;
  margin:0 auto;
}
.hamburger::before,
.hamburger::after{
  content:"";
  position:absolute;
  left:0;
  width:100%;
  height:2px;
  border-radius:2px;
  background: var(--text);
}
.hamburger::before{ top:0; box-shadow: 0 6px 0 var(--text); }
.hamburger::after{ bottom:0; }

/* hover scale */
.nav-toggle:hover,
.icon-btn:hover,
.navbtn:hover,
.pill-btn:hover{
  transform: scale(1.04);
}

/* pentagon home icon */
.home-pentagon{
  width:22px; height:22px;
  display:block;
  margin:0 auto;
  position:relative;
  top:0;
  background: var(--text);
  clip-path: polygon(50% 0%, 100% 35%, 85% 100%, 15% 100%, 0% 35%);
  border-radius:2px;
}
.home-pentagon::after{
  content:"";
  position:absolute;
  width:6px; height:9px;
  left:49%; bottom:0px;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.65);
}
body.dark .home-pentagon::after{ background: rgba(0,0,0,0.55); }
/* door block inside the pentagon */
.home-icon::after{
  left: 35%;            /* was 50% */
  transform: translateX(-50%);
  /* or: transform: translateX(-55%); */
}

/* nav */
.nav{ display:flex; flex-direction:column; }

/* nav buttons */
.navbtn{
  width:100%;
  margin:0 0 14px;
  padding:20px 20px;
  border-radius:18px;
  border:4px solid var(--btn-outline-day);
  color: var(--text);

  font-weight:900;
  letter-spacing:0.28em;
  font-size:19px;
  font-family:"Comic Sans MS","Comic Sans",cursive;

  text-align:center;             /* CENTERED TEXT */

  position:relative;
  overflow:hidden;
  cursor:pointer;

  /* DAY: mostly white, bevel does the shading */
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,0.96), rgba(255,255,255,0.72) 62%, rgba(255,255,255,0.56) 100%),
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.64));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.98),
    inset 0 -18px 22px rgba(0,0,0,0.08),

    inset 0 0 0 2px rgba(255,255,255,0.22),
    inset 0 0 0 3px rgba(0,0,0,0.06),
    inset 0 0 0 4px rgba(255,255,255,0.12),
    inset 0 0 0 5px rgba(0,0,0,0.05),
    inset 0 0 0 6px rgba(255,255,255,0.10),
    inset 0 0 0 7px rgba(0,0,0,0.04),

    0 14px 22px rgba(0,0,0,0.22);

  transition: transform 120ms ease;
}

/* glossy iPhone shine on day */
.navbtn::before{
  content:"";
  position:absolute;
  left:8px; right:8px;
  top:6px;
  height:46%;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.18), rgba(255,255,255,0.00));
  pointer-events:none;
}

/* NIGHT buttons */
body.dark .navbtn{
  border-color: var(--btn-outline-dark);
  color:#fff;

  background:
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0.54), rgba(0,0,0,0.66) 62%, rgba(255,255,255,0.18) 100%),
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(0,0,0,0.70));

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -18px 22px rgba(0,0,0,0.52),

    inset 0 0 0 2px rgba(255,255,255,0.10),
    inset 0 0 0 3px rgba(0,0,0,0.42),
    inset 0 0 0 4px rgba(255,255,255,0.08),
    inset 0 0 0 5px rgba(0,0,0,0.30),
    inset 0 0 0 6px rgba(255,255,255,0.06),
    inset 0 0 0 7px rgba(0,0,0,0.22),

    0 14px 22px rgba(0,0,0,0.45);
}

/* iPhone shine in DARK mode: TOP 1/4 ONLY */
body.dark .navbtn::before{
  top:6px;
  height:25%;
  opacity:0.95;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.55),
    rgba(255,255,255,0.16),
    rgba(255,255,255,0.00)
  );
}

.navbtn:active{ transform: translateY(1px); }

/* click flash */
.flash{ animation: flash 130ms ease-out; }
@keyframes flash{
  0%{ filter: brightness(1.0); }
  50%{ filter: brightness(1.35); }
  100%{ filter: brightness(1.0); }
}

/* content text */
.section-title{
  margin:0 0 8px;
  font-weight:900;
  letter-spacing:0.02em;
  color: var(--text);
  text-shadow: 0 1px 0 rgba(0,0,0,0.20);
}
.section-sub{
  margin:0 0 12px;
  color: var(--text);
  opacity:0.95;
  text-shadow: 0 1px 0 rgba(0,0,0,0.18);
}

/* video */
.video-box{
  border-radius:18px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.40);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    0 16px 26px rgba(0,0,0,0.28);
}
.video-box iframe{
  width:100%;
  aspect-ratio:16/9;
  border:0;
  display:block;
}

/* music */
.music{
  grid-column:1 / 4;
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:14px 16px;
}
.music-label{ font-weight:900; padding-top:6px; }
.music-box{
  flex:1;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.40);
  background: rgba(255,255,255,0.20);
  padding:10px 12px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.60),
    inset 0 -10px 16px rgba(0,0,0,0.18);
}
body.dark .music-box{
  background: rgba(0,0,0,0.26);
  border-color: rgba(255,255,255,0.16);
}
.music-note{ margin-top:8px; font-size:14px; opacity:0.95; }

/* fixed controls */
.fixed-controls{
  position:fixed;
  left:16px;
  bottom:16px;
  display:flex;
  gap:10px;
  z-index:999;
}
.pill-btn{
  width:44px; height:44px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.45);
  background: linear-gradient(180deg, rgba(255,255,255,0.60), rgba(0,0,0,0.12));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.90),
    inset 0 -12px 16px rgba(0,0,0,0.18),
    0 12px 18px rgba(0,0,0,0.34);
  cursor:pointer;
  position:relative;
  overflow:hidden;
  transition: transform 120ms ease;
}
body.dark .pill-btn{
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(0,0,0,0.62));
  border-color: rgba(255,255,255,0.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -12px 16px rgba(0,0,0,0.58),
    0 14px 22px rgba(0,0,0,0.60);
}

/* 4-bubble icon */
.bubble-icon-btn::before{
  content:"";
  position:absolute;
  width:22px;
  height:22px;
  left:50%;
  top:50%;
  transform: translate(-50%,-50%);
  background:
    radial-gradient(circle at 30% 35%, rgba(255,255,255,0.95) 0 30%, rgba(255,255,255,0.00) 34%),
    radial-gradient(circle at 65% 28%, rgba(255,255,255,0.92) 0 24%, rgba(255,255,255,0.00) 30%),
    radial-gradient(circle at 72% 68%, rgba(255,255,255,0.90) 0 28%, rgba(255,255,255,0.00) 34%),
    radial-gradient(circle at 38% 72%, rgba(255,255,255,0.90) 0 26%, rgba(255,255,255,0.00) 32%);
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.18));
  pointer-events:none;
}

/* sun / moon */
.mode-icon{
  width:22px; height:22px;
  display:block;
  margin:0 auto;
  border-radius:50%;
  position:relative;
}
body:not(.dark) .mode-icon{
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.95), rgba(255,220,120,0.95));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}
body.dark .mode-icon{
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.95), rgba(210,220,255,0.95));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}
body.dark .mode-icon::after{
  content:"";
  position:absolute;
  width:14px; height:14px;
  right:-1px; top:4px;
  background: rgba(0,0,0,0.48);
  border-radius:50%;
}

/* ripples */

.ripple{
  position:fixed;
  left:0; top:0;
  width: 10px;
  height: 10px;
  border-radius:50%;
  pointer-events:none;
  z-index:8;
  transform: translate(-50%,-50%) scale(0.10);
  opacity:0.60;

  border: 0.75px solid rgba(255,255,255,0.50);
  animation: rippleGrow 1350ms ease-out forwards;
}

.ripple.r2{ animation-delay: 180ms; opacity:0.42; }
.ripple.r3{ animation-delay: 360ms; opacity:0.30; }

@keyframes rippleGrow{
  from{ transform: translate(-50%,-50%) scale(0.12); }
  to{ transform: translate(-50%,-50%) scale(19); opacity:0; }
}


/* bubbles IN FRONT of UI */
#bubbleLayer{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:2000;
}
.bubble{
  position:absolute;
  pointer-events:auto;
  cursor:pointer;
  opacity:0.90;
  user-select:none;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.22));
  touch-action: manipulation; /* helps mobile taps */
}
.bubble.pop{ animation: pop 120ms ease-out forwards; }
@keyframes pop{ to{ transform: scale(1.25); opacity:0; } }

/* responsive */
@media (max-width:980px){
  .shell{
    grid-template-columns:1fr;
    grid-template-rows:auto auto auto auto;
    margin:18px auto;
    padding:0 10px;
  }
  .side{ display:none; }
  .music{ grid-column:1; }
  .title strong{ font-size:34px; }

  .navbtn{
    font-family:"Times New Roman", Times, serif;
    letter-spacing:0.14em;
    font-size:18px;
  }
}

/* nav overlay: fixed width (no stretching) */
@media (max-width:720px){
  .nav{
    position:fixed;
    left:12px;
    top:92px;
    width:300px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 120px);
    overflow:auto;
    transform: translateX(-120%);
    opacity:0;
    transition: transform 220ms ease, opacity 220ms ease;
    z-index:50;
  }
  .nav.open{ transform: translateX(0); opacity:1; }
}


/* force arial on mobile */

@media (max-width: 720px){
  html, body, button, input, textarea, select{
    font-family: Arial, Helvetica, sans-serif !important;
  }
}



/* day-mode thin white stroke on all text */
body:not(.dark), body:not(.dark) *{
  -webkit-text-stroke: 0.6px rgba(255,255,255,0.55);
}



/* header title link styling + reflection (day) */
.site-title{
  display:block;
  font-size:56px;
  font-weight:800;
  letter-spacing:0.02em;
  text-decoration:none;
  color: rgba(20,20,20,0.85);
  position:relative;
  -webkit-text-stroke: 1px rgba(255,255,255,0.70);
  text-shadow: 0 2px 12px rgba(255,255,255,0.18);
}
body.dark .site-title{
  color: rgba(255,255,255,0.85);
  -webkit-text-stroke: 1px rgba(255,255,255,0.20);
  text-shadow: 0 2px 14px rgba(0,0,0,0.55);
}
/* reflection only in day mode */
body:not(.dark) .site-title::after{
  content: attr(data-text);
  position:absolute;
  left:0;
  top: calc(100% + 6px);
  transform: scaleY(-1);
  opacity:0.28;
  color: inherit;
  -webkit-text-stroke: 1px rgba(255,255,255,0.35);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0));
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0));
}
body.dark .site-title::after{ content:none; }


/* mobile header fit */
@media (max-width: 520px){
  .header{
    flex-wrap:wrap;
    gap:10px;
  }

  /* slightly smaller left buttons so everything fits */
  .nav-toggle{
    width:42px;
    height:42px;
    border-radius:13px;
  }

  /* keep title from forcing overflow */
  .title-wrap{
    flex:1 1 auto;
    min-width:0;
    justify-content:center;
  }

  /* responsive title size (works for both .site-title and legacy <strong>) */
  .site-title{
    font-size: clamp(28px, 9vw, 40px);
  }
  .title strong{
    font-size: clamp(28px, 9vw, 40px);
  }

  /* move social icons to their own row and stack 2x2 */
  .header-icons{
    flex: 0 0 100%;
    margin: 10px auto 0;
    justify-content:center;
    flex-wrap:wrap;
    max-width: 190px; /* forces 2 per row with 40px buttons + gaps */
  }
}


/* === FINAL FIXES === */

/* 1) Social icons: on small desktop windows AND mobile, move under left buttons (not centered/squished) */
@media (max-width: 980px){
  .header{ flex-wrap: wrap; }
  .header-icons{
    flex: 0 0 100%;
    width: 100%;
    margin: 10px 0 0 0 !important;
    margin-left: 0 !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    max-width: none !important;
    gap: 10px;
  }
  .header-icons .icon-btn{ flex: 0 0 40px; }
}

/* 2) Desktop hamburger show/hide: make .nav-collapsed actually hide the left nav on wide screens */
@media (min-width: 981px){
  .shell.nav-collapsed{
    grid-template-columns: 0px 1fr 280px !important;
  }
  .shell.nav-collapsed #nav{
    width:0 !important;
    min-width:0 !important;
    padding:0 !important;
    border:0 !important;
    margin:0 !important;
    overflow:hidden !important;
    opacity:0 !important;
    pointer-events:none !important;
  }
  .shell.nav-collapsed #nav .navbtn{ display:none !important; }
}
/* STOP the day-mode audio gloss flicker */

/* 1) Don't apply the global text-stroke to native media controls */
body:not(.dark) audio,
body:not(.dark) audio *{
  -webkit-text-stroke: 0 !important;
}

/* 2) Kill backdrop-filter on the music strip (native controls + blur = flicker on desktop) */
.music.panel,
.music{
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* 3) Force the music box onto its own stable layer */
.music-box{
  isolation: isolate;
  contain: paint;
  transform: translateZ(0);
}
