/* Global Reset & Base Variables */
:root {
    --bg-main: #0B0F19;
    --bg-card: rgba(17, 24, 39, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    --primary: #4F46E5;
    --primary-glow: rgba(79, 70, 229, 0.4);
    --accent: #06B6D4;
    --accent-glow: rgba(6, 182, 212, 0.4);
    
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
    --text-inverse: #ffffff;
    
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

html {
    scroll-behavior: smooth;
}

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

/* Container Utility */
.navbar, .hero-container, .features, .playground-section, .docs-section, .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism Card Style */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition);
}
.card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

/* Common Text Gradients */
.gradient-text {
    background: linear-gradient(135deg, #a5b4fc 0%, #818cf8 50%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.accent {
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

/* Navigation */
.navbar {
    height: 80px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    z-index: 100;
}
.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}
.nav-icon {
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
}
.nav-links a:hover {
    color: var(--text-main);
}
.github-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.github-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Hero Section */
.hero {
    position: relative;
    padding-top: 6rem;
    padding-bottom: 8rem;
    text-align: center;
}
.hero-bg-glow {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, rgba(6, 182, 212, 0.08) 50%, transparent 100%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
.hero-tag {
    display: inline-block;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.3);
    color: #a5b4fc;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1;
}
.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}
.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    position: relative;
    z-index: 1;
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    position: relative;
    z-index: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}
.btn-primary {
    background: var(--primary);
    color: var(--text-inverse);
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}
.btn-block {
    width: 100%;
    justify-content: center;
}
.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    color: var(--text-main);
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}
.btn-icon:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}
.btn-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Section Header styling */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}
.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Features Grid */
.features {
    padding-top: 4rem;
    padding-bottom: 6rem;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    transition: var(--transition);
}
.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(79, 70, 229, 0.4);
    box-shadow: 0 12px 30px -15px var(--primary-glow);
}
.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(79, 70, 229, 0.1);
    color: #818cf8;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}
.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Playground General Layout */
.playground-section {
    padding-top: 4rem;
    padding-bottom: 6rem;
}
.auth-bar {
    margin-bottom: 2rem;
    padding: 1.5rem 2rem !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}
.auth-section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}
.auth-section label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.auth-divider {
    width: 1px;
    height: 50px;
    background: var(--border-color);
}
.auth-input-group {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 1rem;
    width: 100%;
    transition: var(--transition);
}
.auth-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.25);
}
.auth-icon {
    color: var(--text-muted);
    margin-right: 0.75rem;
}
.auth-input-group input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    padding: 0.6rem 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    flex: 1;
    min-width: 0;
}
.auth-input-group.has-btn {
    padding-right: 0.3rem;
}
.auth-input-group #get-trial-key-btn {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: none;
    flex-shrink: 0;
    margin-left: 0.5rem;
}
.register-success-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0;
    animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
}

.playground-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
}

/* Configurator Form Styling */
.config-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.config-panel h3, .output-panel h3 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
input[type="url"], select, textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition);
}
input[type="url"]:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.25);
    outline: none;
}
select option {
    background-color: var(--bg-main);
    color: var(--text-main);
}
.checkbox-group {
    align-items: center;
    justify-content: space-between;
    flex-direction: row !important;
}
/* Toggle Switch Custom style */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
.toggle-switch input:checked + .slider {
    background-color: var(--primary);
}
.toggle-switch input:checked + .slider:before {
    transform: translateX(24px);
}

/* Schema Field Generator Styling */
.schema-section {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.1);
}
.schema-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.schema-header h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.fields-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.5rem;
}
.field-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    animation: slideIn 0.25s ease-out;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
.field-row input[type="text"] {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: var(--text-main);
    font-size: 0.85rem;
}
.field-row input[type="text"]:focus {
    border-color: var(--accent);
    outline: none;
}
.field-name { flex: 1.2; }
.field-type { width: 100px; height: 35px; padding: 0 0.5rem !important; font-size: 0.85rem !important; }
.field-desc { flex: 2; }
.btn-remove-field {
    background: transparent;
    border: none;
    color: var(--error);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1rem;
    transition: var(--transition);
}
.btn-remove-field:hover {
    color: #f87171;
    transform: scale(1.1);
}

/* Output Panel Styling */
.output-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 550px;
}
.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.output-content {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: auto;
    font-family: var(--font-mono);
}
.output-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    height: 100%;
    gap: 1rem;
}
.output-icon {
    font-size: 3rem;
    opacity: 0.25;
}
.output-json {
    font-size: 0.85rem;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Skeleton Loading / CSS Animations */
.output-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1.5rem;
}
.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(79, 70, 229, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.skeleton-line {
    width: 70%;
    height: 10px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: loadingPulse 1.5s infinite;
    border-radius: 4px;
}
.skeleton-line.delay-1 { width: 90%; animation-delay: 0.2s; }
.skeleton-line.delay-2 { width: 50%; animation-delay: 0.4s; }
@keyframes loadingPulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.hidden {
    display: none !important;
}

/* API Docs Section */
.docs-section {
    padding-top: 4rem;
    padding-bottom: 6rem;
}
.docs-tabs {
    padding: 1.5rem !important;
}
.tab-headers {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}
.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
}
.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}
.tab-btn.active {
    color: var(--text-inverse);
    background: var(--primary);
}
.tab-contents {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}
.tab-pane {
    display: none;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
}
.tab-pane.active {
    display: block;
}

/* Footer Section */
footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    background: rgba(0, 0, 0, 0.3);
}
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive Breakpoints */
@media (max-width: 968px) {
    .playground-grid {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 2.75rem;
    }
    .auth-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .auth-help-text {
        text-align: left;
    }
    .footer-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* WAF Shield Detector Playground Styles (Consistent with Docs Tabs) */
.playground-tabs-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.playground-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.playground-tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.playground-tab-btn.active {
    color: var(--text-inverse);
    background: var(--primary);
}

.playground-tab-content {
    transition: var(--transition);
}

.playground-tab-content.hidden {
    display: none;
}

.playground-tab-content.active {
    display: block;
}

/* WAF Detector Output Styles */
.waf-results-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.4s ease-out;
}

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

.waf-summary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
}

.waf-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 700;
}

.waf-status-badge.waf-detected {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.waf-status-badge.waf-clean {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.waf-difficulty-badge {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.waf-difficulty-badge span {
    font-weight: 700;
    color: var(--text-main);
}

.waf-description-box {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    padding: 0 0.5rem;
}

.waf-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

.comparison-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 450px;
}

.comparison-column h4 {
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    display: inline-block;
    width: fit-content;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-indicator.green {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.preview-box {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    overflow-y: auto;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.preview-box.markdown-preview {
    color: #E5E7EB;
}

.waf-cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(6, 182, 212, 0.08));
    border: 1px solid rgba(79, 70, 229, 0.15);
    margin-top: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
}

.waf-cta-box h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.waf-cta-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .waf-cta-box {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        text-align: center;
    }
}

/* Inferred Schema Table Styling */
.schema-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-sans);
    font-size: 0.85rem;
}
.schema-table th, .schema-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.schema-table th {
    font-weight: 600;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
    position: sticky;
    top: 0;
    z-index: 1;
}
.schema-table td {
    color: var(--text-muted);
}
.schema-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}
.schema-table td.field-name-cell {
    font-family: var(--font-mono);
    color: var(--accent);
    font-weight: 600;
}
.schema-table td.field-type-cell {
    font-family: var(--font-mono);
    color: #a5b4fc;
}

/* Crawler UI & Accordion Styles */
.crawler-schema-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.crawler-schema-section.hidden {
    display: none;
}
.crawler-dataset-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-top: 1rem;
}
.accordion-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}
.accordion-item:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
}
.accordion-header {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
    user-select: none;
}
.accordion-title {
    font-size: 0.85rem;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text-main);
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.accordion-title i {
    color: var(--accent);
    flex-shrink: 0;
}
.accordion-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.accordion-badge {
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}
.accordion-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.accordion-badge.failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.accordion-chevron {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}
.accordion-item.active .accordion-chevron {
    transform: rotate(180deg);
}
.accordion-content {
    display: none;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
}
.accordion-item.active .accordion-content {
    display: block;
}
.accordion-content pre {
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.8rem;
}
.accordion-content pre code {
    color: #e2e8f0;
}
.crawler-results-container.hidden {
    display: none;
}

/* Selector Cache Indicators */
.cache-info-banner {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.cache-info-banner.hidden {
    display: none !important;
}

.cache-badge-hit {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #10B981 !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
}

.cache-badge-miss {
    background: rgba(107, 114, 128, 0.12) !important;
    color: #9CA3AF !important;
    border: 1px solid rgba(107, 114, 128, 0.25) !important;
}

.cache-badge-healed {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #F59E0B !important;
    border: 1px solid rgba(245, 158, 11, 0.25) !important;
}

.cache-badge-inactive {
    background: rgba(255, 255, 255, 0.03) !important;
    color: #6B7280 !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Output Sub-Tabs (JSON, Visual, Audits) */
.output-tab-btn {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}
.output-tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}
.output-tab-btn.active {
    background: var(--primary);
    color: var(--text-inverse);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.3);
}

/* Visual Overlay CSS */
.output-visual-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.output-visual-container.hidden {
    display: none !important;
}
.visual-viewer-wrapper {
    position: relative;
    width: 100%;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #000;
}
.visual-viewer-wrapper.hidden {
    display: none !important;
}

/* Bounding Box Styling */
.overlay-box {
    position: absolute;
    box-sizing: border-box;
    border: 2px solid var(--primary);
    background-color: rgba(79, 70, 229, 0.15);
    box-shadow: 0 0 8px var(--primary-glow);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    pointer-events: auto; /* enable hover/click events */
}
.overlay-box:hover {
    border-color: var(--accent);
    background-color: rgba(6, 182, 212, 0.25);
    box-shadow: 0 0 12px var(--accent-glow);
    transform: scale(1.02);
    z-index: 10;
}
.overlay-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    white-space: nowrap;
    border: 1px solid var(--border-hover);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease-in-out, visibility 0.15s ease-in-out;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 20;
}
.overlay-box:hover .overlay-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Compliance Audit Table Styles */
.output-audits-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}
.output-audits-container.hidden {
    display: none !important;
}
.audit-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-main);
}
.audit-table th {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.02);
    position: sticky;
    top: 0;
}
.audit-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.audit-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}
.audit-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}
.audit-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.audit-badge.fail {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.audit-badge.hit {
    background: rgba(6, 182, 212, 0.1);
    color: #06B6D4;
    border: 1px solid rgba(6, 182, 212, 0.2);
}
.audit-badge.miss {
    background: rgba(107, 114, 128, 0.1);
    color: #9CA3AF;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

/* SaaS Authentication & Dashboard Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(16px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-card {
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.modal-overlay.active .modal-card {
    transform: translateY(0);
}
.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}
.modal-close:hover {
    color: var(--text-main);
}
.modal-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}
.modal-tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}
.modal-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* User Account Dashboard */
.user-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.user-email-display {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 250px;
}
.user-plan-badge {
    background: rgba(79, 70, 229, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(79, 70, 229, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}
.user-plan-badge.pro {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent);
    border-color: rgba(6, 182, 212, 0.3);
}
.user-plan-badge.enterprise {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    border-color: rgba(16, 185, 129, 0.3);
}

/* Usage Progress bar */
.usage-container {
    margin-bottom: 2rem;
}
.usage-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.usage-progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
}
.usage-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pricing cards in upgrade modal */
.pricing-tiers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}
@media (min-width: 640px) {
    .pricing-tiers-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.price-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}
.price-card:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.04);
}
.price-card.popular {
    border-color: var(--accent);
    background: rgba(6, 182, 212, 0.03);
    position: relative;
}
.price-card.popular::after {
    content: "POPULAR";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.2rem 0.75rem;
    border-radius: 10px;
}
.price-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.price-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
}
.price-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.price-card ul li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.price-card ul li i {
    color: var(--success);
}

/* Key Management UI */
.keys-section {
    margin-top: 1.5rem;
}
.keys-list {
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    max-height: 250px;
    overflow-y: auto;
}
.key-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.01);
}
.key-item:last-child {
    border-bottom: none;
}
.key-details {
    flex: 1;
    overflow: hidden;
}
.key-label {
    font-weight: 600;
    font-size: 0.9rem;
}
.key-value-masked {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.key-actions-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.key-usage-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.key-actions {
    display: flex;
    gap: 0.5rem;
}
.nav-auth-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.nav-auth-btn:hover {
    background: #4f46e5;
    box-shadow: 0 0 12px var(--primary-glow);
}
.nav-auth-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.nav-auth-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}
.nav-user-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.user-display-email {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}




