/* ═══════════════════════════════════════════
   NOISE — Philosophy Hub
   ═══════════════════════════════════════════ */

:root {
  --red: #ef4444;
  --red-soft: rgba(239,68,68,.6);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
}

a { color: inherit; text-decoration: none; }

/* ── particle canvas ── */
#particleCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── header ── */
.header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1.5rem;
  border-bottom: 1px solid rgba(239,68,68,.15);
  background: rgba(8,6,13,.85);
}

.back-btn {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(239,68,68,.2);
  border-radius: 50%;
  background: rgba(239,68,68,.05);
  transition: background .2s, border-color .2s, transform .15s;
}
.back-btn:hover {
  background: rgba(239,68,68,.12);
  border-color: var(--red);
}
.back-btn:active { transform: scale(.92); }

.logo {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--gold);
  letter-spacing: .1em;
}

.audio-btn {
  background: none;
  border: 1px solid rgba(239,68,68,.2);
  border-radius: 50%;
  color: var(--red);
  font-size: 1.1rem;
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.audio-btn:hover { background: rgba(239,68,68,.12); }
.audio-btn:active { transform: scale(.92); }
.audio-btn.active {
  background: rgba(239,68,68,.2);
  border-color: var(--red);
}

/* ═══════════════════════════════════════════
   HERO — Glitch
   ═══════════════════════════════════════════ */
.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.5rem, 4vh, 3rem) 1.25rem clamp(.5rem, 1.5vh, 1rem);
  position: relative;
  z-index: 1;
}

.glitch {
  font-family: 'Righteous', cursive;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 400;
  color: var(--red);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 0 0 .3rem;
  position: relative;
  animation: glitch 2s infinite;
}

@keyframes glitch {
  0%, 100% { text-shadow: 2px 0 #ff00ff, -2px 0 #00ffff; }
  20% { text-shadow: -2px 2px #ff00ff, 2px -2px #00ffff; }
  40% { text-shadow: 2px -2px #ff00ff, -2px 2px #00ffff; }
  60% { text-shadow: -2px 0 #ff00ff, 2px 0 #00ffff; }
  80% { text-shadow: 2px 2px #ff00ff, -2px -2px #00ffff; }
}

.hero__sub {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--dim);
  margin-top: 0;
}

/* ═══════════════════════════════════════════
   MENU GRID — Cards with unique hovers
   ═══════════════════════════════════════════ */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  position: relative;
  z-index: 1;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  padding: 1.2rem .8rem;
  border-radius: 14px;
  background: rgba(239,68,68,.04);
  border: 1px solid rgba(239,68,68,.15);
  transition: all .3s cubic-bezier(.22,.8,.25,1);
  overflow: hidden;
}
.card:active { transform: scale(.96) !important; }

.card__ico {
  font-size: 2.2rem;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.card__name {
  font-family: var(--font-display);
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--red);
  text-align: center;
  position: relative;
  z-index: 1;
}

/* ── Card: vibrate ── */
.card--vibrate:hover {
  animation: vibrate .2s infinite;
  background: rgba(239,68,68,.15);
  box-shadow: 0 0 20px rgba(239,68,68,.3);
}
@keyframes vibrate {
  0% { transform: translate(1px,1px) rotate(1deg); }
  25% { transform: translate(-1px,1px) rotate(-1deg); }
  50% { transform: translate(1px,-1px) rotate(1deg); }
  75% { transform: translate(-1px,-1px) rotate(-1deg); }
  100% { transform: translate(0,0) rotate(0deg); }
}

/* ── Card: pulse ── */
.card--pulse:hover {
  animation: pulseGlow 1s infinite;
  background: rgba(239,68,68,.2);
  color: #fff;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(239,68,68,.3); transform: translateY(0); }
  50% { box-shadow: 0 0 24px rgba(239,68,68,.5); transform: translateY(-3px); }
}

/* ── Card: float ── */
.card--float:hover {
  animation: floaty 1.1s ease-in-out infinite;
  background: linear-gradient(135deg, rgba(239,68,68,.15), rgba(244,114,182,.15));
  box-shadow: 0 10px 28px -12px rgba(239,68,68,.3);
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.02); }
}

/* ── Card: settle ── */
.card--settle:hover {
  animation: settle .7s ease-in-out;
  background: linear-gradient(160deg, rgba(251,191,36,.1), rgba(239,68,68,.08));
  box-shadow: 0 12px 24px -14px rgba(251,191,36,.3);
}
@keyframes settle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

/* ── Card: paper ── */
.card--paper:hover {
  background: linear-gradient(135deg, rgba(248,113,113,.12), rgba(244,114,182,.1));
  box-shadow: 0 12px 26px -10px rgba(239,68,68,.25);
  transform: rotate(-2deg) translateY(-4px) scale(1.03);
}

/* ── Card: void ── */
.card--void:hover {
  background: linear-gradient(150deg, rgba(29,26,47,.6), rgba(15,13,26,.8));
  color: #e5dfff;
  border-color: rgba(157,148,212,.3);
  box-shadow: 0 14px 30px -12px rgba(126,116,187,.3);
  transform: translateY(-5px) scale(1.04);
}
.card--void:hover .card__name { color: #e5dfff; }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: .6rem 1rem;
  position: relative;
  z-index: 1;
}
.footer__divider {
  width: 60px; height: 2px; margin: 0 auto .5rem;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 1px;
  opacity: .5;
}
.footer__text {
  font-family: var(--font-display);
  font-size: .8rem;
  color: var(--gold);
  letter-spacing: .1em;
  min-height: 1.2em;
}
.footer__credit {
  font-family: var(--font-mono);
  font-size: .65rem;
  font-weight: 700;
  color: var(--dim);
  letter-spacing: .15em;
  margin-top: .3rem;
  opacity: .8;
}

/* ═══════════════════════════════════════════
   TABBAR
   ═══════════════════════════════════════════ */
.tabbar {
  position: fixed; bottom: 0; left: 0; width: 100%;
  display: none;
  justify-content: space-around;
  background: rgba(4,14,26,.95);
  border-top: 1px solid rgba(239,68,68,.2);
  box-shadow: 0 -6px 24px -16px rgba(0,0,0,.8);
  z-index: 1000;
  padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
}
.tabbar__indicator {
  position: absolute; bottom: 0; left: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 10px rgba(239,68,68,.4);
  transition: transform .4s cubic-bezier(.22,.8,.25,1), width .3s;
  pointer-events: none;
}
.tabbar__item {
  flex: 1; text-align: center;
  padding: .5rem .3rem .4rem;
  border-radius: 10px;
  transition: background .3s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.tabbar__item:active { transform: translateY(1px); }
.tabbar__ico { font-size: 1.15rem; display: block; }
.tabbar__label {
  font-family: var(--font-display);
  font-size: .6rem; letter-spacing: .08em;
  color: var(--dim);
  display: block; margin-top: 2px;
  transition: color .3s;
}
.tabbar__item.active { background: rgba(239,68,68,.1); }
.tabbar__item.active .tabbar__label { color: var(--gold); }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 600px) {
  .tabbar { display: flex; }
  body { padding-bottom: 0; }
  .header { padding: .6rem 1rem; }
  .hero { padding: 1.2rem 1rem .5rem; }
  .menu-grid { gap: .8rem; }
  .card__ico { font-size: 1.8rem; }
}
@media (min-width: 901px) {
  .tabbar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
