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

:root {
    /* Engineering Palette - High Contrast */
    --bg-root: #050505;
    --bg-card: #0F0F0F;
    --bg-input: #171717;

    --border-subtle: #262626;
    --border-strong: #404040;

    --text-primary: #FAFAFA;
    --text-secondary: #A3A3A3;
    --text-tertiary: #525252;

    --accent: #FFFFFF;
    --accent-text: #000000;

    --success: #22C55E;
    --danger: #EF4444;

    --font-sans: 'Inter', -apple-system, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius: 8px;

    /* Risk Gradient Scale */
    --risk-1: #22C55E;
    /* Low */
    --risk-2: #84CC16;
    --risk-3: #EAB308;
    /* Med */
    --risk-4: #F97316;
    --risk-5: #EF4444;
    /* High */

    /* React Bits Enhancements */
    --grid-color: rgba(255, 255, 255, 0.05);
    --spotlight-color: rgba(255, 255, 255, 0.08);
}

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

body {
    background-color: var(--bg-root);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--text-primary);
}

.container {
    width: 100%;
    max-width: 800px;
    /* Tighter container for better readability */
    margin: 0 auto;
    padding: 0 24px;
}

/* --- NAVIGATION ZONE --- */
.navbar {
    border-bottom: 1px solid var(--border-subtle);
    padding: 20px 0;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.brand-badge {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    color: var(--text-secondary);
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    font-size: 13px;
    color: var(--text-secondary);
}

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

/* --- HERO ZONE --- */
.hero {
    padding: 80px 0 40px;
    text-align: left;
    /* Aligned left for "engineer" feel */
}

.hero h1 {
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 580px;
    margin-bottom: 24px;
}

.tagline-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
}

/* --- WORKSPACE ZONE (Input & Analysis) --- */
.workspace {
    margin-bottom: 80px;
}

.control-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.panel-header {
    border-bottom: 1px solid var(--border-subtle);
    margin: -32px -32px 24px -32px;
    padding: 16px 32px;
    background: linear-gradient(to bottom, var(--bg-card), var(--bg-input));
    border-radius: var(--radius) var(--radius) 0 0;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
    font-weight: 600;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    background: var(--bg-root);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 12px;
    font-family: var(--font-sans);
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s;
    /* Prevent long URLs from breaking layout */
    text-overflow: ellipsis;
}

input:focus {
    outline: none;
    border-color: var(--text-secondary);
    background: var(--bg-input);
}

button.primary-btn {
    width: 100%;
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

button.primary-btn:hover {
    opacity: 0.9;
}

button.primary-btn:active {
    transform: translateY(1px);
}

/* --- OUTPUT AREA --- */
/* --- OUTPUT AREA (Refined 2025 Look) --- */
.console-log {
    margin-top: 40px;
}

.result-block {
    /* 2025 SaaS Aesthetic: Deep subtle gradient, crisp borders */
    background: linear-gradient(180deg, rgba(23, 23, 23, 0.6) 0%, rgba(10, 10, 10, 0.4) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    /* Softer, modern radius */
    padding: 32px;
    /* More breathing room */
    margin-bottom: 24px;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);

    /* Ensure content wraps */
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
}

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

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

.result-title {
    font-size: 13px;
    font-family: var(--font-mono);
    font-weight: 500;
    margin-bottom: 24px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Very subtle separator */
    padding-bottom: 16px;
}

.result-content {
    font-size: 15px;
    /* Slightly larger for readability */
    color: #cecece;
    /* Softer white */
    line-height: 1.7;
    overflow-x: auto;
}

.result-content strong {
    color: var(--text-primary);
}

.result-content ul,
.result-content ol {
    padding-left: 20px;
    margin-bottom: 16px;
}

.result-content li {
    margin-bottom: 8px;
}

/* --- DASHBOARD WIDGETS (2025 Layouts) --- */

/* Grids */
.dashboard-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.dashboard-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

/* Stat Cards */
.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

/* Feature/Keyword Pills */
.pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.tag-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tag-pill.positive {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.tag-pill.negative {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Risk Progress Bars */
.risk-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
}

.risk-label {
    flex: 1;
    color: var(--text-secondary);
}

.risk-score {
    width: 40px;
    text-align: right;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-track {
    flex: 2;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 0 12px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease-out;
}

/* Score Colors - Fallbacks if inline style missing */
.score-1 .progress-fill {
    background: var(--risk-1);
    width: 20%;
}

.score-2 .progress-fill {
    background: var(--risk-2);
    width: 40%;
}

.score-3 .progress-fill {
    background: var(--risk-3);
    width: 60%;
}

.score-4 .progress-fill {
    background: var(--risk-4);
    width: 80%;
}

.score-5 .progress-fill {
    background: var(--risk-5);
    width: 100%;
}

/* Typography Overrides */
.result-content h3 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 32px 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-content i {
    vertical-align: text-bottom;
}

@media (max-width: 600px) {

    .dashboard-grid-2,
    .dashboard-grid-3 {
        grid-template-columns: 1fr;
    }
}

.result-block.verdict-sell {
    border-color: rgba(34, 197, 94, 0.2);
    background: rgba(34, 197, 94, 0.03);
}

.result-block.verdict-dont {
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.03);
}

/* --- INFO ZONE --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 80px;
}

.feature h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature p {
    font-size: 13px;
    color: var(--text-tertiary);
    max-width: 240px;
}

/* --- FOOTER ZONE --- */
footer {
    border-top: 1px solid var(--border-subtle);
    padding: 32px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-tertiary);
}

.social-link {
    color: var(--text-secondary);
    font-weight: 500;
}

@media (max-width: 600px) {

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

    .hero h1 {
        font-size: 28px;
    }
}

/* --- REACT BITS INSPIRED UTILITIES --- */

/* 1. Grid Backdrop */
.grid-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
    pointer-events: none;
    z-index: -1;
}

/* 2. Spotlight Card */
.spotlight-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.spotlight-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle 250px at var(--mouse-x, 50%) var(--mouse-y, 50%),
            var(--spotlight-color),
            transparent 80%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.spotlight-card:hover::before {
    opacity: 1;
}

.spotlight-card:hover {
    border-color: var(--border-strong);
}

/* 3. Shiny Text */
.shiny-text {
    background: linear-gradient(120deg,
            rgba(255, 255, 255, 0) 40%,
            rgba(255, 255, 255, 0.8) 50%,
            rgba(255, 255, 255, 0) 60%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: rgba(255, 255, 255, 0.2);
    animation: shiny 3s infinite;
}

@keyframes shiny {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

/* 4. Split Navigation / Modern Link */
.nav-link-modern {
    position: relative;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 8px 0;
}

.nav-link-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--success);
    transition: width 0.3s ease;
}

.nav-link-modern:hover::after {
    width: 100%;
}

.nav-link-modern:hover {
    color: var(--text-primary);
}

/* Adjustments for Landing Page v3 */
.landing-v3 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* --- LANDING V3 SEMANTIC CLASSES --- */
.main-nav {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
}

.nav-cta {
    padding: 10px 24px;
    border-radius: 8px;
    color: #000;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.05em;
    background: var(--accent);
}

.hero-section {
    padding: 140px 0 100px;
    text-align: center;
}

.stability-badge {
    padding: 8px 16px;
    border-radius: 100px;
    display: inline-flex;
    margin-bottom: 32px;
    background: rgba(255, 255, 255, 0.02);
}

.hero-title {
    font-size: 72px;
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
    line-height: 1.1;
}

.velocity-text {
    background: linear-gradient(to bottom, #fff, #444);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 48px;
    line-height: 1.6;
}

.hero-ctas {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.pillars-section {
    padding-bottom: 120px;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 12px;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.operator-section {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 32px;
    padding: 100px 60px;
    margin-bottom: 120px;
}

.operator-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
}

.section-p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.operator-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.feature-item i {
    color: var(--success);
    font-size: 20px;
}

.feature-item span {
    font-size: 14px;
    color: var(--text-primary);
}

.operator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.operator-card {
    padding: 32px;
    background: rgba(5, 5, 5, 0.4);
}

.card-title {
    margin-bottom: 8px;
    color: var(--success);
}

.card-p {
    font-size: 13px;
    color: var(--text-tertiary);
}

.main-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding: 60px 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-tertiary);
    font-size: 13px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* --- MOBILE OPTIMIZATION (v1.5) --- */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
        /* Tighter for mobile */
    }

    /* 1. Mobile Navigation (Burger Menu) */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 5, 0.98);
        flex-direction: column;
        padding: 40px 20px;
        gap: 24px;
        border-bottom: 1px solid var(--border-subtle);
        backdrop-filter: blur(20px);
    }

    #menu-toggle:checked~.nav-links {
        display: flex;
    }

    .menu-icon {
        display: block !important;
        font-size: 28px;
        cursor: pointer;
        color: var(--text-primary);
        padding: 5px;
    }

    /* 2. Hero Component Scaling */
    .hero-section {
        padding: 80px 20px;
        text-align: center;
    }

    .hero-title {
        font-size: 38px !important;
        margin-bottom: 16px;
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 32px;
    }

    .hero-ctas {
        flex-direction: column;
        gap: 12px;
    }

    .btn-large {
        width: 100%;
        justify-content: center;
    }

    /* 3. Universal Grid Stacking */
    .pillars-grid,
    .operator-content,
    .operator-grid,
    .features-grid,
    .dashboard-grid-2,
    .dashboard-grid-3,
    .input-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .pillars-grid>div {
        grid-column: span 1 !important;
    }

    /* 4. Section Adjustments */
    .pillars-section,
    .operator-section {
        padding: 60px 20px !important;
        margin-bottom: 60px;
    }

    .operator-section {
        border-radius: 16px;
    }

    .section-title {
        font-size: 28px !important;
    }

    .section-p {
        font-size: 15px;
    }

    /* 5. Footer Scaling */
    .footer-links {
        flex-direction: column;
        gap: 32px;
        padding: 0 20px;
    }

    .legal-links {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
}

/* Base state for menu toggle (hidden) */
#menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
}