/* GhostHunter CMS - Option 1: Dark Glassmorphism + Light Mode */

/* Theme variables are set via body class (gh-dark / gh-light) */
body{ background: transparent; }

body.gh-dark{
  --gh-bg: #020617;
  --gh-text: rgba(229,231,235,0.96);
  --gh-muted: rgba(226,232,240,0.72);
  --gh-border: rgba(148,163,184,0.22);
  --gh-glass-opacity: var(--glass-opacity, 0.14);
  --gh-glass: rgba(15,23,42,var(--gh-glass-opacity));
  --gh-glass-strong: rgba(15,23,42, calc(var(--gh-glass-opacity) + 0.10));
}

body.gh-light{
  --gh-bg: #f8fafc;
  --gh-text: rgba(2,6,23,0.92);
  --gh-muted: rgba(2,6,23,0.66);
  --gh-border: rgba(2,6,23,0.12);
  --gh-glass-opacity: var(--glass-opacity, 0.20);
  --gh-glass: rgba(255,255,255,var(--gh-glass-opacity));
  --gh-glass-strong: rgba(255,255,255, calc(var(--gh-glass-opacity) + 0.10));
}

/* ===== ANIMATED GLASSMORPHISM BACKGROUND ===== */
.animated-bg-container {
  position: fixed;
  inset: 0;
  z-index: -10;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #1a0f3a 0%, #2a1a5a 20%, #3a2a7a 40%, #2a3a6a 60%, #1a2a5a 80%, #0a0a2a 100%);
  overflow: hidden;
}

.bg-gradient-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  mix-blend-mode: screen;
}

.sphere-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(100, 200, 255, 1) 0%, rgba(59, 130, 246, 0.8) 25%, rgba(59, 130, 246, 0.4) 40%, rgba(59, 130, 246, 0.1) 60%, transparent 85%);
  top: -10%;
  left: 10%;
  animation: float-sphere 15s ease-in-out infinite;
  filter: blur(40px);
  box-shadow: 0 0 150px rgba(100, 200, 255, 0.8), 0 0 250px rgba(59, 130, 246, 0.6), 0 0 350px rgba(59, 130, 246, 0.3);
}

.sphere-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(220, 100, 255, 0.9) 0%, rgba(168, 85, 247, 0.8) 25%, rgba(168, 85, 247, 0.4) 40%, rgba(168, 85, 247, 0.1) 60%, transparent 85%);
  top: 40%;
  right: 5%;
  animation: float-sphere 18s ease-in-out infinite 2s;
  filter: blur(40px);
  box-shadow: 0 0 150px rgba(220, 100, 255, 0.8), 0 0 250px rgba(168, 85, 247, 0.6), 0 0 350px rgba(168, 85, 247, 0.3);
}

.sphere-3 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(100, 255, 150, 0.85) 0%, rgba(34, 197, 94, 0.7) 25%, rgba(34, 197, 94, 0.4) 40%, rgba(34, 197, 94, 0.1) 60%, transparent 85%);
  bottom: -15%;
  left: 50%;
  transform: translateX(-50%);
  animation: float-sphere 20s ease-in-out infinite 4s;
  filter: blur(40px);
  box-shadow: 0 0 160px rgba(100, 255, 150, 0.8), 0 0 260px rgba(34, 197, 94, 0.6), 0 0 360px rgba(34, 197, 94, 0.3);
}

@keyframes float-sphere {
  0%, 100% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(30px, -40px);
  }
  66% {
    transform: translate(-20px, 30px);
  }
}

/* Noise grain for realism */
.bg-grain {
  position: absolute;
  inset: 0;
  background-image: 
    url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' seed='2' /%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  opacity: 0.7;
  animation: grain-shift 8s linear infinite;
  mix-blend-mode: overlay;
}

@keyframes grain-shift {
  0% { background-position: 0 0; }
  100% { background-position: 40px 60px; }
}

/* Soft dark overlay to mute brightness */
.bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Fullscreen background media */
.gh-bg-media{ position: fixed; inset: 0; z-index: -5; overflow: hidden; }
.gh-bg-media video{ width: 100%; height: 100%; object-fit: cover; }
.gh-bg-image{ width: 100%; height: 100%; background-size: cover; background-position: center; }
.gh-bg-overlay{ position: fixed; inset:0; z-index: -4; background: rgba(0,0,0,var(--bg-darkness,0.35)); }
body.gh-light .gh-bg-overlay{ background: rgba(255,255,255, calc(var(--bg-darkness,0.18) * 0.8)); }

/* Glass containers */
.card, .glass, .navbar, .nav, .sidebar, .panel{
  background: var(--gh-glass);
  border: 1px solid var(--gh-border);
  backdrop-filter: blur(var(--bg-blur, 10px));
  -webkit-backdrop-filter: blur(var(--bg-blur, 10px));
}

.card{ box-shadow: 0 18px 60px rgba(0,0,0,0.45); }
body.gh-light .card{ box-shadow: 0 18px 60px rgba(0,0,0,0.16); }

h1,h2,h3,h4{ color: var(--gh-text); }
p, .desc, .hint{ color: var(--gh-muted); }

/* Glossy buttons */
.btn-primary, .cta-button{
  position: relative;
  overflow: hidden;
}
.btn-primary::before, .cta-button::before{
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 120%;
  transform: rotate(12deg);
  background: linear-gradient(90deg, rgba(255,255,255,0.00), rgba(255,255,255,0.20), rgba(255,255,255,0.00));
  pointer-events: none;
}
.btn-primary:hover::before, .cta-button:hover::before{ animation: gh-sheen 900ms ease; }
@keyframes gh-sheen{ from{ transform: translateX(-30%) rotate(12deg); } to{ transform: translateX(40%) rotate(12deg); } }

/* Tabs / menu items */
.navbar a, .nav a, .menu a{
  border-radius: var(--nav-radius, 10px);
  padding: var(--nav-padding-y, 12px) var(--nav-padding-x, 24px);
  font-size: var(--nav-font-size, 16px);
}

/* ===== ADVANCED GLASSMORPHISM ENHANCEMENTS ===== */

/* Glass effect with strong backdrop blur for all glass elements */
.glass, .card, .glass-panel, .navbar, .nav, .sidebar, .panel {
  position: relative;
  background: var(--gh-glass);
  border: 2px solid var(--gh-border);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border-radius: 12px;
  box-shadow: 
    0 0 35px rgba(59, 130, 246, 0.25),
    0 8px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -2px 10px rgba(59, 130, 246, 0.1);
}

/* Subtle reflection effect on glass elements */
.glass::before, .card::before, .glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 50%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
  border-radius: 12px;
  z-index: 1;
}

/* Premium shadow for depth */
.glass, .card, .glass-panel {
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.25),
    0 16px 48px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* Smooth transitions for interactive elements */
.glass, .card, .glass-panel, .btn-primary, .cta-button {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Hover effects with enhanced glow */
.glass:hover, .card:hover, .glass-panel:hover {
  background: var(--gh-glass-strong);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.25),
    0 16px 48px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(59, 130, 246, 0.35),
    inset 0 2px 10px rgba(59, 130, 246, 0.2);
  border-color: rgba(148, 163, 184, 0.5);
}

/* Light mode adjustments */
body.gh-light .glass, body.gh-light .card, body.gh-light .glass-panel {
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.gh-light .glass:hover, body.gh-light .card:hover, body.gh-light .glass-panel:hover {
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.12),
    0 0 40px rgba(59, 130, 246, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ===== CMS: Multi CTA buttons ===== */
.cta-buttons{display:flex;gap:12px;flex-wrap:wrap;margin-top:14px;}
.cta-button.cta-secondary{background:rgba(99,102,241,0.18);border:1px solid rgba(99,102,241,0.55);color:inherit;}
.cta-button.cta-ghost{background:transparent;border:1px solid rgba(148,163,184,0.55);color:inherit;}
.feature-link{display:inline-block;margin-top:10px;font-weight:600;text-decoration:none;border-bottom:1px solid rgba(148,163,184,0.55);padding-bottom:2px;}
.brand-logo-link{display:block;line-height:0;}
.brand-emoji{font-size:22px;display:block;}

/* ===== BRAND LOGO IMAGE STYLING ===== */
.brand-logo-img {
    border-radius: 8px;
    transition: all 0.3s ease;
    filter: brightness(1.1) contrast(1.05);
}
.brand-logo:hover .brand-logo-img {
    filter: brightness(1.2) contrast(1.1) saturate(1.1);
    transform: scale(1.05);
}

/* Small responsive improvements and theme toggle button */
.gh-theme-toggle {
  position:fixed;right:16px;top:16px;z-index:1200;padding:8px 10px;border-radius:999px;border:1px solid rgba(148,163,184,0.2);background:rgba(15,23,42,0.6);color:#e5e7eb;cursor:pointer;font-size:0.9rem;
}

@media(max-width:900px){
  .hero-title h1{font-size:1.4rem}
  .hero-title p{font-size:0.95rem}
}

/* ===== CYBERSECURITY DATA FLOW ANIMATION ===== */
.cyber-security-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -5;
  opacity: 0.4;
  pointer-events: none;
  mix-blend-mode: screen;
}

.cyber-network {
  width: 100%;
  height: 100%;
  filter: blur(0.5px);
}

@keyframes node-pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

@keyframes node-pulse-2 {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

@keyframes node-pulse-3 {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

@keyframes node-pulse-center {
  0%, 100% { stroke-width: 2px; }
  50% { stroke-width: 3px; }
}

@keyframes shield-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes data-flow-1 {
  0% { stroke-dashoffset: 1000; }
  100% { stroke-dashoffset: 0; }
}

@keyframes data-flow-2 {
  0% { stroke-dashoffset: 1000; }
  100% { stroke-dashoffset: 0; }
}

@keyframes data-flow-3 {
  0% { stroke-dashoffset: 1000; }
  100% { stroke-dashoffset: 0; }
}

@keyframes packet-move-1 {
  0% { cx: 150; cy: 150; }
  50% { cx: 300; cy: 200; }
  100% { cx: 450; cy: 250; }
}

@keyframes packet-move-2 {
  0% { cx: 450; cy: 250; }
  50% { cx: 600; cy: 200; }
  100% { cx: 750; cy: 150; }
}

@keyframes packet-move-3 {
  0% { cx: 750; cy: 150; }
  50% { cx: 900; cy: 225; }
  100% { cx: 1050; cy: 300; }
}

.node-pulse { animation: node-pulse 3s ease-in-out infinite; }
.node-pulse-2 { animation: node-pulse-2 3.5s ease-in-out infinite 0.5s; }
.node-pulse-3 { animation: node-pulse-3 4s ease-in-out infinite 1s; }
.node-pulse-center { animation: node-pulse-center 2.5s ease-in-out infinite; }

.shield-pulse { animation: shield-pulse 2s ease-in-out infinite; }

.data-pulse { animation: data-flow-1 4s linear infinite; stroke-dasharray: 1000; }
.data-pulse-2 { animation: data-flow-2 4.5s linear infinite 0.3s; stroke-dasharray: 1000; }
.data-pulse-3 { animation: data-flow-3 5s linear infinite 0.6s; stroke-dasharray: 1000; }

.packet-1 { animation: packet-move-1 6s linear infinite; }
.packet-2 { animation: packet-move-2 6s linear infinite 2s; }
.packet-3 { animation: packet-move-3 6s linear infinite 4s; }

/* ===== ENHANCED CYBERSECURITY EFFECTS ===== */
@keyframes radar-sweep {
  0% { transform: rotate(0deg); opacity: 0.3; }
  50% { opacity: 0.6; }
  100% { transform: rotate(360deg); opacity: 0.3; }
}

@keyframes threat-pulse {
  0%, 100% { r: 6px; fill-opacity: 0.4; }
  50% { r: 10px; fill-opacity: 1; }
}

@keyframes data-stream {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 20; }
}

@keyframes hologram-flicker {
  0%, 100% { opacity: 0.8; filter: drop-shadow(0 0 3px rgba(59, 130, 246, 0.5)); }
  50% { opacity: 1; filter: drop-shadow(0 0 8px rgba(59, 130, 246, 1)); }
}

@keyframes wave-propagate {
  0% { r: 5px; stroke-width: 2px; opacity: 1; }
  100% { r: 80px; stroke-width: 0.5px; opacity: 0; }
}

@keyframes threat-alert {
  0%, 100% { fill: #ff4444; opacity: 0.5; }
  50% { fill: #ff0000; opacity: 1; }
}

@keyframes scan-line {
  0% { y1: 0; y2: 20; }
  100% { y1: 800; y2: 820; }
}

@keyframes particle-float {
  0% { opacity: 1; transform: translateY(0) translateX(0); }
  100% { opacity: 0; transform: translateY(-100px) translateX(50px); }
}

@keyframes code-flow {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1000; }
}

@keyframes connection-glow {
  0%, 100% { stroke-width: 1px; }
  50% { stroke-width: 2px; }
}

.radar-sweep { animation: radar-sweep 8s linear infinite; }
.threat-pulse { animation: threat-pulse 1.5s ease-in-out infinite; }
.data-stream { animation: data-stream 2s linear infinite; stroke-dasharray: 10, 5; }
.hologram-text { animation: hologram-flicker 3s ease-in-out infinite; }
.wave-pulse { animation: wave-propagate 1.5s ease-out; }
.threat-alert { animation: threat-alert 0.8s ease-in-out infinite; }
.scan-line { animation: scan-line 6s linear infinite; }
.particle { animation: particle-float 3s ease-out forwards; }
.code-flow { animation: code-flow 4s linear infinite; stroke-dasharray: 100; }
.glow-connection { animation: connection-glow 2s ease-in-out infinite; }

/* ===== INTERACTIVE ENHANCEMENTS ===== */
.cyber-network circle, .cyber-network path, .cyber-network line {
  transition: all 0.3s ease;
}

.cyber-network circle:hover {
  filter: drop-shadow(0 0 15px currentColor);
  stroke-width: 3px !important;
}

.cyber-network line:hover {
  stroke-width: 2px !important;
  opacity: 1 !important;
}

/* Threat indicator styles */
.threat-indicator {
  animation: threat-alert 0.8s ease-in-out infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .cyber-security-bg {
    opacity: 0.2;
  }
  
  .cyber-network {
    filter: blur(1px);
  }
  
  .threat-pulse, .wave-pulse {
    animation-duration: 2.5s;
  }
}
