:root {
  --bg: #07040f;
  --ink: #f5f3ff;
  --muted: #c4b5fd;
  --accent: #a855f7;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
}
body {
  min-height: 100vh;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}
input, textarea, select {
  -webkit-user-select: text;
  user-select: text;
}
#bakim-canvas {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
}
.bakim-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(88, 28, 135, 0.28), transparent 58%),
    linear-gradient(180deg, #0c0a16 0%, #07040f 100%);
}
.bakim-grid {
  position: absolute;
  inset: -18%;
  z-index: 0;
  background-image:
    linear-gradient(rgba(168, 85, 247, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  transform: perspective(640px) rotateX(60deg) translateY(-8%);
  mask-image: radial-gradient(ellipse at 50% 36%, #000 24%, transparent 76%);
  animation: bakim-grid 22s linear infinite;
}
.bakim-nebula {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(64px);
  animation: nebula-pulse 5.2s ease-in-out infinite;
}
.bakim-nebula-a {
  width: 42vw;
  height: 42vw;
  left: 8%;
  top: 10%;
  background: rgba(168, 85, 247, 0.22);
}
.bakim-nebula-b {
  width: 34vw;
  height: 34vw;
  right: 6%;
  bottom: 6%;
  background: rgba(76, 29, 149, 0.28);
  animation-delay: -2.4s;
}

.bakim-wrap {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.bakim-card {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 480px;
  padding: 36px 32px;
  text-align: center;
  border-radius: 20px;
  -webkit-user-select: none;
  user-select: none;
  background: rgba(12, 10, 22, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.25);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.6),
    0 0 30px -10px rgba(168, 85, 247, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.bakim-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.35rem;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #ddd6fe;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.22);
}
.bakim-ping {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80, 0 0 14px rgba(168, 85, 247, 0.85);
  animation: ping-blink 1.35s ease-in-out infinite;
}

.bakim-icon-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 1.15rem;
}
.bakim-icon-aura {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.42) 0%, transparent 70%);
  animation: icon-pulse 2.5s ease-in-out infinite;
}
.bakim-icon {
  position: relative;
  z-index: 1;
  width: 76px;
  height: 76px;
  display: block;
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.55));
}

.bakim-card h1 {
  font-family: Syne, sans-serif;
  font-size: clamp(1.55rem, 4.2vw, 1.95rem);
  font-weight: 800;
  margin: 0 0 0.7rem;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #ffffff 0%, #e9d5ff 48%, #a855f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bakim-lead {
  margin: 0 0 0.55rem;
  color: rgba(221, 214, 254, 0.88);
  line-height: 1.6;
  font-size: 0.95rem;
}
.bakim-reason {
  margin: 0 0 0.35rem;
  color: #c4b5fd;
  line-height: 1.5;
  font-size: 0.86rem;
}
.bakim-reason:empty { display: none; }
.bakim-eta {
  margin: 0 0 0.15rem;
  color: #a78bfa;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.bakim-eta[hidden] { display: none !important; }

.bakim-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.9rem 0 1rem;
}
.bakim-countdown[hidden] { display: none !important; }
.bakim-cd-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  padding: 0.4rem 0.3rem;
  border-radius: 10px;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.28);
}
.bakim-cd-num {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: #f5f3ff;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.65);
  font-variant-numeric: tabular-nums;
}
.bakim-cd-lbl {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: #a78bfa;
  text-transform: uppercase;
  margin-top: 0.1rem;
}
.bakim-cd-sep {
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(168, 85, 247, 0.55);
  transform: translateY(-6px);
}

.bakim-progress { margin: 0 0 1rem; text-align: left; }
.bakim-progress[hidden] { display: none !important; }
.bakim-progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #c4b5fd;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}
.bakim-progress-head span:last-child {
  color: #e9d5ff;
  font-weight: 700;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}
.bakim-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.12);
  overflow: hidden;
  border: 1px solid rgba(168, 85, 247, 0.2);
}
.bakim-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #a855f7, #e9d5ff);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mini-terminal {
  margin: 0.85rem 0 1rem;
  background: rgba(5, 4, 10, 0.7);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 10px;
  padding: 12px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  text-align: left;
  box-shadow: inset 0 0 18px rgba(88, 28, 135, 0.18);
}
.mini-terminal-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.65rem;
  color: #c4b5fd;
  letter-spacing: 0.04em;
  font-size: 11px;
  font-weight: 600;
}
.mini-terminal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80, 0 0 12px rgba(168, 85, 247, 0.7);
  animation: ping-blink 1.35s ease-in-out infinite;
}
.mini-terminal-body {
  min-height: 5.8em;
  max-height: 6.6em;
  overflow: hidden;
}
.term-line {
  margin: 0 0 0.42em;
  color: #ddd6fe;
  line-height: 1.45;
  word-break: break-word;
}
.term-tag { font-weight: 600; }
.term-ok { color: #4ade80; }
.term-run { color: #c084fc; }
.term-wait { color: #a78bfa; opacity: 0.75; }
.term-cursor {
  display: inline-block;
  margin-left: 1px;
  color: #e9d5ff;
  animation: term-blink 0.9s steps(1) infinite;
}

.bakim-laser {
  position: relative;
  height: 2px;
  width: 100%;
  margin: 1.15rem 0 1.35rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.14);
}
.bakim-laser span {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 38%;
  background: linear-gradient(90deg, transparent, #7c3aed, #e9d5ff, #a855f7, transparent);
  box-shadow: 0 0 10px #a855f7;
  animation: laser-scan 1.7s linear infinite;
}

.bakim-social-row {
  display: flex;
  gap: 0.6rem;
}
.bakim-discord, .bakim-kick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: #ddd6fe;
  background: rgba(12, 10, 22, 0.55);
  border: 1px solid rgba(168, 85, 247, 0.28);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.bakim-discord svg, .bakim-kick svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.bakim-discord:hover {
  color: #fff;
  background: rgba(168, 85, 247, 0.16);
  border-color: rgba(168, 85, 247, 0.7);
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.35);
}
.bakim-kick[hidden] { display: none !important; }
.bakim-kick {
  color: #dffce4;
  border-color: rgba(83, 252, 24, 0.28);
}
.bakim-kick:hover {
  color: #fff;
  background: rgba(83, 252, 24, 0.14);
  border-color: rgba(83, 252, 24, 0.65);
  box-shadow: 0 0 24px rgba(83, 252, 24, 0.3);
}
.bakim-admin-link {
  display: inline-block;
  margin-top: 1rem;
  color: rgba(196, 181, 253, 0.55);
  font-size: 0.74rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}
.bakim-admin-link:hover { color: #e9d5ff; }

@keyframes bakim-grid {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 88px, 88px 0; }
}
@keyframes nebula-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.06); }
}
@keyframes ping-blink {
  0%, 100% { opacity: 0.45; box-shadow: 0 0 6px #4ade80, 0 0 10px rgba(168, 85, 247, 0.4); }
  50% { opacity: 1; box-shadow: 0 0 10px #4ade80, 0 0 16px rgba(168, 85, 247, 0.9); }
}
@keyframes icon-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes laser-scan {
  from { transform: translateX(-110%); }
  to { transform: translateX(320%); }
}
@keyframes term-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bakim-grid, .bakim-nebula, .bakim-ping, .bakim-icon-aura, .bakim-laser span, .mini-terminal-dot, .term-cursor {
    animation: none;
  }
  .bakim-laser span { width: 100%; transform: none; }
}
