/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Fira+Code:wght@400;500&display=swap');

:root {
    --bg: #050505;
    --card-bg: rgba(0, 15, 0, 0.75);
    --primary: #00FF41;
    --danger: #FF003C;
    --warning: #F4D03F;
    --text: #00FF41;
    --text-muted: #27AE60;
    --border: #00FF41;
    --glow: 0 0 10px rgba(0, 255, 65, 0.5);
    --danger-glow: 0 0 10px rgba(255, 0, 60, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Share Tech Mono', monospace;
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
    text-shadow: var(--glow);
}

::selection {
    background: var(--primary);
    color: var(--bg);
    text-shadow: none;
}

/* CRT Scanlines Overlay */
.scanlines {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 3px 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.6;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); border-left: 1px solid rgba(0, 255, 65, 0.2); }
::-webkit-scrollbar-thumb { background: var(--primary); }
::-webkit-scrollbar-thumb:hover { background: #fff; }

/* Typography */
h1, h2, h3, h4, h5, h6 { color: var(--text); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 2px; }
a { text-decoration: none; color: var(--primary); transition: color 0.3s ease; }
a:hover { color: #fff; text-shadow: 0 0 15px #fff; }

/* Layout Classes */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 10; }
.section { padding: 80px 0; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 3rem; color: var(--primary); border-bottom: 1px dashed var(--primary); display: inline-block; padding-bottom: 10px; }
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-muted { color: var(--text-muted); text-shadow: none; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--primary);
    background: rgba(0, 255, 65, 0.1);
    color: var(--primary);
    text-shadow: var(--glow);
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
}
.btn::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: var(--primary); transition: left 0.3s ease; z-index: -1;
}
.btn:hover::before { left: 0; }
.btn:hover { color: var(--bg); text-shadow: none; box-shadow: var(--glow); }

.btn-primary { background: var(--primary); color: var(--bg); text-shadow: none; }
.btn-primary::before { background: #fff; }
.btn-primary:hover { color: var(--bg); background: #fff; box-shadow: 0 0 15px #fff; border-color: #fff; }
.btn-outline { background: transparent; }
.btn-outline:hover { background: var(--primary); color: var(--bg); }
.btn-danger { border-color: var(--danger); color: var(--danger); text-shadow: var(--danger-glow); background: rgba(255,0,60,0.1); }
.btn-danger::before { background: var(--danger); }
.btn-danger:hover { color: var(--bg); box-shadow: var(--danger-glow); }

/* Terminal Cards (Replaces Glass Cards) */
.terminal-card {
    background: var(--card-bg);
    border: 1px solid var(--primary);
    box-shadow: inset 0 0 10px rgba(0,255,65,0.1);
    padding: 24px;
    position: relative;
    transition: all 0.3s ease;
}
.terminal-card::before, .terminal-card::after {
    content: ''; position: absolute;
    width: 15px; height: 15px;
    border: 2px solid var(--primary);
    transition: all 0.3s ease;
}
.terminal-card::before { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.terminal-card::after { bottom: -2px; right: -2px; border-left: none; border-top: none; }
.terminal-card:hover { box-shadow: inset 0 0 20px rgba(0,255,65,0.2), 0 0 15px rgba(0,255,65,0.3); transform: translateY(-2px); }

/* Navbar */
.navbar {
    position: fixed;
    top: 0; width: 100%; z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    transition: padding 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
}
.navbar.scrolled { padding: 10px 0; background: #000; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo {
    font-size: 1.5rem; font-weight: 700; color: var(--primary);
    display: flex; align-items: center; gap: 10px; text-transform: uppercase;
}
.nav-links { display: flex; list-style: none; gap: 20px; }
.nav-links li a {
    color: var(--text); text-transform: uppercase; font-size: 0.9rem;
    position: relative; padding: 5px;
}
.nav-links li a:hover { background: var(--primary); color: var(--bg); text-shadow: none; }
.hamburger { display: none; cursor: pointer; font-size: 1.5rem; color: var(--primary); }

/* Hero Section */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; padding-top: 80px; }
.hero-content { flex: 1; z-index: 2; }
.hero-image { flex: 1; display: flex; justify-content: center; z-index: 2; }
.typing-text { font-size: 1.5rem; color: var(--text); min-height: 40px; margin-bottom: 20px; font-family: 'Fira Code', monospace; }
.typing-text::after { content: '█'; animation: blink 1s infinite; color: var(--primary); }

/* Terminal Mockup */
.terminal-window {
    background: rgba(0, 10, 0, 0.9);
    border: 1px solid var(--primary);
    width: 100%; max-width: 500px;
    box-shadow: var(--glow);
}
.terminal-header {
    background: var(--primary); padding: 5px 10px;
    display: flex; align-items: center; gap: 8px; color: var(--bg); font-weight: bold;
}
.terminal-header .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; background: var(--bg); }
.terminal-body { padding: 20px; font-family: 'Fira Code', monospace; color: var(--primary); text-align: left; line-height: 1.8; }
.blink { animation: blink 1s infinite; }

/* Animations */
@keyframes float { 0% { transform: translateY(0); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Glitch Effect */
.glitch { position: relative; display: inline-block; color: var(--text); }
.glitch::before, .glitch::after {
    content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg);
}
.glitch::before {
    left: 2px; text-shadow: -2px 0 var(--danger); clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px; text-shadow: -2px 0 var(--primary); clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}
@keyframes glitch-anim {
    0% { clip: rect(13px, 9999px, 90px, 0); } 5% { clip: rect(54px, 9999px, 4px, 0); }
    10% { clip: rect(19px, 9999px, 20px, 0); } 15% { clip: rect(93px, 9999px, 3px, 0); }
    20% { clip: rect(44px, 9999px, 16px, 0); } 100% { clip: rect(44px, 9999px, 16px, 0); }
}
@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); } 5% { clip: rect(52px, 9999px, 74px, 0); }
    10% { clip: rect(79px, 9999px, 85px, 0); } 15% { clip: rect(2px, 9999px, 12px, 0); }
    20% { clip: rect(44px, 9999px, 16px, 0); } 100% { clip: rect(44px, 9999px, 16px, 0); }
}

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

/* Scanner Section */
.scanner-box { margin-top: 20px; }
textarea.code-input {
    width: 100%; height: 250px;
    background: rgba(0, 10, 0, 0.9);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 15px; font-family: 'Fira Code', monospace; font-size: 14px;
    resize: vertical; margin-bottom: 20px;
    box-shadow: inset 0 0 10px rgba(0, 255, 65, 0.1);
}
textarea.code-input:focus {
    outline: none; border-color: #fff; box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
}
.results-container { margin-top: 30px; display: none; }
.result-item { border-left: 4px solid var(--primary); margin-bottom: 15px; }
.result-item.high, .result-item.critical { border-color: var(--danger); box-shadow: inset 0 0 15px rgba(255,0,60,0.1); }
.result-item.medium { border-color: var(--warning); }
.badge { padding: 4px 8px; font-size: 0.8rem; font-weight: bold; text-transform: uppercase; border: 1px solid currentColor; }
.badge.high, .badge.critical { color: var(--danger); background: rgba(255, 0, 60, 0.1); }
.badge.medium { color: var(--warning); background: rgba(244, 208, 63, 0.1); }

/* Checklist */
.checklist-item {
    display: flex; align-items: center; gap: 15px; padding: 15px;
    border-bottom: 1px dashed rgba(0, 255, 65, 0.3); cursor: pointer; transition: background 0.3s;
}
.checklist-item:hover { background: rgba(0, 255, 65, 0.05); }
.checklist-item input[type="checkbox"] {
    appearance: none; -webkit-appearance: none; width: 24px; height: 24px;
    border: 1px solid var(--primary); cursor: pointer; position: relative;
    background: transparent;
}
.checklist-item input[type="checkbox"]:checked::after {
    content: 'X'; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); color: var(--primary); font-weight: bold; font-family: 'Share Tech Mono', monospace;
}
.checklist-item.checked span { text-decoration: line-through; color: var(--text-muted); }

/* Quiz Section */
.quiz-container { max-width: 800px; margin: 0 auto; }
.question-block { margin-bottom: 30px; }
.options-list { list-style: none; margin-top: 15px; }
.option-item {
    background: transparent; padding: 12px 20px;
    border: 1px solid rgba(0, 255, 65, 0.3);
    margin-bottom: 10px; cursor: pointer; transition: all 0.3s;
}
.option-item:hover { border-color: var(--primary); background: rgba(0, 255, 65, 0.1); }
.option-item.selected { background: var(--primary); color: var(--bg); text-shadow: none; }
.option-item.correct { background: rgba(0, 255, 65, 0.2); border-color: var(--primary); }
.option-item.wrong { background: rgba(255, 0, 60, 0.2); border-color: var(--danger); }

/* FAQ Accordion */
.accordion-item { margin-bottom: 15px; }
.accordion-header {
    background: var(--card-bg); padding: 15px 20px; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    border: 1px solid var(--primary); transition: background 0.3s;
}
.accordion-header:hover { background: rgba(0, 255, 65, 0.1); }
.accordion-content { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; border: 1px solid transparent; border-top: none; }
.accordion-item.active .accordion-content {
    padding: 15px 20px; max-height: 500px; border-color: var(--primary); background: rgba(0,20,0,0.4);
}
.accordion-item.active .accordion-header { background: var(--primary); color: var(--bg); text-shadow: none; }

/* Toast Notification */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
    background: #000; color: var(--text); padding: 15px 25px;
    border: 1px solid var(--primary); box-shadow: var(--glow);
    animation: slideIn 0.3s ease forwards; text-transform: uppercase; font-family: 'Fira Code', monospace;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Back to Top */
#back-to-top {
    position: fixed; bottom: 30px; right: 30px; background: var(--bg); color: var(--primary);
    width: 45px; height: 45px; display: flex; justify-content: center; align-items: center;
    cursor: pointer; border: 1px solid var(--primary);
    opacity: 0; pointer-events: none; transition: all 0.3s; z-index: 1000;
}
#back-to-top.show { opacity: 1; pointer-events: auto; }
#back-to-top:hover { background: var(--primary); color: var(--bg); }

/* Loader */
.loader-wrapper {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg); display: flex; justify-content: center; align-items: center;
    z-index: 99999; transition: opacity 0.5s;
}
.loader-terminal { font-family: 'Fira Code', monospace; color: var(--primary); font-size: 1.2rem; text-shadow: var(--glow); }

/* Form */
.form-group { margin-bottom: 20px; }
.form-control {
    width: 100%; padding: 12px 15px; background: rgba(0,0,0,0.5);
    border: 1px solid rgba(0,255,65,0.3); color: var(--text); transition: border-color 0.3s;
    font-family: 'Fira Code', monospace;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: var(--glow); }

/* Footer */
footer { background: var(--card-bg); padding: 40px 0 20px; border-top: 1px solid var(--primary); box-shadow: 0 -5px 15px rgba(0,255,65,0.1); }
.footer-content { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px dashed rgba(0,255,65,0.2); color: var(--text-muted); }
