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

:root {
  --primary: #00ff9d;       /* Neon Green */
  --secondary: #a855f7;     /* Purple */
  --bg-dark: #050a14;       /* Deep Black/Blue */
  --card-bg: #111827;       /* Dark Gray Card */
  --text-main: #e2e8f0;     /* White Text */
  --text-muted: #94a3b8;    /* Gray Text */
  --mono: 'JetBrains Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  background-image: linear-gradient(rgba(0,255,157,0.03) 1px, transparent 1px);
  background-size: 100% 4px;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* =========================
   2. HEADER / NAVBAR (Unified Fix)
========================= */
/* Supports both .header and .navbar classes */
.header, .navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(5,10,20,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,255,157,0.3);
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%; /* Default padding */
}

/* Specific fix for pages using .container inside header */
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* Logo Styling */
.logo a, .logo h1 {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1px;
  text-decoration: none;
}

/* Navigation Links */
.nav, .nav-links {
  display: flex;
  gap: 25px;
  align-items: center;
}

.nav a, .nav-links a {
  font-size: 15px;
  color: var(--text-muted);
  transition: 0.3s;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav a:hover, .nav a.active,
.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
}

/* Mobile Menu & Theme Buttons */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
}

.btn-icon:hover { color: var(--primary); }

.mobile-menu-btn {
    display: none; /* Hidden on Desktop */
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* =========================
   3. HERO SECTION
========================= */
.hero-section, .hero {
  text-align: center;
  padding: 80px 20px;
  background: radial-gradient(circle at center, rgba(168,85,247,0.15), transparent 70%);
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content h1, .hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 15px;
  line-height: 1.2;
}

.hero-content p, .hero-desc {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 30px;
  font-size: 1.1rem;
}

.cta-button {
  display: inline-block;
  padding: 12px 30px;
  background: var(--primary);
  color: #000;
  border-radius: 50px;
  font-weight: bold;
  transition: 0.3s;
  border: none;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(0,255,157,0.4);
}

/* =========================
   4. CONTAINER & GRID
========================= */
.container {
  max-width: 1100px;
  margin: 50px auto;
  padding: 0 20px;
}

.section-title {
  font-size: 24px;
  margin-bottom: 30px;
  padding-left: 15px;
  border-left: 5px solid var(--primary);
  color: var(--text-main);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
  gap: 25px;
}

/* =========================
   5. CARDS
========================= */
.card {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-content {
  padding: 20px;
  flex-grow: 1;
}

.card-content h3 {
  margin-bottom: 10px;
  color: var(--primary);
}

.card-content p {
  color: var(--text-muted);
  margin-bottom: 15px;
}

.read-more {
  color: var(--primary);
  font-weight: bold;
  margin-top: auto;
  display: inline-block;
}

/* =========================
   6. POST / BLOG
========================= */
.post {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}

.post-title {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 15px;
  font-family: var(--mono);
}

.post-desc {
  color: #d1d5db;
  margin-bottom: 20px;
}

.post-img {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 12px;
  margin-bottom: 30px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* =========================
   7. FOOTER
========================= */
.footer {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
  border-top: 1px solid rgba(255,255,255,0.05);
  background: rgba(5,10,20,0.95);
  margin-top: 50px;
}

/* =========================
   8. UTILITIES (Quiz, Code, Etc)
========================= */
.recap-box {
  background: rgba(168,85,247,0.1);
  border-left: 4px solid var(--secondary);
  padding: 20px;
  margin: 25px 0;
  border-radius: 8px;
  color: var(--text-main);
}

.divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 40px 0;
}

.lang-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 15px;
}

.active-lang { color: var(--primary) !important; font-weight: bold; }
.inactive-lang { color: var(--text-muted); }

/* Code Blocks */
.code-block {
  background: #0a0e1a;
  border: 1px solid rgba(0,255,157,0.2);
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  font-family: var(--mono);
  font-size: 14px;
  overflow-x: auto;
}
.code-comment { color: #6b7280; font-style: italic; margin: 8px 0; }
.code-val { color: var(--primary); margin: 8px 0; }
.code-var { color: #a855f7; margin: 8px 0; }
code {
  background: rgba(0,255,157,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--primary);
}

/* Quiz Boxes */
.quiz-box {
  background: rgba(168,85,247,0.1);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 12px;
  padding: 25px;
  margin: 25px 0;
}
.quiz-question { font-weight: bold; color: var(--text-main); margin: 20px 0 10px; font-size: 1.1rem; }
.quiz-options { list-style: none; padding-left: 0; margin: 15px 0; }
.quiz-options li {
  padding: 10px 15px; margin: 8px 0;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  border-left: 3px solid transparent;
  transition: 0.2s;
}
.quiz-options li:hover { background: rgba(255,255,255,0.08); }
.correct-ans {
  border-left-color: var(--primary) !important;
  background: rgba(0,255,157,0.1) !important;
  color: var(--primary) !important;
  font-weight: bold;
}

/* Nav Link Helper */
.nav-link {
  color: var(--text-muted);
  padding: 8px 15px;
  border-radius: 6px;
  transition: 0.3s;
  display: inline-block;
}
.nav-link:hover { color: var(--primary); background: rgba(0,255,157,0.1); }

/* CIA Grid */
.cia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 25px 0;
}
.cia-box {
  background: var(--card-bg);
  border: 2px solid;
  border-radius: 12px;
  padding: 20px;
  transition: 0.3s;
}
.cia-box:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.3); }
.cia-box h4 { color: var(--primary); margin-bottom: 10px; font-size: 1.1rem; }
.cia-box p { color: var(--text-muted); margin: 0; line-height: 1.6; }

.diagram-img {
  width: 100%;
  max-width: 700px;
  height: auto;
  border-radius: 12px;
  margin: 25px auto;
  display: block;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Top Button */
#topBtn {
  display: none;
  position: fixed;
  bottom: 30px; right: 30px; z-index: 999;
  background: var(--primary); color: #000;
  border: none; border-radius: 50%;
  width: 50px; height: 50px; font-size: 20px;
  cursor: pointer; box-shadow: 0 4px 15px rgba(0,255,157,0.3);
  transition: all 0.3s;
}
#topBtn:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,255,157,0.5); }

/* =========================
   9. MOBILE RESPONSIVENESS
========================= */
@media (max-width: 768px) {
  .header, .navbar, header .container {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }
  
  .nav, .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
  }
  
  .nav-links {
      display: flex; /* Can switch to none if using JS Toggle */
  }

  .hero-content h1, .hero-title { font-size: 1.8rem; }
  .grid, .cia-grid { grid-template-columns: 1fr; }
  .post { padding: 20px; }
  .post-title { font-size: 1.5rem; }
  .container { margin-top: 20px; padding: 20px; }
  .code-block { font-size: 12px; padding: 15px; }
}




/* --- Footer Styling --- */
.cyber-footer {
    background-color: #050a10; /* Very Dark Blue/Black */
    color: #cfcfcf;
    padding: 60px 0 20px;
    border-top: 2px solid #00ff88; /* Neon Green Border on top */
    font-family: 'Courier New', monospace; /* Hacker font vibe */
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-col h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.highlight {
    color: #00ff88; /* Cyber Green */
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Disclaimer Box Styling */
.disclaimer-box {
    background: rgba(255, 0, 0, 0.1);
    border-left: 3px solid #ff4444;
    padding: 10px;
    font-size: 0.8rem;
    color: #ffaaaa;
}

/* Links Styling */
.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #cfcfcf;
    text-decoration: none;
    transition: 0.3s;
}

.footer-links a:hover {
    color: #00ff88;
    padding-left: 8px; /* Slide effect */
}

/* IP Widget Styling (The Cool Part) */
.ip-widget {
    background: #000;
    border: 1px dashed #00ff88;
    padding: 15px;
    text-align: center;
    margin-bottom: 20px;
    font-family: monospace;
}

.ip-widget p {
    margin: 0;
    font-size: 0.8rem;
    color: #888;
}

#user-ip {
    font-size: 1.4rem;
    color: #00ff88;
    font-weight: bold;
    display: block;
    margin-top: 5px;
}

/* Blinking text for "Scanning..." */
.blink-text {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

/* Social Buttons */
.social-icons {
    display: flex;
    gap: 10px;
}

.social-btn {
    padding: 8px 15px;
    border: 1px solid #00ff88;
    color: #00ff88;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: 0.3s;
}

.social-btn:hover {
    background: #00ff88;
    color: #000;
}

/* Bottom Bar */
.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #1a1a1a;
    font-size: 0.8rem;
    color: #666;
}

.heart {
    color: #ff4444;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr; /* Stack columns on phone */
        text-align: center;
    }
    .disclaimer-box {
        text-align: left;
    }
    .social-icons {
        justify-content: center;
    }
}


/* --- Hacker Terminal Widget --- */
.hacker-terminal {
    background: #0d1117; /* GitHub Dark Mode bg */
    border: 1px solid #30363d;
    border-radius: 6px;
    margin-top: 20px;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 255, 136, 0.1);
}

.terminal-header {
    background: #161b22;
    padding: 5px 10px;
    border-bottom: 1px solid #30363d;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Mac-style window dots */
.dot { height: 10px; width: 10px; border-radius: 50%; display: inline-block; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.terminal-header .title {
    color: #8b949e;
    font-size: 0.7rem;
    margin-left: 10px;
}

.terminal-window {
    height: 100px; /* Isse zyada bada nahi hoga */
    padding: 10px;
    color: #00ff88;
    font-size: 0.75rem;
    overflow: hidden; /* Scrollbar chupane ke liye */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Text neeche se upar jayega */
}

.log-line {
    margin: 2px 0;
    opacity: 0.8;
}


