/* ============================================================
   SL SYSTEM — ARISE overlay + enhanced background + runic patterns
   ============================================================ */

/* ============ ARISE FULL-SCREEN DRAMATIC OVERLAY ============ */
.arise-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0, 246, 255, 0.04), rgba(2, 6, 17, 0.95));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.arise-overlay.go { opacity: 1; }
.arise-overlay.out { opacity: 0; }

/* White flash on impact */
.arise-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.95), rgba(0, 246, 255, 0.4) 30%, transparent 70%);
  opacity: 0;
}
.arise-overlay.go .arise-flash {
  animation: arise-flash 0.5s ease-out 0.1s forwards;
}
@keyframes arise-flash {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Runic ring expanding behind text */
.arise-runes {
  position: absolute;
  width: 380px; height: 380px;
  border: 2px solid rgba(0, 246, 255, 0.7);
  border-radius: 50%;
  box-shadow:
    0 0 0 4px rgba(0, 246, 255, 0.15),
    0 0 80px rgba(0, 246, 255, 0.6),
    inset 0 0 60px rgba(0, 246, 255, 0.4);
  transform: scale(0);
  opacity: 0;
}
.arise-runes::before, .arise-runes::after {
  content: '';
  position: absolute;
  inset: 30px;
  border: 1px dashed rgba(123, 45, 255, 0.6);
  border-radius: 50%;
  animation: arise-rune-spin 16s linear infinite;
}
.arise-runes::after {
  inset: 80px;
  border-color: rgba(0, 246, 255, 0.4);
  animation-direction: reverse;
  animation-duration: 12s;
}
.arise-overlay.go .arise-runes {
  animation: arise-rune-grow 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}
@keyframes arise-rune-grow {
  0%   { transform: scale(0) rotate(-90deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg);  opacity: 1; }
}
@keyframes arise-rune-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Big ARISE text */
.arise-text {
  font-family: 'Orbitron', monospace;
  font-size: clamp(72px, 18vw, 180px);
  font-weight: 900;
  letter-spacing: 0.18em;
  color: #fff;
  text-shadow:
    0 0 30px rgba(0, 246, 255, 1),
    0 0 60px rgba(0, 246, 255, 0.7),
    0 0 100px rgba(123, 45, 255, 0.6);
  position: relative;
  z-index: 2;
  transform: scale(0.4) translateY(40px);
  opacity: 0;
}
.arise-overlay.go .arise-text {
  animation: arise-text-pop 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards,
             arise-text-glitch 0.15s 1.7s 4;
}
@keyframes arise-text-pop {
  0%   { transform: scale(0.4) translateY(40px); opacity: 0; filter: blur(20px); }
  60%  { transform: scale(1.1) translateY(0);    opacity: 1; filter: blur(0); }
  100% { transform: scale(1) translateY(0);      opacity: 1; filter: blur(0); }
}
@keyframes arise-text-glitch {
  0%, 100% { text-shadow: 0 0 30px rgba(0, 246, 255, 1), 0 0 60px rgba(0, 246, 255, 0.7); }
  50%      { text-shadow: -4px 0 #ff3366, 4px 0 #00f6ff, 0 0 30px rgba(0, 246, 255, 1); }
}

.arise-sub {
  font-family: 'Orbitron', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: #ffd700;
  text-shadow: 0 0 14px rgba(255, 215, 0, 0.8);
  margin-top: 12px;
  z-index: 2;
  opacity: 0;
}
.arise-overlay.go .arise-sub {
  animation: arise-sub 0.8s 1.4s forwards;
}
@keyframes arise-sub {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============ ENHANCED BACKGROUND — Solo Leveling dungeon vibes ============ */

/* Animated runic grid drifting up — adds depth */
body::before {
  /* override the previous body::before — add runic SVG layer */
  background:
    radial-gradient(ellipse 60% 40% at 20% 0%, rgba(123, 45, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 50% 35% at 80% 100%, rgba(0, 246, 255, 0.12), transparent 60%),
    linear-gradient(180deg, #020611 0%, #050d1f 60%, #02060f 100%) !important;
}

/* Add slow-drifting hexagonal runic pattern as a separate layer */
body > .sl-bg-runes {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='139' viewBox='0 0 120 139'><g fill='none' stroke='%2300f6ff' stroke-width='1'><path d='M30 0 l30 17.32 v34.64 l-30 17.32 -30 -17.32 v-34.64z'/><path d='M90 69.28 l30 17.32 v34.64 l-30 17.32 -30 -17.32 v-34.64z'/><circle cx='30' cy='34.64' r='5'/><circle cx='90' cy='103.92' r='5'/></g></svg>");
  background-size: 120px 139px;
  animation: sl-bg-drift 80s linear infinite;
}
@keyframes sl-bg-drift {
  0%   { background-position: 0 0; }
  100% { background-position: 0 -139px; }
}

/* Subtle vignette */
body > .sl-vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 90% 70% at 50% 50%, transparent 40%, rgba(2, 6, 17, 0.7));
}

/* Center pulse (system core feel) */
body > .sl-pulse {
  position: fixed;
  top: 50%; left: 50%;
  width: 800px; height: 800px;
  margin: -400px 0 0 -400px;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(0, 246, 255, 0.05), transparent 70%);
  animation: sl-pulse 8s ease-in-out infinite;
}
@keyframes sl-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.1); opacity: 1; }
}

/* ============ HEX BORDER FRAME on container (subtle) ============ */
.container::before {
  content: '';
  position: fixed;
  top: 8px; left: 8px;
  width: 30px; height: 30px;
  border-top: 2px solid rgba(0, 246, 255, 0.45);
  border-left: 2px solid rgba(0, 246, 255, 0.45);
  pointer-events: none;
  z-index: 1000;
  filter: drop-shadow(0 0 4px rgba(0, 246, 255, 0.6));
}
.container::after {
  content: '';
  position: fixed;
  bottom: 80px; right: 8px;
  width: 30px; height: 30px;
  border-bottom: 2px solid rgba(123, 45, 255, 0.45);
  border-right: 2px solid rgba(123, 45, 255, 0.45);
  pointer-events: none;
  z-index: 1000;
  filter: drop-shadow(0 0 4px rgba(123, 45, 255, 0.6));
}

/* ============ Section labels with rune diamond ============ */
.section-label::after {
  content: '';
  display: inline-block;
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, var(--sl-cyan), transparent);
  margin-left: 14px;
  vertical-align: middle;
  box-shadow: 0 0 6px rgba(0, 246, 255, 0.4);
}

/* ============ Active workout — pulsing aura ============ */
#activeView::before {
  content: '';
  position: fixed;
  inset: -40px;
  background: radial-gradient(ellipse at top, rgba(0, 246, 255, 0.08), transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: sl-pulse-aura 4s ease-in-out infinite;
}
@keyframes sl-pulse-aura {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}
