/* ============================================
   ClawSec - Skill 安全审计
   Theme: 浅色清新 + 龙虾红
   ============================================ */

:root {
    /* Lobster Red Palette */
    --lobster-50: #fff5f5;
    --lobster-100: #ffe3e3;
    --lobster-200: #ffc9c9;
    --lobster-300: #ffa8a8;
    --lobster-400: #ff8787;
    --lobster-500: #ff6b6b;
    --lobster-600: #fa5252;
    --lobster-700: #f03e3e;
    --lobster-800: #e03131;
    --lobster-900: #c92a2a;

    /* Primary accent */
    --primary: #e8524a;
    --primary-light: #ff7066;
    --primary-dark: #d63d35;
    --primary-bg: rgba(232, 82, 74, 0.08);

    /* Status colors */
    --safe: #12b886;
    --safe-light: #d3f9d8;
    --safe-bg: rgba(18, 184, 134, 0.08);

    --suspicious: #f59f00;
    --suspicious-light: #fff3bf;
    --suspicious-bg: rgba(245, 159, 0, 0.08);

    --malicious: #e8524a;
    --malicious-light: #ffe3e3;
    --malicious-bg: rgba(232, 82, 74, 0.08);

    /* Light theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f4;
    --bg-card: #ffffff;

    /* Text */
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #868e96;
    --text-light: #adb5bd;

    /* Borders */
    --border: #e9ecef;
    --border-light: #dee2e6;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1);

    /* Spacing */
    --nav-height: 64px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Hide scanlines in light theme */
.scanlines {
    display: none;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 28px;
}

.logo-icon-svg {
    width: 36px;
    height: auto;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

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

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

.nav-link {
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-link.active {
    color: var(--primary);
    background: var(--primary-bg);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switch {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 3px;
}

.lang-btn {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
}

.lang-btn:hover {
    color: var(--text-secondary);
}

.lang-btn.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Hero Links */
.hero-links {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

.btn-docs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-docs:hover {
    background: var(--primary);
    color: #fff;
}

.api-hint {
    font-size: 13px;
    color: var(--text-muted);
}

.api-hint code {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
}

/* Manual Audit Input Section */
.audit-input-section {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.audit-input-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.input-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.input-title svg {
    color: var(--primary);
}

.input-desc {
    color: var(--text-secondary);
    margin: 0 0 24px 0;
}

.audit-form {
    margin: 0;
}

.input-group {
    display: flex;
    gap: 12px;
}

.input-group input {
    flex: 1;
    padding: 14px 18px;
    font-size: 15px;
    font-family: var(--font-mono);
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.btn-audit {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-audit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-audit:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.btn-audit .spinner {
    animation: spin 1s linear infinite;
}

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

.input-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin: 12px 0 0 0;
}

/* Audit Result */
.audit-result {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border-left: 4px solid var(--safe);
}

.audit-result.suspicious {
    border-left-color: var(--suspicious);
}

.audit-result.malicious {
    border-left-color: var(--malicious);
}

.audit-result h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px 0;
    font-size: 16px;
}

.audit-result .verdict-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.audit-result .verdict-badge.safe {
    background: var(--safe-bg);
    color: var(--safe);
}

.audit-result .verdict-badge.suspicious {
    background: var(--suspicious-bg);
    color: var(--suspicious);
}

.audit-result .verdict-badge.malicious {
    background: var(--malicious-bg);
    color: var(--malicious);
}

.audit-result .result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.audit-result .detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.audit-result .detail-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.audit-result .detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.audit-result .view-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    background: var(--primary-bg);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.audit-result .view-report-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* Audit Error */
.audit-error {
    margin-top: 24px;
    padding: 16px 20px;
    background: var(--malicious-bg);
    border: 1px solid var(--malicious);
    border-radius: 12px;
    color: var(--malicious);
}

.audit-error p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* API Reference Section */
.api-reference-section {
    padding: 32px 0;
}

.api-reference-section .section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.api-reference-section .section-title svg {
    color: var(--primary);
}

.api-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.api-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.api-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(232, 82, 74, 0.1);
}

.api-card.link {
    text-decoration: none;
    cursor: pointer;
}

.api-card.link:hover {
    transform: translateY(-2px);
}

.api-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 4px;
    text-transform: uppercase;
}

.api-method.get {
    background: rgba(18, 184, 134, 0.15);
    color: var(--safe);
}

.api-method.post {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.api-method.docs {
    background: var(--primary-bg);
    color: var(--primary);
}

.api-path {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
}

.api-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Audit Result Enhanced */
.audit-result.success {
    border-left-color: var(--safe);
}

.audit-result.error {
    border-left-color: var(--malicious);
    background: var(--malicious-bg);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.risk-badge {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 20px;
    text-transform: uppercase;
}

.result-header.risk-safe .risk-badge {
    background: var(--safe-bg);
    color: var(--safe);
}

.result-header.risk-suspicious .risk-badge {
    background: var(--suspicious-bg);
    color: var(--suspicious);
}

.result-header.risk-malicious .risk-badge,
.result-header.risk-high .risk-badge {
    background: var(--malicious-bg);
    color: var(--malicious);
}

.result-header.risk-unknown .risk-badge {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.cache-badge {
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.result-body h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: var(--text-primary);
}

.result-summary {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.findings-list h5 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.findings-list ul {
    margin: 0;
    padding-left: 20px;
}

.findings-list li {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.findings-list li.finding-high,
.findings-list li.finding-critical {
    color: var(--malicious);
}

.findings-list li.finding-medium {
    color: var(--suspicious);
}

.more-findings {
    font-style: italic;
    color: var(--text-muted) !important;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-icon {
    font-size: 20px;
}

.error-message {
    font-size: 14px;
    color: var(--malicious);
}

/* GitHub Login Button */
.btn-github {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: #24292e;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: var(--font-sans);
}

.btn-github:hover {
    background: #2f363d;
    transform: translateY(-1px);
}

.btn-github svg {
    flex-shrink: 0;
}

/* Dashboard page styles */
.dashboard-container {
    max-width: 600px;
    margin: 100px auto;
    padding: 40px;
    text-align: center;
}

.api-key-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
}

.api-key-card.success {
    border-color: var(--safe);
    background: var(--safe-bg);
}

.key-display {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin: 16px 0;
}

.key-display code {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 14px;
    word-break: break-all;
}

.copy-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.copy-btn:hover {
    background: var(--primary-dark);
}

.warning {
    color: var(--suspicious);
    font-weight: 500;
    margin-top: 16px;
}

.usage-info {
    text-align: left;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px;
    margin: 24px 0;
}

.usage-info h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
}

.usage-info p {
    margin: 8px 0;
    color: var(--text-secondary);
}

.usage-info code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 13px;
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 14px;
    background: var(--safe-bg);
    border-radius: 20px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--safe);
}

.status-text {
    color: var(--safe);
    font-weight: 500;
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    padding-top: var(--nav-height);
    min-height: calc(100vh - 60px);
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Hero Section (Home)
   ============================================ */
.hero {
    position: relative;
    min-height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    background: linear-gradient(180deg, #fff 0%, var(--bg-secondary) 100%);
}

.hero.hero-compact {
    min-height: auto;
    padding: 40px 24px;
}

.hero-api-hint {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 16px;
}

.hero-api-hint code {
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
}

/* Home Stats */
.home-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: -20px auto 40px;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .home-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Audited Skills */
.audited-skills {
    max-width: 1000px;
    margin: 0 auto 40px;
    padding: 0 24px;
}

.skills-panel {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
    border-bottom: 1px solid var(--border);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary-bg);
    border-radius: 10px;
    color: var(--primary);
}

.panel-title h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.3px;
}

.panel-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
}

.pill-dot {
    width: 8px;
    height: 8px;
    background: var(--safe);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.pill-value {
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.pill-label {
    color: var(--text-muted);
}

.panel-search {
    position: relative;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.panel-search .search-icon {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.panel-search input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.panel-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-bg);
}

.panel-search input::placeholder {
    color: var(--text-light);
}

.skills-panel .skills-table {
    background: transparent;
    border-radius: 0;
    border: none;
}

.skills-table .table-header,
.skills-table .table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 16px;
    padding: 14px 24px;
}

.skills-table .table-header {
    background: var(--bg-tertiary);
    font-weight: 600;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.skills-table .table-row {
    border-top: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s ease;
}

.skills-table .table-row:hover {
    background: var(--bg-secondary);
}

.table-skill {
    font-weight: 500;
    color: var(--text-primary);
}

.table-source {
    color: var(--text-muted);
}

.table-verdict {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

.table-verdict.safe { color: var(--safe); }
.table-verdict.suspicious { color: var(--suspicious); }
.table-verdict.malicious { color: var(--malicious); }

.table-score {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
}

.grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(232, 82, 74, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(232, 82, 74, 0.04) 0%, transparent 40%);
}

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

.hero-title {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.title-line {
    display: block;
}

.title-line.accent {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-weight: 400;
}

/* Audit Form */
.audit-form {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.input-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 6px;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-md);
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-bg), var(--shadow-lg);
}

.input-icon {
    padding: 0 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.audit-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    background: none;
    border: none;
    outline: none;
    font-size: 16px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    padding: 14px 0;
}

.audit-input::placeholder {
    color: var(--text-light);
}

.audit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
}

.audit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(232, 82, 74, 0.3);
}

.audit-btn:active {
    transform: translateY(0);
}

.audit-btn .btn-icon {
    display: flex;
}

.input-hint {
    margin-top: 14px;
    font-size: 14px;
    color: var(--text-muted);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

@media (max-width: 768px) {
    .features {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-light);
}

.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: 16px;
    color: var(--primary);
    margin: 0 auto 18px;
}

.feature-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================
   Scanning State
   ============================================ */
#page-scanning {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}

.scanning-container {
    text-align: center;
    padding: 24px;
}

.scanner {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 32px;
}

.scanner-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 2px solid var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: scanner-pulse 2s ease-out infinite;
    opacity: 0.6;
}

.scanner-ring.delay-1 { animation-delay: 0.5s; }
.scanner-ring.delay-2 { animation-delay: 1s; }

@keyframes scanner-pulse {
    0% { width: 60px; height: 60px; opacity: 0.6; }
    100% { width: 160px; height: 160px; opacity: 0; }
}

.scanner-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: var(--primary-bg);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.scanning-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.scanning-url {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    word-break: break-all;
}

.scanning-progress {
    max-width: 420px;
    margin: 0 auto;
}

.progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 3px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
}

.progress-steps .step {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s ease;
}

.progress-steps .step.active {
    color: var(--primary);
}

.progress-steps .step.completed {
    color: var(--safe);
}

/* ============================================
   Report Page
   ============================================ */
.report-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.report-header {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.verdict-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 28px;
    border-radius: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.verdict-badge.safe {
    background: var(--safe-light);
    color: var(--safe);
}

.verdict-badge.suspicious {
    background: var(--suspicious-light);
    color: var(--suspicious);
}

.verdict-badge.malicious {
    background: var(--malicious-light);
    color: var(--malicious);
}

.verdict-icon {
    font-size: 28px;
}

.verdict-text {
    font-size: 13px;
    letter-spacing: 1px;
}

.report-meta {
    flex: 1;
    min-width: 0;
}

.report-skill-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.report-skill-url {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
    word-break: break-all;
}

.report-info {
    display: flex;
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.info-item svg {
    color: var(--text-light);
}

/* Score Ring */
.report-score {
    flex-shrink: 0;
}

.score-ring {
    position: relative;
    width: 90px;
    height: 90px;
}

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

.score-bg {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 7;
}

.score-fill {
    fill: none;
    stroke: var(--safe);
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1s ease, stroke 0.3s ease;
}

.score-ring.suspicious .score-fill { stroke: var(--suspicious); }
.score-ring.malicious .score-fill { stroke: var(--malicious); }

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.score-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* Report Sections */
.report-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.section-title svg {
    color: var(--primary);
}

/* Threats List */
.threats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.threat-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border-left: 4px solid;
}

.threat-item.high { border-color: var(--malicious); }
.threat-item.medium { border-color: var(--suspicious); }
.threat-item.low { border-color: var(--text-light); }

.threat-severity {
    flex-shrink: 0;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
}

.threat-item.high .threat-severity {
    background: var(--malicious-light);
    color: var(--malicious);
}

.threat-item.medium .threat-severity {
    background: var(--suspicious-light);
    color: var(--suspicious);
}

.threat-item.low .threat-severity {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.threat-content { flex: 1; min-width: 0; }

.threat-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.threat-evidence {
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 10px 14px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid var(--border);
    word-break: break-all;
}

/* ATT&CK Tags */
.attack-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.attack-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono, monospace);
    color: #1a73e8;
    background: #e8f0fe;
    padding: 2px 7px;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid #c5daf5;
    transition: background 0.15s;
}

.attack-tag:hover {
    background: #d0e1f9;
    color: #0d47a1;
}

.result-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.no-threats-inline {
    color: var(--safe, #2e7d32);
    font-weight: 500;
}

/* LLM Analysis */
.llm-analysis {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.analysis-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.analysis-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.analysis-value {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.risk-factors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.risk-tag {
    padding: 6px 14px;
    background: var(--suspicious-light);
    color: var(--suspicious);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
}

/* Sandbox Results */
.sandbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.sandbox-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 18px;
}

.sandbox-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-secondary);
}

.sandbox-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sandbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.sandbox-item-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 12px;
    flex-shrink: 0;
}

.sandbox-item-icon.warn {
    background: var(--suspicious-light);
    color: var(--suspicious);
}

.sandbox-item-icon.info {
    background: #e7f5ff;
    color: #1c7ed6;
}

.sandbox-item-label {
    color: var(--text-muted);
    width: 90px;
    flex-shrink: 0;
}

.sandbox-item-value {
    color: var(--text-secondary);
    font-size: 13px;
}

.sandbox-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.metric-item {
    text-align: center;
    padding: 14px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.metric-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Report Actions */
.report-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.action-btn.primary {
    background: var(--primary);
    color: white;
}

.action-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(232, 82, 74, 0.25);
}

.action-btn.secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.action-btn.secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

/* ============================================
   Stats Page
   ============================================ */
.stats-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.stats-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
    color: var(--text-primary);
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

@media (max-width: 800px) {
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    background: var(--primary-bg);
    border-radius: 12px;
    color: var(--primary);
}

.stat-card.safe .stat-icon { background: var(--safe-bg); color: var(--safe); }
.stat-card.suspicious .stat-icon { background: var(--suspicious-bg); color: var(--suspicious); }
.stat-card.malicious .stat-icon { background: var(--malicious-bg); color: var(--malicious); }

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

.stat-card.safe .stat-value { color: var(--safe); }
.stat-card.suspicious .stat-value { color: var(--suspicious); }
.stat-card.malicious .stat-value { color: var(--malicious); }

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

/* Charts */
.stats-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

@media (max-width: 800px) {
    .stats-charts { grid-template-columns: 1fr; }
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.chart-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.chart-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 160px;
    padding-top: 16px;
}

.chart-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.bar-wrapper {
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.bar {
    width: 28px;
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
    border-radius: 6px 6px 0 0;
    transition: height 0.5s ease;
}

.bar-label {
    font-size: 12px;
    color: var(--text-muted);
}

.threat-dist {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.dist-label {
    width: 90px;
    font-size: 14px;
    color: var(--text-secondary);
}

.dist-bar-wrapper {
    flex: 1;
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: 5px;
    overflow: hidden;
}

.dist-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.dist-value {
    width: 36px;
    text-align: right;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Recent Audits */
.recent-audits {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.audits-table {
    overflow: hidden;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 90px 100px;
    gap: 16px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.table-body {
    display: flex;
    flex-direction: column;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 90px 100px;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
    cursor: pointer;
    align-items: center;
}

.table-row:hover {
    background: var(--bg-secondary);
}

.table-row:last-child {
    border-bottom: none;
}

.table-skill {
    font-weight: 500;
    color: var(--text-primary);
}

.table-source {
    color: var(--text-muted);
    font-size: 14px;
}

.table-verdict {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    text-align: center;
}

.table-verdict.safe { background: var(--safe-light); color: var(--safe); }
.table-verdict.suspicious { background: var(--suspicious-light); color: var(--suspicious); }
.table-verdict.malicious { background: var(--malicious-light); color: var(--malicious); }

.table-time {
    color: var(--text-muted);
    font-size: 13px;
}

/* ============================================
   Rules Page
   ============================================ */
.rules-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.rules-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.rules-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.rules-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 36px;
}

.rule-stat {
    text-align: center;
}

.rule-stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.rule-stat-value.verified { color: var(--safe); }
.rule-stat-value.provisional { color: var(--suspicious); }
.rule-stat-value.deprecated { color: var(--text-light); }

.rule-stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

.rules-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.rule-item:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
}

.rule-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rule-status.verified { background: var(--safe); }
.rule-status.provisional { background: var(--suspicious); }
.rule-status.deprecated { background: var(--text-light); }

.rule-id {
    width: 110px;
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
    flex-shrink: 0;
}

.rule-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.rule-severity {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
}

.rule-severity.critical { background: var(--malicious-light); color: var(--malicious); }
.rule-severity.high { background: #fff4e6; color: #e67700; }
.rule-severity.medium { background: var(--suspicious-light); color: var(--suspicious); }
.rule-severity.low { background: var(--bg-tertiary); color: var(--text-muted); }

.rule-stats {
    display: flex;
    gap: 14px;
    font-size: 13px;
    color: var(--text-muted);
}

.rule-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rule-stats .tp { color: var(--safe); }
.rule-stats .fp { color: var(--malicious); }

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 20px 24px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-brand {
    font-weight: 600;
    color: var(--primary);
}

.footer-divider {
    opacity: 0.4;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .report-header {
        flex-direction: column;
        text-align: center;
    }

    .report-info {
        justify-content: center;
    }

    .rules-stats {
        flex-wrap: wrap;
        gap: 24px;
    }

    .table-header,
    .table-row {
        grid-template-columns: 1fr 80px;
    }

    .table-source,
    .table-time {
        display: none;
    }
}

/* No threats state */
.no-threats {
    text-align: center;
    padding: 32px;
    color: var(--safe);
}

.no-threats-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.no-threats-text {
    font-size: 16px;
    font-weight: 500;
}

/* Audit progress indicator */
.audit-progress {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: #f0f7ff;
    border-left: 3px solid #3b82f6;
    border-radius: 0 6px 6px 0;
    font-size: 0.9rem;
    color: #1e40af;
}
.progress-step.active {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.progress-step.active::before {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid #3b82f6;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
