/* ── VARIABLES ── */
:root {
  --bg: #07070f;
  --bg2: #0f0a18;
  --card: rgba(255,255,255,.05);
  --border: rgba(255,100,150,.18);
  --primary: #ff4d79;
  --glow: rgba(255,77,121,.45);
  --accent: #ffb3c6;
  --text: #f0e6ea;
  --muted: #7a6070;
  --online: #3ba55d;
  --idle: #faa61a;
  --dnd: #ed4245;
  --offline: #72767d;
  --streaming: #593695;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }
::selection { background: var(--primary); color: #fff; }

/* ── CANVAS LAYERS ── */
#bg-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
#sakura-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1; pointer-events: none;
}

/* ── NAV (hamburger-always layout) ── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  padding: .9rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(7,7,15,.75);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid rgba(255,100,150,.15);
  /* top edge highlight for glass look */
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 4px 24px rgba(0,0,0,.4);
}
.nav-logo {
  font-family: 'Orbitron', monospace;
  font-size: 1.4rem; font-weight: 900;
  color: var(--primary); text-decoration: none;
  letter-spacing: 6px;
  text-shadow: 0 0 20px var(--glow);
  position: relative; z-index: 1;
}

/* Hamburger — always visible (no media query) */
.hamburger {
  display: flex; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 6px; background: none; border: none;
  z-index: 1;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--primary); transition: .3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Dropdown menu — always a dropdown, all screen sizes */
.nav-links {
  display: none; flex-direction: column;
  position: fixed; top: 58px; right: 0;
  width: 230px;
  background: rgba(7,7,15,.92);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  padding: 1.2rem 1.5rem; gap: .9rem; list-style: none;
  border: 1px solid rgba(255,100,150,.2);
  border-right: none;
  border-radius: 0 0 0 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), -8px 16px 48px rgba(0,0,0,.5);
  max-height: calc(100vh - 58px); overflow-y: auto;
  z-index: 201;
}
.nav-links.open { display: flex; }
.nav-links a {
  color: var(--muted); text-decoration: none;
  font-size: .8rem; letter-spacing: 2px; text-transform: uppercase;
  transition: color .3s, text-shadow .3s, padding-left .3s;
  padding: .35rem 0;
  border-bottom: 1px solid rgba(255,100,150,.07);
  display: block;
}
.nav-links li:last-child a { border-bottom: none; }
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  text-shadow: 0 0 12px var(--glow);
  padding-left: .4rem;
}

/* ── MAIN ── */
main { position: relative; z-index: 10; padding-top: 70px; }

/* ── FOOTER ── */
footer {
  position: relative; z-index: 10;
  text-align: center; padding: 2rem 1rem;
  color: var(--muted); font-size: .78rem;
  border-top: 1px solid var(--border);
}
footer a { color: var(--primary); text-decoration: none; }

/* ── BUTTONS ── */
.btn {
  padding: .65rem 1.3rem; border-radius: 12px; border: none;
  cursor: pointer; font-family: 'Noto Sans JP', sans-serif;
  font-size: .88rem; font-weight: 700; letter-spacing: .5px;
  transition: all .3s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { box-shadow: 0 4px 24px var(--glow); transform: translateY(-2px); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-outline {
  background: transparent; border: 1px solid var(--border); color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: .4rem .9rem; font-size: .78rem; }

/* ── GLASS CARDS ── */
.card {
  position: relative; overflow: hidden;
  background: linear-gradient(
    140deg,
    rgba(255,255,255,.09) 0%,
    rgba(255,255,255,.04) 40%,
    rgba(255,255,255,.06) 100%
  );
  border: 1px solid rgba(255,100,150,.18);
  border-top: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.1),
    inset 0 -1px 0 rgba(0,0,0,.08),
    0 8px 32px rgba(0,0,0,.25);
  transition: border-color .3s, box-shadow .3s;
}
/* Fresnel highlight at top */
.card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    170deg,
    rgba(255,255,255,.1) 0%,
    rgba(255,255,255,.03) 35%,
    transparent 60%
  );
  pointer-events: none; border-radius: inherit; z-index: 0;
}
.card:hover {
  border-color: var(--primary);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 16px 48px var(--glow),
    0 0 0 1px rgba(255,77,121,.15);
}

/* ── SECTION TITLE ── */
.sec-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.3rem; color: var(--primary);
  letter-spacing: 5px; text-align: center;
  text-shadow: 0 0 18px var(--glow);
  margin-bottom: 2rem;
}

/* ── RESULT BOX ── */
.result-box {
  padding: 1.1rem; margin-top: 1rem;
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: 12px; font-size: .9rem; line-height: 1.8;
  min-height: 64px; color: var(--text); word-break: break-word;
  white-space: pre-wrap;
}

/* ── CHIP / TAG ── */
.chip {
  padding: .35rem .85rem; border-radius: 999px;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); font-size: .75rem; cursor: pointer;
  transition: all .3s; font-family: 'Noto Sans JP', sans-serif;
}
.chip:hover, .chip.active {
  border-color: var(--primary); color: var(--primary);
}

/* ── ANIMATIONS ── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59,165,93,.7); }
  50% { box-shadow: 0 0 0 7px rgba(59,165,93,0); }
}
@keyframes glitch-a {
  0%,88%,100% { opacity: 0; transform: none; }
  90% { opacity: .8; transform: translate(-4px,-1px) skewX(-8deg); }
  94% { opacity: .5; transform: translate(4px,1px) skewX(5deg); }
}
@keyframes glitch-b {
  0%,88%,100% { opacity: 0; transform: none; }
  90% { opacity: .5; transform: translate(4px,1px); }
  94% { opacity: .8; transform: translate(-4px,-1px); }
}

/* ── SCROLL REVEAL ── */
.fade { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.fade.in { opacity: 1; transform: none; }

/* ── LOADING SPINNER ── */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 1rem;
}

/* staggered fade delays */
.fade[data-delay="1"] { transition-delay: 80ms; }
.fade[data-delay="2"] { transition-delay: 160ms; }
.fade[data-delay="3"] { transition-delay: 240ms; }
.fade[data-delay="4"] { transition-delay: 320ms; }
.fade[data-delay="5"] { transition-delay: 400ms; }
.fade[data-delay="6"] { transition-delay: 480ms; }
.fade[data-delay="7"] { transition-delay: 560ms; }
