:root {
    --bg-dark: #050810;
    --bg-panel: rgba(15, 22, 36, 0.6);
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --primary: #00f0ff;
    --primary-glow: rgba(0, 240, 255, 0.5);
    --secondary: #7c3aed;
    --secondary-glow: rgba(124, 58, 237, 0.5);
    --accent: #f43f5e;

    --success: #10b981;
    --warning: #fbbf24;
    --danger: #ef4444;

    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-mono: 'Fira Code', monospace;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(0, 240, 255, 0.08) 0%, transparent 50%);
    background-attachment: fixed;
}

/* Typography & Utilities */
h1,
h2,
h3,
h4 {
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

p {
    line-height: 1.6;
    color: var(--text-muted);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    font-family: var(--font-sans);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 0.95rem;
}

.btn-large {
    padding: 0.8rem 1.8rem;
    font-size: 1.1rem;
}

.full-width {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #0099ff);
    color: #000;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.glow-effect:hover,
.glow-on-hover:hover {
    box-shadow: 0 0 20px var(--primary-glow);
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    border-radius: 2px;
}

/* SPA Container */
#app-container {
    padding-top: 80px;
    /* navbar offset */
    min-height: 100vh;
    position: relative;
}

.view {
    display: none;
    padding: 4rem 5%;
    animation: fadeIn 0.5s ease forwards;
}

.view.active-view {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- HOME VIEW --- */
.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: calc(100vh - 160px);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #c4b5fd;
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--secondary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--secondary);
}

.hero-content .title {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
}

.hero-content .subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.cta-group {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    position: relative;
    width: 100%;
    perspective: 1000px;
}

.glass-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: rgba(0, 240, 255, 0.15);
    top: -50px;
    right: -50px;
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: rgba(124, 58, 237, 0.15);
    bottom: -50px;
    left: -50px;
}

.terminal-window {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.terminal-window:hover {
    transform: rotateY(0) rotateX(0);
}

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

.terminal-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.terminal-title {
    margin-left: auto;
    margin-right: auto;
    font-size: 0.85rem;
    color: #8b949e;
    font-family: var(--font-sans);
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
}

.terminal-body .prompt {
    color: var(--primary);
    font-weight: bold;
}

.terminal-body .log {
    color: #8b949e;
}

.terminal-body .warning {
    color: var(--warning);
    font-weight: bold;
}

.terminal-body .success {
    color: var(--success);
}

/* --- FEATURES VIEW --- */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.feature-card {
    padding: 2.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Workflow Diagram */
.workflow-diagram {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem;
    margin-top: 2rem;
}

.step {
    text-align: center;
    width: 150px;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #161b22;
    border: 2px solid #30363d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
    color: var(--text-muted);
}

.step-circle.highlight {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.step-circle.ai {
    border-color: var(--secondary);
    color: var(--secondary);
    box-shadow: 0 0 15px var(--secondary-glow);
}

.step-circle.final {
    border-color: var(--success);
    color: var(--success);
}

.connector {
    flex-grow: 1;
    height: 2px;
    background: #30363d;
    margin-top: -40px;
    position: relative;
    z-index: 1;
}

.connector.ai-flow {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0.5;
}

/* --- LIVE DEMO VIEW --- */
.demo-container {
    max-width: 1100px;
    margin: 0 auto;
}

.demo-header {
    margin-bottom: 2rem;
}

.demo-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.demo-interface {
    display: grid;
    grid-template-columns: 350px 1fr;
    min-height: 500px;
    overflow: hidden;
}

.demo-controls {
    padding: 2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1rem;
    border-radius: 6px;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.scan-status {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.scan-status h4 {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    transition: width 0.3s ease;
}

.vuln-stats {
    display: flex;
    gap: 0.5rem;
}

.stat-box {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.8rem 0.5rem;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.stat-box.high span {
    color: var(--danger);
    font-size: 1.2rem;
    display: block;
    margin-top: 0.2rem;
}

.stat-box.medium span {
    color: var(--warning);
    font-size: 1.2rem;
    display: block;
    margin-top: 0.2rem;
}

.stat-box.low span {
    color: var(--primary);
    font-size: 1.2rem;
    display: block;
    margin-top: 0.2rem;
}

.demo-output {
    display: flex;
    flex-direction: column;
}

.output-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.output-tabs .tab {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
}

.output-tabs .tab.active {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
    background: rgba(124, 58, 237, 0.05);
}

.output-window {
    flex-grow: 1;
    padding: 1.5rem;
    background: #0d1117;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    overflow-y: auto;
    max-height: 450px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    opacity: 0.5;
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* AI Explanations Components */
.ai-block {
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--secondary);
    padding-left: 1rem;
    animation: fadeIn 0.4s ease forwards;
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary);
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-family: var(--font-sans);
}

.vuln-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.vuln-title {
    color: var(--danger);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.zap-log {
    color: #8b949e;
    margin-bottom: 0.3rem;
}

/* Responsive */
@media (max-width: 900px) {

    .hero-container,
    .demo-interface {
        grid-template-columns: 1fr;
    }

    .hero-content .title {
        font-size: 3rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .workflow-diagram {
        flex-direction: column;
        gap: 2rem;
    }

    .connector {
        width: 2px;
        height: 40px;
        margin: 0;
    }
}