/* Design System Tokens */
:root {
    --color-bg-dark: #090d16;
    --color-bg-card: rgba(17, 24, 39, 0.7);
    --color-bg-card-hover: rgba(26, 36, 57, 0.85);
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-glow: rgba(139, 92, 246, 0.4);
    --color-primary: #8b5cf6; /* Indigo / Violet */
    --color-primary-glow: rgba(139, 92, 246, 0.15);
    --color-secondary: #06b6d4; /* Cyan */
    --color-text-main: #f3f4f6;
    --color-text-muted: #9ca3af;
    --color-text-dark: #1f2937;
    
    --color-green: #10b981;
    --color-green-glow: rgba(16, 185, 129, 0.15);
    --color-yellow: #f59e0b;
    --color-yellow-glow: rgba(245, 158, 11, 0.15);
    --color-red: #ef4444;
    --color-red-glow: rgba(239, 68, 68, 0.15);
    
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg-dark);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typographic Defaults */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.badge-center {
    display: block;
    width: fit-content;
    margin: 0 auto 1.5rem auto;
}

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

/* Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(9, 13, 22, 0.75);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 80px;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

.logo-icon {
    color: var(--color-primary);
    font-size: 1.25rem;
}

.logo-text .dot {
    color: var(--color-secondary);
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
}

.nav-menu a {
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-menu a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #7c3aed);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

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

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

.btn-block {
    display: width;
    width: 100%;
}

.btn-tiny {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid var(--color-border);
}

.btn-tiny:hover {
    background: var(--color-primary);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 180px 0 100px 0;
    text-align: center;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 70%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, rgba(6, 182, 212, 0.05) 50%, rgba(9, 13, 22, 0) 100%);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
}

/* Scan Console styling */
.scan-console-wrapper {
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 680px;
    margin: 0 auto 3rem auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
}

.scan-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.input-icon {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    padding-left: 0.5rem;
}

.scan-form input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 1.1rem;
    font-family: var(--font-sans);
}

.scan-form input::placeholder {
    color: #555c68;
}

.btn-scan {
    padding: 0.85rem 2rem;
}

/* Console Loader */
.console-loader {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.loader-circle {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin-bottom: 1rem;
}

.loader-status-text {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
    font-family: var(--font-heading);
}

.loader-progress-bar {
    width: 80%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 999px;
    transition: width 0.1s linear;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-trust {
    display: flex;
    justify-content: center;
    gap: 3rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Dashboard Section */
.dashboard-section {
    padding: 80px 0;
    background: radial-gradient(100% 50% at 50% 0%, rgba(139, 92, 246, 0.08) 0%, rgba(9, 13, 22, 0) 100%);
    border-top: 1px solid var(--color-border);
    animation: fadeInUp 0.6s ease-out forwards;
}

.hidden {
    display: none !important;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.section-desc {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    max-width: 600px;
}

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

/* Dashboard Cards Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dash-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.75rem;
    backdrop-filter: blur(8px);
    transition: var(--transition-smooth);
}

.dash-card:hover {
    background: var(--color-bg-card-hover);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.main-score-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.main-score-card h3 {
    margin-bottom: 1.25rem;
    font-size: 1.15rem;
    color: var(--color-text-muted);
}

/* SVG Gauge */
.gauge-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin-bottom: 1rem;
}

.gauge {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.gauge-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8;
}

.gauge-fill {
    fill: none;
    stroke: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    stroke: var(--color-primary); /* Fallback */
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 251.2; /* 2 * PI * r (r=40) */
    stroke-dashoffset: 251.2; /* Start at 0% */
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.25rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: baseline;
}

.gauge-value .pct {
    font-size: 1rem;
    color: var(--color-text-muted);
}

.score-status {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Mini Vitals */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h4 {
    font-size: 1.05rem;
    color: var(--color-text-muted);
}

.vital-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-green {
    background: var(--color-green-glow);
    color: var(--color-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-yellow {
    background: var(--color-yellow-glow);
    color: var(--color-yellow);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.vital-number {
    font-size: 2.75rem;
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.text-green { color: var(--color-green); }
.text-yellow { color: var(--color-yellow); }

.progress-bar-flat {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 99px;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.fill-flat {
    height: 100%;
    border-radius: 99px;
}

.bg-green { background-color: var(--color-green); }
.bg-yellow { background-color: var(--color-yellow); }

.card-hint {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Detailed report columns */
.report-details-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
}

.checklists-card h3, .charts-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
}

.action-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.action-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.action-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.action-item.critical .action-marker {
    background: var(--color-red-glow);
    color: var(--color-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.action-item.warning .action-marker {
    background: var(--color-yellow-glow);
    color: var(--color-yellow);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.action-item.notice .action-marker {
    background: var(--color-green-glow);
    color: var(--color-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.action-content {
    flex: 1;
}

.action-content h5 {
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.action-content p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Charts */
.chart-container {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.traffic-chart {
    width: 100%;
    height: 100%;
}

.chart-grid-line {
    stroke: rgba(255, 255, 255, 0.04);
    stroke-width: 1;
    stroke-dasharray: 4,4;
}

.chart-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

.chart-area {
    opacity: 0;
    animation: fadeIn 1s 1.5s ease-out forwards;
}

.chart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

.chart-footer .stat {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.chart-footer .stat strong {
    color: #ffffff;
}

.growth-label {
    font-size: 0.85rem;
    font-weight: 700;
}

/* Features Grid */
.features-section {
    padding: 100px 0;
    border-top: 1px solid var(--color-border);
}

.text-center { text-align: center; }
.badge-center { margin-left: auto; margin-right: auto; }

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

.feature-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-border-glow);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* Pricing Grid */
.pricing-section {
    padding: 100px 0;
    border-top: 1px solid var(--color-border);
    background: linear-gradient(180deg, rgba(9, 13, 22, 0) 0%, rgba(139, 92, 246, 0.03) 100%);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    align-items: stretch;
}

.pricing-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition-smooth);
}

.pricing-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.pricing-card.popular {
    border: 2px solid var(--color-primary);
    box-shadow: 0 10px 35px rgba(139, 92, 246, 0.15);
    background: rgba(17, 24, 39, 0.85);
}

.popular-tag {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-primary);
    color: #ffffff;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.price {
    font-size: 3rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.price span {
    font-size: 1.15rem;
    color: var(--color-text-muted);
}

.price-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.price-features {
    list-style: none;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.price-features li {
    font-size: 0.95rem;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-features li::before {
    content: "✓";
    color: var(--color-secondary);
    font-weight: 700;
}

.pricing-card .btn {
    margin-top: auto;
}

/* Footer styling */
.app-footer-bottom {
    border-top: 1px solid var(--color-border);
    padding: 2.5rem 0;
    background-color: #05070a;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a:hover {
    color: #ffffff;
}

/* Animations helper */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Responsiveness */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
    .report-details-grid {
        grid-template-columns: 1fr;
    }
    .features-grid, .pricing-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .pricing-card {
        padding: 2.5rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    .hero-trust {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    .scan-form {
        flex-direction: column;
    }
    .btn-scan {
        width: 100%;
    }
}
