/* ============ VARIABLES & RESET ============ */
:root {
    --bg: #050810;
    --panel: rgba(13, 20, 36, 0.7);
    --border: rgba(0, 212, 255, 0.15);
    --cyan: #00d4ff;
    --purple: #a855f7;
    --pink: #ff3860;
    --amber: #ffb800;
    --text: #e6edf3;
    --muted: #8b949e;
}

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

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ============ ANIMATED BACKGROUND ============ */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.35;
    animation: float 12s ease-in-out infinite;
}
.glow-1 { width: 400px; height: 400px; background: var(--cyan); top: -100px; left: -100px; }
.glow-2 { width: 400px; height: 400px; background: var(--purple); bottom: -100px; right: -100px; animation-delay: -6s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, 40px); }
}

/* ============ NAVBAR ============ */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    background: rgba(5, 8, 16, 0.6);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 1.6rem; }
.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 2px;
}
.accent { color: var(--cyan); text-shadow: 0 0 12px var(--cyan); }

.nav-badge {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--cyan);
    border: 1px solid var(--cyan);
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 0 12px rgba(0,212,255,0.3);
}

/* ============ HERO ============ */
.hero { text-align: center; padding: 70px 20px 40px; }

.hero-badge {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: var(--purple);
    border: 1px solid var(--purple);
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 25px;
    box-shadow: 0 0 15px rgba(168,85,247,0.4);
}

.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(90deg, var(--cyan), var(--purple), var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 650px;
    margin: 0 auto;
}

/* ============ SECTIONS ============ */
.section-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 3px;
    color: var(--cyan);
    margin: 30px 0 20px;
}

.content-section, .mode-selection {
    max-width: 950px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* ============ MODE CARDS ============ */
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }

.mode-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 35px;
    text-align: center;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}
.mode-card:hover {
    transform: translateY(-5px);
    border-color: var(--cyan);
    box-shadow: 0 10px 40px rgba(0,212,255,0.15);
}
.mode-icon { font-size: 2.8rem; margin-bottom: 15px; }
.mode-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 12px;
}
.mode-card p { color: var(--muted); margin-bottom: 20px; }

/* ============ GLASS PANEL ============ */
.glass-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(12px);
    margin-bottom: 20px;
}

/* ============ BUTTONS ============ */
.btn {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    padding: 12px 26px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #050810;
}

.btn-cyan {
    background: linear-gradient(90deg, var(--cyan), #4facfe);
    box-shadow: 0 0 18px rgba(0,212,255,0.4);
}
.btn-cyan:hover { box-shadow: 0 0 30px rgba(0,212,255,0.7); transform: translateY(-2px); }

.btn-purple {
    background: linear-gradient(90deg, var(--purple), var(--pink));
    color: white;
    box-shadow: 0 0 18px rgba(168,85,247,0.4);
}
.btn-purple:hover { box-shadow: 0 0 30px rgba(168,85,247,0.7); transform: translateY(-2px); }

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--cyan); border-color: var(--cyan); }

/* ============ UPLOAD ============ */
.upload-box {
    border: 2px dashed rgba(0,212,255,0.3);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.upload-box:hover { border-color: var(--cyan); background: rgba(0,212,255,0.05); }
.upload-icon { font-size: 3rem; margin-bottom: 12px; }
.upload-box h3 { margin-bottom: 6px; }
.upload-box p { color: var(--muted); font-size: 0.9rem; margin-bottom: 15px; }

.file-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.file-info span { color: var(--cyan); font-weight: 600; }

/* ============ LOADING ============ */
.loading { text-align: center; margin: 30px 0; }
.spinner {
    width: 45px; height: 45px;
    border: 4px solid rgba(0,212,255,0.2);
    border-top: 4px solid var(--cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
    box-shadow: 0 0 15px rgba(0,212,255,0.3);
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading p { color: var(--muted); letter-spacing: 1px; }

/* ============ SUMMARY CARDS ============ */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.summary-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
}
.summary-card .card-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0,212,255,0.5);
}
.summary-card .card-label { color: var(--muted); font-size: 0.8rem; margin-top: 6px; letter-spacing: 1px; }

/* ============ FINDINGS ============ */
.findings-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.finding-card { border-radius: 12px; padding: 18px; border-left: 4px solid; backdrop-filter: blur(10px); }
.finding-card.high { background: rgba(255,56,96,0.08); border-left-color: var(--pink); }
.finding-card.medium { background: rgba(255,184,0,0.08); border-left-color: var(--amber); }
.finding-card.low { background: rgba(0,212,255,0.08); border-left-color: var(--cyan); }
.finding-card.info { background: rgba(139,148,158,0.08); border-left-color: var(--muted); }
.finding-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.finding-title { font-weight: 700; font-size: 1.05rem; }
.finding-severity {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 1px;
    padding: 4px 12px; border-radius: 20px; text-transform: uppercase;
}
.finding-card.high .finding-severity { background: var(--pink); color: white; box-shadow: 0 0 10px var(--pink); }
.finding-card.medium .finding-severity { background: var(--amber); color: #050810; box-shadow: 0 0 10px var(--amber); }
.finding-card.low .finding-severity { background: var(--cyan); color: #050810; box-shadow: 0 0 10px var(--cyan); }
.finding-card.info .finding-severity { background: var(--muted); color: white; }
.finding-desc { color: var(--muted); margin-top: 4px; }
.finding-mitre { color: var(--purple); font-size: 0.85rem; margin-top: 8px; font-style: italic; }

/* ============ FORMS ============ */
textarea {
    width: 100%;
    min-height: 160px;
    background: rgba(5,8,16,0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px;
    color: var(--text);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 15px;
}
textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 12px rgba(0,212,255,0.2); }

.form-row { display: flex; gap: 12px; margin-bottom: 15px; }
.form-row input, .report-input input {
    flex: 1;
    padding: 13px;
    background: rgba(5,8,16,0.6);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
}
.form-row select, .report-input select {
    padding: 13px;
    background: rgba(5,8,16,0.6);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}
input:focus, select:focus { outline: none; border-color: var(--cyan); }

.report-input { display: flex; gap: 12px; align-items: center; margin-top: 20px; flex-wrap: wrap; }

/* ============ REPORT ============ */
.report-content {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    white-space: pre-wrap;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    max-height: 600px;
    overflow-y: auto;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}
.report-actions { display: flex; gap: 12px; }

/* ============ FOOTER  ============ */
.footer {
    position: relative;
    z-index: 10; /* Forces it above the glowing background orbs */
    display: block !important; /* Prevents any code from hiding it */
    text-align: center;
    padding: 50px 20px;
    margin-top: 100px;
    background: rgba(5, 8, 16, 0.95); /* Solid dark background so it's easy to read */
    border-top: 2px solid var(--cyan);
    color: #ffffff; /* Bright white text */
    letter-spacing: 1px;
}
.footer-name {
    color: var(--cyan);
    font-weight: 700;
    text-shadow: 0 0 15px rgba(0,212,255,0.8);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 700px) {
    .hero h1 { font-size: 1.8rem; }
    .mode-cards { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }
    .report-input { flex-direction: column; }
    .navbar { padding: 15px 20px; }
    .nav-badge { display: none; }
}

/* ============ SCREENSHOT UPLOAD ============ */
.shots-preview { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 15px; }
.shot-item {
    position: relative; width: 150px;
    background: rgba(5,8,16,0.6);
    border: 1px solid var(--border);
    border-radius: 10px; padding: 8px;
}
.shot-item img { width: 100%; height: 85px; object-fit: cover; border-radius: 6px; }
.shot-num {
    position: absolute; top: 4px; left: 6px;
    background: var(--cyan); color: #050810;
    font-weight: 700; font-size: 0.7rem;
    padding: 2px 7px; border-radius: 10px;
}
.shot-remove {
    position: absolute; top: 4px; right: 6px;
    background: var(--pink); color: white; border: none;
    border-radius: 50%; width: 20px; height: 20px;
    cursor: pointer; font-size: 0.7rem;
}
.shot-item input {
    width: 100%; margin-top: 6px; padding: 6px;
    background: rgba(5,8,16,0.8);
    border: 1px solid var(--border);
    border-radius: 6px; color: var(--text); font-size: 0.8rem;
}

/* ============ GALLERY ============ */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 15px; }
.gallery-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px; padding: 10px;
}
.gallery-item img { width: 100%; border-radius: 8px; }
.gallery-item figcaption { color: var(--muted); font-size: 0.8rem; margin-top: 8px; }

/* Privacy Notice */
.privacy-notice {
    margin-top: 15px;
    font-size: 0.8rem;
    color: var(--cyan);
    letter-spacing: 1px;
    opacity: 0.8;
}


/* ---- Rendered report typography (headings now come from real Markdown) ---- */
.report-content h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: var(--cyan);
    text-shadow: 0 0 12px rgba(0,212,255,0.5);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.report-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 1px;
    color: var(--cyan);
    margin: 28px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.report-content h2:first-child { margin-top: 0; }
.report-content h3 {
    font-size: 0.95rem;
    color: var(--purple);
    margin: 16px 0 8px;
}
.report-content p { margin: 0 0 12px; color: var(--text); }
.report-content ul { margin: 0 0 14px; padding-left: 22px; }
.report-content li { margin-bottom: 8px; color: var(--text); }
.report-content strong { color: var(--cyan); font-weight: 700; }

/* ---- MITRE ATT&CK kill-chain strip ---- */
.mitre-chain-wrap { margin-bottom: 25px; }
.mitre-chain {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    backdrop-filter: blur(10px);
}
.mitre-step {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    color: var(--muted);
    background: rgba(5,8,16,0.4);
    white-space: nowrap;
    transition: all 0.2s ease;
}
.mitre-step.active {
    color: #050810;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    border-color: transparent;
    box-shadow: 0 0 14px rgba(0,212,255,0.5);
}
.mitre-arrow {
    color: var(--muted);
    font-size: 0.8rem;
    opacity: 0.6;
}

@media (max-width: 700px) {
    .mitre-step { font-size: 0.68rem; padding: 6px 9px; }
}


/* ---- Rendered report typography (in-app, dark theme) ---- */
.report-content h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: var(--cyan);
    text-shadow: 0 0 12px rgba(0,212,255,0.5);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.report-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 1px;
    color: var(--cyan);
    margin: 28px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.report-content h2:first-child { margin-top: 0; }
.report-content h3 {
    font-size: 0.95rem;
    color: var(--purple);
    margin: 16px 0 8px;
}
.report-content p { margin: 0 0 12px; color: var(--text); }
.report-content ul { margin: 0 0 14px; padding-left: 22px; }
.report-content li { margin-bottom: 8px; color: var(--text); }
.report-content strong { color: var(--cyan); font-weight: 700; }

/* ---- MITRE ATT&CK kill-chain strip (in-app, dark theme) ---- */
.mitre-chain-wrap { margin-bottom: 25px; }
.mitre-chain {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    backdrop-filter: blur(10px);
}
.mitre-step {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    color: var(--muted);
    background: rgba(5,8,16,0.4);
    white-space: nowrap;
    transition: all 0.2s ease;
}
.mitre-step.active {
    color: #050810;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    border-color: transparent;
    box-shadow: 0 0 14px rgba(0,212,255,0.5);
}
.mitre-arrow { color: var(--muted); font-size: 0.8rem; opacity: 0.6; }

/* ---- Report action buttons row ---- */
.report-actions { flex-wrap: wrap; }
.btn-outline {
    background: transparent;
    color: var(--cyan);
    border: 1px solid var(--cyan);
}
.btn-outline:hover { background: rgba(0,212,255,0.1); }

@media (max-width: 700px) {
    .mitre-step { font-size: 0.68rem; padding: 6px 9px; }
}

/* ======================================================
   PDF EXPORT THEME — light, print-friendly, no neon.
   This container is built off-screen by script.js purely
   for html2pdf.js to render — it never appears in the UI.
   ====================================================== */
.pdf-export {
    width: 780px;
    background: #ffffff;
    color: #1a1a1a;
    font-family: 'Rajdhani', Arial, sans-serif;
    padding: 10px;
    /* Positioning (fixed, z-index: -9999) is set by script.js at creation
       time — keep it that way rather than off-screen coordinates, or
       html2canvas will silently capture a blank page. */
}

.pdf-header {
    border-bottom: 3px solid #0a2540;
    padding-bottom: 16px;
    margin-bottom: 22px;
}
.pdf-title {
    font-family: 'Orbitron', Arial, sans-serif;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #0a2540;
}
.pdf-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-top: 4px;
}
.pdf-meta {
    margin-top: 10px;
    font-size: 12px;
    color: #555;
    display: flex;
    gap: 24px;
}
.pdf-meta strong { color: #0a2540; }

.pdf-mitre-wrap { margin-bottom: 24px; }
.pdf-mitre-wrap h2 {
    font-size: 14px;
    letter-spacing: 1px;
    color: #0a2540;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.pdf-mitre-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pdf-mitre-step {
    font-size: 10px;
    font-weight: 600;
    padding: 5px 9px;
    border-radius: 12px;
    border: 1px solid #ccc;
    color: #999;
    white-space: nowrap;
}
.pdf-mitre-step.active {
    color: #ffffff;
    background: #0a2540;
    border-color: #0a2540;
}
.pdf-mitre-arrow { color: #bbb; font-size: 11px; }

.pdf-body h1 { font-size: 18px; color: #0a2540; margin: 20px 0 10px; }
.pdf-body h2 {
    font-size: 14px;
    color: #0a2540;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 22px 0 10px;
    padding-bottom: 4px;
    border-bottom: 1.5px solid #0a2540;
}
.pdf-body h2:first-child { margin-top: 0; }
.pdf-body h3 { font-size: 12px; color: #333; margin: 14px 0 6px; }
.pdf-body p { font-size: 11.5px; line-height: 1.6; color: #222; margin: 0 0 10px; }
.pdf-body ul { margin: 0 0 12px; padding-left: 18px; }
.pdf-body li { font-size: 11.5px; line-height: 1.55; color: #222; margin-bottom: 6px; }
.pdf-body strong { color: #0a2540; font-weight: 700; }

.pdf-gallery { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.pdf-shot { width: 220px; }
.pdf-shot img { width: 100%; border: 1px solid #ddd; border-radius: 4px; }
.pdf-shot p { font-size: 10px; color: #555; margin-top: 4px; }

.pdf-footer {
    margin-top: 30px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
    font-size: 9px;
    color: #999;
    text-align: center;
}
