/* ==========================================================================
   CyberHQ - Apple Glass + HackTheBox Dark Neon Theme Master Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --htb-bg-darker: #04060d;
  --htb-bg-dark: #060913;
  --htb-bg-card: rgba(13, 19, 33, 0.65);
  --htb-bg-card-hover: rgba(18, 26, 45, 0.85);
  
  --htb-green: #9FEF00;
  --htb-green-bright: #a8ff00;
  --htb-green-muted: #10b981;
  --htb-green-glow: rgba(159, 239, 0, 0.35);
  --htb-green-border: rgba(159, 239, 0, 0.25);
  
  --htb-cyan: #00F0FF;
  --htb-cyan-glow: rgba(0, 240, 255, 0.25);
  
  --glass-bg: rgba(15, 23, 42, 0.60);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(159, 239, 0, 0.4);
  --glass-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
}

/* --------------------------------------------------------------------------
   Global Layout & Dark Mode Enforcements
   -------------------------------------------------------------------------- */
html, body {
  background-color: var(--htb-bg-dark) !important;
  color: var(--text-muted);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, 'Inter', sans-serif !important;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*, ::before, ::after {
  font-family: inherit;
}

code, kbd, samp, pre, .font-mono, .htb-terminal-box {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, 'JetBrains Mono', monospace !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #04060d;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
  border: 1px solid rgba(159, 239, 0, 0.2);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--htb-green);
  box-shadow: 0 0 10px var(--htb-green);
}

/* Cyber Grid Background Pattern */
.htb-grid-bg {
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(159, 239, 0, 0.12) 0%, transparent 60%),
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
}

.htb-grid-dots {
  background-image: radial-gradient(rgba(159, 239, 0, 0.15) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Radial Accent Glows */
.htb-glow-spot-green {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(159, 239, 0, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(60px);
  pointer-events: none;
}

.htb-glow-spot-cyan {
  position: absolute;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(60px);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   True Apple Frosted Glassmorphism (Specular Highlights & Multi-Layer Refraction)
   -------------------------------------------------------------------------- */
.glass-card {
  background: radial-gradient(140% 140% at 50% -10%, rgba(255, 255, 255, 0.10) 0%, rgba(15, 23, 42, 0.60) 65%, rgba(6, 9, 20, 0.80) 100%) !important;
  backdrop-filter: blur(24px) saturate(200%) contrast(108%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(200%) contrast(108%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.75), inset 0 1px 1px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 1px 0 rgba(0, 0, 0, 0.3) !important;
  border-radius: 1.5rem;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  pointer-events: none;
  z-index: 1;
}

.glass-card:hover {
  background: radial-gradient(140% 140% at 50% -10%, rgba(159, 239, 0, 0.15) 0%, rgba(18, 28, 54, 0.75) 65%, rgba(8, 12, 28, 0.90) 100%) !important;
  border-top: 1px solid rgba(159, 239, 0, 0.7) !important;
  border-left: 1px solid rgba(159, 239, 0, 0.45) !important;
  border-right: 1px solid rgba(159, 239, 0, 0.3) !important;
  border-bottom: 1px solid rgba(159, 239, 0, 0.2) !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.85), 0 0 35px rgba(159, 239, 0, 0.25), inset 0 1px 2px 0 rgba(255, 255, 255, 0.45) !important;
  transform: translateY(-5px);
}

.glass-card-static {
  background: radial-gradient(140% 140% at 50% -10%, rgba(255, 255, 255, 0.10) 0%, rgba(15, 23, 42, 0.60) 65%, rgba(6, 9, 20, 0.80) 100%) !important;
  backdrop-filter: blur(24px) saturate(200%) contrast(108%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(200%) contrast(108%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.75), inset 0 1px 1px 0 rgba(255, 255, 255, 0.35) !important;
  border-radius: 1.5rem;
  position: relative;
}

.glass-nav {
  background: rgba(8, 12, 22, 0.85) !important;
  backdrop-filter: blur(30px) saturate(210%) contrast(110%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(210%) contrast(110%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.75), inset 0 1px 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.glass-dropdown {
  background: rgba(6, 9, 18, 0.97) !important;
  backdrop-filter: blur(40px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
  border: 1px solid rgba(159, 239, 0, 0.35) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), 0 0 35px rgba(159, 239, 0, 0.2) !important;
  border-radius: 1.5rem;
}

.glass-input {
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.glass-input:focus {
  border-color: var(--htb-green) !important;
  box-shadow: 0 0 15px rgba(159, 239, 0, 0.3) !important;
  outline: none !important;
}

/* --------------------------------------------------------------------------
   HackTheBox Neon Elements & Badges
   -------------------------------------------------------------------------- */
.htb-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(159, 239, 0, 0.1);
  border: 1px solid rgba(159, 239, 0, 0.3);
  color: var(--htb-green);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 15px rgba(159, 239, 0, 0.15);
}

.htb-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--htb-green);
  box-shadow: 0 0 10px var(--htb-green);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 10px var(--htb-green); }
  50% { opacity: 0.5; transform: scale(0.85); box-shadow: 0 0 4px var(--htb-green); }
}

.htb-neon-button {
  background: linear-gradient(135deg, #9FEF00 0%, #10b981 100%) !important;
  color: #04060d !important;
  font-weight: 800 !important;
  border: none !important;
  box-shadow: 0 0 25px rgba(159, 239, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.htb-neon-button:hover {
  background: linear-gradient(135deg, #a8ff00 0%, #34d399 100%) !important;
  box-shadow: 0 0 40px rgba(159, 239, 0, 0.65), 0 0 15px rgba(255, 255, 255, 0.5) !important;
  transform: translateY(-2px);
}

.htb-glow-text {
  color: var(--htb-green);
  text-shadow: 0 0 15px rgba(159, 239, 0, 0.4);
}

.htb-gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, var(--htb-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.htb-green-gradient-text {
  background: linear-gradient(135deg, #9FEF00 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(159, 239, 0, 0.3));
}

/* Code & Terminal Details */
.htb-terminal-box {
  background: rgba(6, 9, 19, 0.95);
  border: 1px solid rgba(159, 239, 0, 0.2);
  border-radius: 1rem;
  font-family: 'JetBrains Mono', monospace;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
}

.htb-terminal-header {
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.htb-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.htb-dot-red { background: #ef4444; }
.htb-dot-yellow { background: #f59e0b; }
.htb-dot-green { background: #10b981; }

/* --------------------------------------------------------------------------
   Tailwind Override Rules for Seamless Dark Mode Conversion Across All Pages
   -------------------------------------------------------------------------- */

/* Light Background Overrides */
.bg-white, 
.bg-neutral-bg, 
.bg-gray-50, 
.bg-gray-50\/50, 
.bg-gray-100 {
  background-color: var(--htb-bg-dark) !important;
}

.bg-gray-900 {
  background-color: #04060d !important;
}

/* Light Card Overrides */
.bg-white.rounded-3xl,
.bg-white.rounded-2xl,
.bg-white.rounded-\[2rem\],
.bg-white.p-10,
.bg-white.p-8,
.bg-white.p-6,
.bg-white.shadow-sm,
.bg-white.shadow-soft {
  background: var(--htb-bg-card) !important;
  border: 1px solid var(--glass-border) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* Border Overrides */
.border-neutral-border,
.border-gray-100,
.border-gray-200,
.border-gray-300 {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Text Overrides */
.text-gray-900,
.text-slate-900,
.text-black {
  color: #ffffff !important;
}

.text-gray-500,
.text-gray-600,
.text-gray-700,
.text-slate-600 {
  color: #94a3b8 !important;
}

.text-gray-400,
.text-slate-500 {
  color: #64748b !important;
}

/* Brand Colors -> HTB Neon Green */
.text-brand-green,
.text-emerald-500,
.text-emerald-600 {
  color: var(--htb-green) !important;
}

.bg-brand-green {
  background-color: var(--htb-green) !important;
  color: #04060d !important;
}

.bg-brand-light,
.bg-emerald-50 {
  background-color: rgba(159, 239, 0, 0.12) !important;
}

.border-brand-green {
  border-color: var(--htb-green) !important;
}

/* Hover Overrides */
.hover\:bg-gray-50:hover,
.hover\:bg-gray-100:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

.hover\:text-brand-green:hover {
  color: var(--htb-green) !important;
  text-shadow: 0 0 10px rgba(159, 239, 0, 0.4);
}

/* Form Inputs in HTML Pages */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  background-color: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border-radius: 0.75rem !important;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--htb-green) !important;
  box-shadow: 0 0 15px rgba(159, 239, 0, 0.3) !important;
  outline: none !important;
}
