/* =================================================================
   AUDIT PAGE STYLES (System Diagnostic Protocol)
   ================================================================= */

/* ----------------------------------
   LAYOUT & BACKGROUNDS
   ---------------------------------- */
.audit-page {
    background-color: #02040a; /* Darker than global bg */
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
    padding-top: 80px; /* Account for header */
}

.audit-hero {
    position: relative;
    padding: 60px 0 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.audit-grid-bg {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(34, 197, 94, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 197, 94, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
    pointer-events: none;
}

.audit-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.08), transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

/* ----------------------------------
   CONSOLE WRAPPER
   ---------------------------------- */
.audit-console-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.console-status-bar {
    display: flex;
    justify-content: space-between;
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--color-accent);
    margin-bottom: 15px;
    opacity: 0.8;
    padding: 0 10px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blink-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--color-accent);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ----------------------------------
   THE CONSOLE
   ---------------------------------- */
.audit-console {
    background: rgba(10, 15, 25, 0.95);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(34, 197, 94, 0.1);
    backdrop-filter: blur(20px);
    overflow: hidden;
    transition: height 0.4s ease;
}

.console-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.traffic-lights {
    position: absolute;
    left: 20px;
    display: flex;
    gap: 8px;
}

.traffic-lights span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
}

.traffic-lights span:nth-child(1) { background-color: #ef4444; }
.traffic-lights span:nth-child(2) { background-color: #eab308; }
.traffic-lights span:nth-child(3) { background-color: #22c55e; }

.console-title {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.console-screen {
    padding: 40px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Views */
.console-view {
    display: none;
    width: 100%;
    animation: fadeIn 0.5s ease;
}

.console-view.active {
    display: block;
}

.console-heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 10px;
    text-align: center;
}

.console-sub {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 30px;
    font-size: 1rem;
}

/* Input Group */
.audit-input-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
}

.url-input-wrapper, .email-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0 20px;
    transition: border-color 0.3s ease;
}

.url-input-wrapper:focus-within, .email-input-wrapper:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.1);
}

.protocol-prefix {
    color: var(--color-text-muted);
    font-family: monospace;
    font-size: 1rem;
    margin-right: 5px;
}

.email-input-wrapper i {
    color: var(--color-text-muted);
    margin-right: 10px;
}

.audit-input-group input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-family: monospace;
    font-size: 1rem;
    padding: 16px 0;
    outline: none;
}

.btn-audit-run {
    background: var(--color-accent);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 16px;
    font-family: monospace;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-audit-run:hover {
    background: #4ade80;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

/* Terminal Output (Scanning) */
.terminal-output {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--color-accent);
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 150px;
}

.terminal-line {
    display: block;
    margin-bottom: 5px;
}

.scan-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.scan-bar {
    width: 0%;
    height: 100%;
    background: var(--color-accent);
    box-shadow: 0 0 10px var(--color-accent);
    transition: width 0.1s linear;
}

/* Vector Selection */
.vector-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.vector-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--color-text-muted);
}

.vector-card i {
    font-size: 1.5rem;
}

.vector-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

.vector-card.active {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--color-accent);
    color: #fff;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.1);
}

.btn-audit-next {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: monospace;
    cursor: pointer;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-audit-next:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Success View */
.success-icon {
    font-size: 4rem;
    color: var(--color-accent);
    margin-bottom: 20px;
    text-align: center;
    filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.3));
}

#view-success .btn-audit-next {
    text-decoration: none;
    display: inline-flex;
}

/* ----------------------------------
   AUDIT LAYERS SECTION
   ---------------------------------- */
.audit-layers {
    padding: 100px 0;
    background: #050816;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.layers-header {
    text-align: center;
    margin-bottom: 60px;
}

.layers-header .tagline {
    display: block;
    font-family: monospace;
    color: var(--color-accent);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.layers-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.layers-header p {
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.layers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.layer-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.layer-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.04);
}

.layer-num {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: 20px;
    right: 20px;
    line-height: 1;
}

.layer-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.layer-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* ----------------------------------
   HEADER & FOOTER OVERRIDES
   ---------------------------------- */
.c-nav__link.help-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 10px 24px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.c-nav__link.help-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.e-header-override {
    top: 0;
    padding: 0;
}

.e-nav-override {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(5, 8, 22, 0.9);
    margin: 0;
    padding: 0 40px;
    backdrop-filter: blur(15px);
}

.e-simple-footer {
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--color-bg);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.e-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.e-footer-links {
    display: flex;
    gap: 20px;
}

.e-footer-links a {
    color: var(--color-text-muted);
    transition: color 0.3s ease;
}

.e-footer-links a:hover {
    color: #fff;
}

/* ----------------------------------
   RESPONSIVE
   ---------------------------------- */
@media (max-width: 768px) {
    .audit-hero {
        padding: 40px 0 80px;
    }

    .console-screen {
        padding: 30px 20px;
    }

    .console-heading {
        font-size: 1.5rem;
    }

    .vector-grid {
        grid-template-columns: 1fr;
    }

    .layers-grid {
        grid-template-columns: 1fr;
    }

    .audit-console-wrapper {
        padding: 0 10px;
    }

    .e-nav-override {
        padding: 0 20px;
    }
    
    .e-footer-content {
        flex-direction: column;
        text-align: center;
    }
}