@tailwind base;
@tailwind components;
@tailwind utilities;

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Cyrah AI â€” Futuristic UI Enhancements
   Glass morphism, neon accents, glow effects, smooth animations
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
/* â”€â”€ Cyber scanline overlay (additive) â”€â”€ */
.cyber-scanlines::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 255, 0, 0.02) 3px,
    rgba(0, 255, 0, 0.02) 4px
  );
}
/* â”€â”€ Floating hexagonal grid â”€â”€ */
@keyframes hexFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.03;
  }
  25% {
    transform: translateY(-20px) rotate(5deg);
    opacity: 0.05;
  }
  50% {
    transform: translateY(-10px) rotate(-3deg);
    opacity: 0.04;
  }
  75% {
    transform: translateY(-30px) rotate(2deg);
    opacity: 0.06;
  }
}
.hex-particle {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  animation: hexFloat 12s ease-in-out infinite;
}
/* â”€â”€ Glitch text effect â”€â”€ */
@keyframes glitch {
  0%,
  90%,
  100% {
    transform: translate(0);
  }
  91% {
    transform: translate(-2px, 1px);
  }
  92% {
    transform: translate(2px, -1px);
  }
  93% {
    transform: translate(-1px, 2px);
  }
  94% {
    transform: translate(1px, -2px);
  }
}
.glitch-text:hover {
  animation: glitch 0.3s ease;
}
/* â”€â”€ Neon pulse border â”€â”€ */
@keyframes neonBorderPulse {
  0%,
  100% {
    border-color: rgba(0, 255, 0, 0.3);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.1);
  }
  33% {
    border-color: rgba(34, 211, 238, 0.3);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.1);
  }
  66% {
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.1);
  }
}
.neon-pulse-border {
  animation: neonBorderPulse 4s ease-in-out infinite;
}
/* â”€â”€ Data stream effect â”€â”€ */
@keyframes dataStream {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}
.data-stream {
  position: fixed;
  width: 1px;
  height: 100px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(0, 255, 0, 0.1),
    transparent
  );
  animation: dataStream 3s linear infinite;
  pointer-events: none;
  z-index: 0;
}
/* â”€â”€ Particle burst on hover â”€â”€ */
@keyframes particleBurst {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}
.burst-hover {
  position: relative;
  overflow: hidden;
}
.burst-hover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(0, 255, 0, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.burst-hover:hover::after {
  opacity: 1;
  animation: particleBurst 0.6s ease-out;
}
/* â”€â”€ Matrix rain columns â”€â”€ */
.matrix-column {
  position: fixed;
  top: -100%;
  font-family: monospace;
  font-size: 10px;
  color: rgba(0, 255, 0, 0.04);
  writing-mode: vertical-rl;
  pointer-events: none;
  z-index: 0;
  animation: matrixFall 20s linear infinite;
}
@keyframes matrixFall {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100vh);
  }
}
/* â”€â”€ Pulse ring expanding â”€â”€ */
@keyframes expandRing {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}
.expand-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 255, 0, 0.2);
  border-radius: 50%;
  animation: expandRing 2s ease-out infinite;
}
/* â”€â”€ Aurora gradient background â”€â”€ */
@keyframes aurora {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.aurora-bg {
  background: linear-gradient(
    135deg,
    rgba(0, 255, 0, 0.02),
    rgba(34, 211, 238, 0.02),
    rgba(168, 85, 247, 0.02),
    rgba(0, 255, 0, 0.02)
  );
  background-size: 400% 400%;
  animation: aurora 15s ease infinite;
}
/* â”€â”€ Typing cursor blink â”€â”€ */
@keyframes blinkCursor {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
.typing-cursor::after {
  content: "â–Š";
  animation: blinkCursor 1s step-end infinite;
  color: rgba(0, 255, 0, 0.6);
}
/* â”€â”€ Holographic shimmer card â”€â”€ */
@keyframes holoShimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}
.holo-card {
  position: relative;
  overflow: hidden;
}
.holo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.03),
    transparent
  );
  background-size: 200% 100%;
  animation: holoShimmer 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
/* â”€â”€ Glass morphism base â”€â”€ */
.glass {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.glass-light {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.glass-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
/* â”€â”€ Neon glow accents â”€â”€ */
.neon-glow {
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.15),
    0 0 60px rgba(99, 102, 241, 0.05);
}
.neon-border {
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.1),
    inset 0 0 15px rgba(99, 102, 241, 0.03);
}
.neon-text {
  background: linear-gradient(135deg, #818cf8, #a78bfa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* â”€â”€ Scanline overlay â”€â”€ */
.scanlines::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  z-index: 9999;
}
/* â”€â”€ Animated gradient border â”€â”€ */
@keyframes borderGlow {
  0%,
  100% {
    border-color: rgba(99, 102, 241, 0.3);
  }
  33% {
    border-color: rgba(139, 92, 246, 0.3);
  }
  66% {
    border-color: rgba(168, 85, 247, 0.3);
  }
}
.animated-border {
  animation: borderGlow 4s ease-in-out infinite;
}
/* â”€â”€ Pulse ring â”€â”€ */
@keyframes pulseRing {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(99, 102, 241, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}
.pulse-ring {
  animation: pulseRing 2s infinite;
}
/* â”€â”€ Shimmer loading â”€â”€ */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}
.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.02) 25%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.02) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}
/* â”€â”€ Floating particles background â”€â”€ */
@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0);
    opacity: 0.3;
  }
  25% {
    transform: translateY(-30px) translateX(10px);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-15px) translateX(-10px);
    opacity: 0.4;
  }
  75% {
    transform: translateY(-40px) translateX(5px);
    opacity: 0.5;
  }
}
.particle-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(99, 102, 241, 0.3);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}
/* â”€â”€ Futuristic scrollbar â”€â”€ */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 4px;
  transition: background 0.3s;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}
/* â”€â”€ Hover glow effect for buttons â”€â”€ */
.btn-glow {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.btn-glow::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.1) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.btn-glow:hover::before {
  opacity: 1;
}
.btn-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}
/* â”€â”€ Typing indicator â”€â”€ */
@keyframes typingDot {
  0%,
  80%,
  100% {
    transform: scale(0.5);
    opacity: 0.3;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
.typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: rgba(99, 102, 241, 0.8);
  border-radius: 50%;
  animation: typingDot 1.4s ease-in-out infinite;
}
.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}
/* â”€â”€ Message entrance animations â”€â”€ */
@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.message-anim {
  animation: messageIn 0.3s ease-out forwards;
}
/* â”€â”€ Gradient background â”€â”€ */
.bg-futuristic {
  background: radial-gradient(
      ellipse at 20% 50%,
      rgba(99, 102, 241, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 50%,
      rgba(139, 92, 246, 0.06) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 50% 0%,
      rgba(168, 85, 247, 0.04) 0%,
      transparent 50%
    ),
    #000000;
}
/* â”€â”€ Cyber grid background â”€â”€ */
@keyframes gridMove {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(50px);
  }
}
.cyber-grid::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(
      rgba(99, 102, 241, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 10s linear infinite;
  pointer-events: none;
  z-index: 0;
}
/* â”€â”€ Focus glow input â”€â”€ */
.input-glow:focus {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.1),
    inset 0 0 10px rgba(99, 102, 241, 0.03);
  outline: none;
}
/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   GLOBAL PAGE LAYOUT â€” Consistent centering for all pages
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
/* Ensure body does NOT force content into a flex layout by default */
html,
body {
  max-width: 100vw;
  overflow-x: hidden;
  min-height: 100vh;
}
/* Main content wrapper â€” auto-margin centering for all pages */
.h-full.w-full.flex.overflow-hidden,
.h-full.w-full.flex.overflow-hidden.relative,
.h-full.w-full.flex.overflow-hidden.relative.z-10,
.h-full.w-full.flex.overflow-hidden[style*="z-index: 1"] {
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  flex: 1;
  align-items: stretch;
}
/* Auth pages (login/register) â€” two-column layout: ensure panels stretch full height */
.h-full.w-full.flex.overflow-hidden > .flex-1 {
  min-height: 100vh;
}
/* Auth right panel â€” ensure card is vertically centered in full viewport space */
.flex-1.flex.items-center.justify-center.p-6.relative.bg-transparent.overflow-y-auto {
  min-height: 100vh;
}
/* Auth card â€” larger on big screens */
/* Fix pages that use max-w auto margin centering */
[class*="max-w-"].mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}
/* Fix absolute-relative stacking â€” ensure content not behind canvas */
body > canvas:first-child {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 0 !important;
  pointer-events: none !important;
}
/* Containers that should be z-index above canvas */
body > .relative.z-10 {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
}
/* Center content pages that use the pattern: relative z-10 min-h-screen p-4 md:p-6
   These are pages like dream.html, gamehub.html that lack max-width/mx-auto */
body > .relative.z-10.min-h-screen {
  max-width: min(90vw, 1400px);
  margin: 0 auto;
  width: 100%;
}
/* Inline-style z-index containers (code editor page) â€” full width */
body > div[style*="z-index: 1"] {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  max-width: 100%;
  margin: 0;
}
/* Fix the neural-glow background div */
.neural-glow {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(99, 102, 241, 0.03) 0%,
    transparent 70%
  );
}
/* Sidebar layout â€” keep left panel fixed, right panel scrollable */
.grid-sidebar-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  width: 100%;
  min-height: 100vh;
}
/* Center login/register style side-by-side layouts */
.lg\\:flex.flex-1.relative.items-center.justify-center {
  min-width: 0;
}
/* =============================================
   DYNAMIC VIEWPORT-BASED SIZING
   Uses CSS variables set by responsive-sizing.js
   No hardcoded widths â€” adapts to user's screen
   ============================================= */
/* Default page max-width using CSS variable (set by JS) */
:root {
  --page-max-width: 1200px;
  --sidebar-width: 260px;
  --font-scale: 1;
  --card-padding: 16px;
  --auth-card-width: 420px;
  --content-max-width: 100%;
}
/* Pages with max-w-[520px] (voice, music, video, vision) â€” dynamic via CSS variable */
div[class*="max-w-[520px]"] {
  max-width: var(--page-max-width) !important;
}
/* Pages with max-w-[1024px] (admin) â€” dynamic via CSS variable */
div[class*="max-w-[1024px]"] {
  max-width: var(--page-max-width) !important;
}
/* Center content pages */
body > .relative.z-10.min-h-screen {
  max-width: var(--page-max-width);
  width: 100%;
  margin: 0 auto;
}
/* Auth card */
.max-w-md.glass-card {
  max-width: var(--auth-card-width) !important;
}
/* All min-h-screen containers */
.min-h-screen,
[class*="min-h-screen"] {
  width: 100%;
  max-width: var(--page-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--card-padding);
  padding-right: var(--card-padding);
  box-sizing: border-box;
}
/* Exempt min-h-screen inside SPA views â€” they should fill the view, not be constrained */
.spa-view .min-h-screen,
.spa-view [class*="min-h-screen"] {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}
/* Sidebar */
#sidebar {
  width: var(--sidebar-width);
}
/* Prevent horizontal scroll on all pages */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
  width: 100%;
}
/* Universal box-sizing fix */
*,
*::before,
*::after {
  box-sizing: border-box;
}
/* Media/content max-width safety */
img,
video,
canvas,
svg,
iframe,
pre,
table,
embed,
object {
  max-width: 100% !important;
  height: auto;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
}
/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   LAYOUT ALIGNMENT FIXES â€” Dynamic viewport-based centering
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
/* Universal body centering â€” uses CSS variables from JS */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}
/* Content containers use dynamic variable */
body
  > *:not(nav):not(header):not([role="navigation"]):not(.full-width):not(
    [class*="full-width"]
  ):not(.spa-view):not(#spa-dynamic-view) {
  width: 100%;
  max-width: var(--page-max-width);
  margin-left: auto;
  margin-right: auto;
}
/* spa-dynamic-view and its children should fill the viewport without max-width constraint */
#spa-dynamic-view {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  align-self: stretch;
  overflow-x: hidden;
}
/* spa-view containers: centered, no overflow */
.spa-view {
  width: 100%;
  max-width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow-x: hidden;
  box-sizing: border-box;
}
/* Ensure spa-view inner content centers and doesn't overflow */
.spa-view > * {
  max-width: var(--page-max-width, 1200px);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--card-padding, 16px);
  padding-right: var(--card-padding, 16px);
  box-sizing: border-box;
  overflow-x: hidden;
}
/* But allow full-width children inside spa-views */
.spa-view > .full-width,
.spa-view > [class*="full-width"] {
  max-width: 100% !important;
  padding-left: 0;
  padding-right: 0;
}
/* SPA chat view specifically */
#spa-chat-view {
  box-sizing: border-box;
}
#spa-chat-view .chat-container,
#spa-chat-view .chat-layout {
  max-width: var(--page-max-width, 1200px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
  width: 100%;
}
/* Full-width sections span entire viewport */
body > nav,
body > header,
body > [role="navigation"],
.full-width,
[class*="full-width"] {
  max-width: 100vw !important;
}
/* Auth containers centered full-width */
#auth-container,
.auth-container,
[class*="auth-container"],
body > div:first-child:has(#auth-container) {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
}
/* Responsive table containers */
.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
/* Gradient text utility (used in multiple pages) */
.text-gradient {
  background: linear-gradient(135deg, #818cf8, #a78bfa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* Cyber glow border (used in admin, layout pages) */
.cyber-border {
  border-color: rgba(0, 255, 0, 0.3);
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.1),
    inset 0 0 15px rgba(0, 255, 0, 0.03);
}
/* Animated gradient background (shared) */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.gradient-anim {
  background: linear-gradient(-45deg, #0a0a1a, #1a1a2e, #16213e, #0f3460);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}
/* Card glass lift effect */
.card-lift {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
/* Social page: avatar + name center alignment */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
/* Fix grid gaps in admin page */
.grid-cols-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.grid-cols-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
/* Stat card for dashboard pages */
.stat-card {
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
}
/* Tab buttons for admin, layout pages */
.tab-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: #a1a1aa;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tab-btn:hover {
  border-color: rgba(0, 255, 0, 0.3);
  color: #fff;
}
.tab-btn.active {
  background: rgba(0, 255, 0, 0.1);
  border-color: rgba(0, 255, 0, 0.3);
  color: #00ff00;
}
/* App buttons for index page */
.app-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.app-btn-primary {
  background: linear-gradient(135deg, #00ff00, #00cc00);
  color: #000;
  border: none;
}
.app-btn-primary:hover {
  box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
  transform: translateY(-2px);
}
.app-btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.app-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 255, 0, 0.4);
}
/* Holographic text effect (index page) */
.holographic-text {
  background: linear-gradient(135deg, #fff 0%, #a1a1aa 50%, #fff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: holographicShift 3s ease-in-out infinite;
}
@keyframes holographicShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
/* Neural glow for index page */
.neural-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 800px;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(0, 255, 0, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  animation: neuralPulse 4s ease-in-out infinite;
}
@keyframes neuralPulse {
  0%,
  100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
}
/* Fix absolute insets across all pages */
.inset-0 {
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
}
/* Ensure full-height layouts don't overflow */
.min-h-screen {
  min-height: 100vh;
}
/* Fix flex alignment for content panels */
.flex-1.overflow-y-auto {
  min-height: 0;
}
/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   LAYOUT FIXES â€” Fix misaligned/off-center content on all pages
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
/* Pages that have .relative.z-10 directly under body without max-width:
   dream.html, gamehub.html, etc. Add explicit centering */
.relative.z-10.min-h-screen.p-4.md\\:p-6,
body > .relative.z-10 {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
/* Canvas page: .app container needs centering */
.app {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
/* Code page: similar structure */
body > .flex.items-start.justify-center.min-h-screen {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
/* Profile page may need centering */
.profile-content {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}
/* Social page feed */
.feed-container {
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}
/* Ensure floating backdrops (neural-glow, etc) always center */
.neural-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}
/* History page: centered feed */
.timeline-container {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}
/* Tasks page */
.tasks-container {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}
/* CMS page */
.cms-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
/* Editor page */
.editor-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}
/* Fix avatar page avatar display */
.avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
/* Ensure the Three.js canvas for particles doesn't overflow */
canvas#particlesCanvas,
canvas#bg-canvas,
canvas#bgCanvas {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 0 !important;
  pointer-events: none !important;
}
/* Center the login form card */
.glass-card.glass.p-8.rounded-3xl {
  max-width: 440px;
  margin: 0 auto;
}
