/*
 * Discovery Agent Documentation Page Styles
 * CSP-compliant - no inline styles
 * Cyberpunk/Quantum theme with teal/cyan accents
 */

/* ========================================
   VARIABLES & ROOT STYLES
   ======================================== */
:root {
    --discovery-primary: #00d4aa;
    --discovery-secondary: #00f5c4;
    --discovery-accent: #00ffea;
    --discovery-dark: #0a0f14;
    --discovery-darker: #050a0e;
    --discovery-card-bg: rgba(10, 20, 30, 0.8);
    --discovery-border: rgba(0, 212, 170, 0.3);
    --discovery-text: #e0e0e0;
    --discovery-text-muted: #8a9bae;
    --discovery-success: #00ff88;
    --discovery-warning: #ffaa00;
    --discovery-danger: #ff4466;
    --discovery-forbidden: #ff0044;
}

/* ========================================
   BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--discovery-darker);
    color: var(--discovery-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========================================
   CONTAINER
   ======================================== */
.discovery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: 80px;
}

/* ========================================
   HEADER
   ======================================== */
.discovery-header {
    text-align: center;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.logo-image {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 212, 170, 0.4);
    border: 2px solid var(--discovery-primary);
}

.logo-text {
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--discovery-primary), var(--discovery-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(0, 212, 170, 0.5);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--discovery-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1), rgba(0, 255, 234, 0.05));
    border: 1px solid var(--discovery-border);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--discovery-primary), transparent);
}

.hero-badge {
    display: inline-block;
    background: rgba(0, 212, 170, 0.2);
    border: 1px solid var(--discovery-primary);
    color: var(--discovery-primary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--discovery-text-muted);
    max-width: 800px;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: flex-start;
}

.stat-item {
    text-align: center;
    padding: 1rem 2rem;
    background: rgba(0, 212, 170, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 170, 0.2);
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--discovery-primary);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--discovery-text-muted);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   DOCUMENTATION SECTIONS
   ======================================== */
.doc-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--discovery-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-intro {
    font-size: 1.05rem;
    color: var(--discovery-text-muted);
    margin-bottom: 2rem;
    max-width: 900px;
}

/* ========================================
   CODE BLOCKS
   ======================================== */
.code-block {
    background: rgba(10, 15, 25, 0.9);
    border: 1px solid var(--discovery-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 212, 170, 0.1);
    border-bottom: 1px solid var(--discovery-border);
}

.code-lang {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--discovery-primary);
    background: rgba(0, 212, 170, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.code-title {
    font-size: 0.85rem;
    color: var(--discovery-text-muted);
}

.code-content {
    padding: 1.5rem;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-content code {
    color: var(--discovery-text);
}

/* Code Copy Button */
.code-copy-btn {
    background: rgba(0, 212, 170, 0.2);
    border: 1px solid rgba(0, 212, 170, 0.4);
    color: #00d4aa;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-copy-btn:hover {
    background: rgba(0, 212, 170, 0.3);
    border-color: #00d4aa;
}

.code-copy-btn.copied {
    background: rgba(0, 255, 136, 0.3);
    border-color: #00ff88;
    color: #00ff88;
}

/* ========================================
   INFO CALLOUT
   ======================================== */
.info-callout {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid var(--discovery-border);
    border-radius: 12px;
    border-left: 4px solid var(--discovery-primary);
}

.callout-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--discovery-primary);
    color: var(--discovery-dark);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.callout-content {
    flex: 1;
    color: var(--discovery-text);
}

/* ========================================
   FEATURES GRID
   ======================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--discovery-card-bg);
    border: 1px solid var(--discovery-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--discovery-primary);
    box-shadow: 0 0 30px rgba(0, 212, 170, 0.2);
    transform: translateY(-2px);
}

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

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.75rem;
}

.feature-description {
    color: var(--discovery-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========================================
   PLATFORM GRID
   ======================================== */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.platform-card {
    background: var(--discovery-card-bg);
    border: 1px solid var(--discovery-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.platform-card:hover {
    border-color: var(--discovery-primary);
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.15);
}

.platform-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--discovery-border);
}

.platform-icon {
    font-size: 2rem;
}

.platform-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
}

.platform-features {
    list-style: none;
    padding: 0;
}

.platform-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--discovery-text-muted);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0, 212, 170, 0.1);
}

.platform-features li:last-child {
    border-bottom: none;
}

.platform-features li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--discovery-primary);
    font-weight: 700;
}

/* ========================================
   ACCORDION
   ======================================== */
.coverage-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.accordion-item {
    background: var(--discovery-card-bg);
    border: 1px solid var(--discovery-border);
    border-radius: 12px;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background 0.3s ease;
}

.accordion-header:hover {
    background: rgba(0, 212, 170, 0.1);
}

.accordion-icon {
    font-size: 1.5rem;
}

.accordion-title {
    flex: 1;
}

.accordion-arrow {
    color: var(--discovery-primary);
    transition: transform 0.3s ease;
    font-size: 0.85rem;
}

.accordion-item.active .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
}

.coverage-list {
    list-style: none;
    padding: 0 1.5rem 1.5rem;
}

.coverage-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 212, 170, 0.1);
    color: var(--discovery-text-muted);
    font-size: 0.9rem;
}

.coverage-list li:last-child {
    border-bottom: none;
}

.coverage-list li strong {
    color: var(--discovery-primary);
}

/* ========================================
   METADATA GRID
   ======================================== */
.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.metadata-card {
    background: var(--discovery-card-bg);
    border: 1px solid var(--discovery-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.metadata-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--discovery-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--discovery-border);
}

.metadata-list {
    list-style: none;
    padding: 0;
}

.metadata-list li {
    padding: 0.4rem 0;
    color: var(--discovery-text-muted);
    font-size: 0.9rem;
    padding-left: 1.25rem;
    position: relative;
}

.metadata-list li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--discovery-primary);
}

/* ========================================
   CLI TABLE
   ======================================== */
.cli-table-container {
    overflow-x: auto;
    border: 1px solid var(--discovery-border);
    border-radius: 12px;
}

.cli-table {
    width: 100%;
    border-collapse: collapse;
}

.cli-table th {
    background: rgba(0, 212, 170, 0.1);
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    color: var(--discovery-primary);
    border-bottom: 2px solid var(--discovery-border);
}

.cli-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 212, 170, 0.1);
    color: var(--discovery-text-muted);
}

.cli-table tr:last-child td {
    border-bottom: none;
}

.cli-table tr:hover {
    background: rgba(0, 212, 170, 0.05);
}

.cli-table code {
    background: rgba(0, 212, 170, 0.15);
    color: var(--discovery-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

/* ========================================
   API ENDPOINT
   ======================================== */
.api-endpoint {
    background: var(--discovery-card-bg);
    border: 1px solid var(--discovery-border);
    border-radius: 16px;
    padding: 2rem;
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.endpoint-method {
    background: var(--discovery-primary);
    color: var(--discovery-dark);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
}

.endpoint-path {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    color: #fff;
}

.endpoint-description {
    color: var(--discovery-text-muted);
    margin-bottom: 1.5rem;
}

/* ========================================
   COMPLIANCE GRID
   ======================================== */
.compliance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.compliance-card {
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.compliance-card:hover {
    transform: translateY(-3px);
}

.compliance-card.compliant {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.compliance-card.legacy {
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid rgba(255, 170, 0, 0.3);
}

.compliance-card.deprecated {
    background: rgba(255, 68, 102, 0.1);
    border: 1px solid rgba(255, 68, 102, 0.3);
}

.compliance-card.forbidden {
    background: rgba(255, 0, 68, 0.1);
    border: 1px solid rgba(255, 0, 68, 0.3);
}

.compliance-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.compliance-icon {
    font-size: 1.5rem;
}

.compliance-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.compliance-desc {
    color: var(--discovery-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.compliance-algorithms {
    list-style: none;
    padding: 0;
}

.compliance-algorithms li {
    padding: 0.3rem 0;
    padding-left: 1rem;
    position: relative;
    font-size: 0.85rem;
    color: var(--discovery-text);
}

.compliance-algorithms li::before {
    content: '*';
    position: absolute;
    left: 0;
}

.compliance-card.compliant .compliance-algorithms li::before {
    color: var(--discovery-success);
}

.compliance-card.legacy .compliance-algorithms li::before {
    color: var(--discovery-warning);
}

.compliance-card.deprecated .compliance-algorithms li::before {
    color: var(--discovery-danger);
}

.compliance-card.forbidden .compliance-algorithms li::before {
    color: var(--discovery-forbidden);
}

/* ========================================
   TECH GRID
   ======================================== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.tech-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--discovery-card-bg);
    border: 1px solid var(--discovery-border);
    border-radius: 8px;
}

.tech-label {
    font-weight: 600;
    color: var(--discovery-primary);
}

.tech-value {
    color: var(--discovery-text-muted);
    text-align: right;
}

/* ========================================
   USE CASES GRID
   ======================================== */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.use-case-card {
    background: var(--discovery-card-bg);
    border: 1px solid var(--discovery-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.use-case-card:hover {
    border-color: var(--discovery-primary);
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.15);
}

.use-case-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.75rem;
}

.use-case-desc {
    color: var(--discovery-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========================================
   DASHBOARD FEATURES
   ======================================== */
.dashboard-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-feature {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--discovery-card-bg);
    border: 1px solid var(--discovery-border);
    border-radius: 12px;
}

.dashboard-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.dashboard-feature h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.dashboard-feature p {
    color: var(--discovery-text-muted);
    font-size: 0.9rem;
}

.dashboard-cta {
    text-align: center;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--discovery-primary), var(--discovery-secondary));
    color: var(--discovery-dark);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.4);
}

/* ========================================
   SECURITY GRID
   ======================================== */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.security-item {
    background: var(--discovery-card-bg);
    border: 1px solid var(--discovery-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.security-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.security-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.75rem;
}

.security-item p {
    color: var(--discovery-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .discovery-container {
        padding: 1.5rem;
        padding-top: 70px;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .discovery-container {
        padding: 1rem;
        padding-top: 60px;
    }

    .discovery-header {
        padding: 2rem 1rem;
    }

    .logo-image {
        width: 80px;
        height: 80px;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .hero-section {
        padding: 2rem 1.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .stat-item {
        padding: 0.75rem 1.25rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .features-grid,
    .platform-grid,
    .use-cases-grid {
        grid-template-columns: 1fr;
    }

    .cli-table {
        font-size: 0.85rem;
    }

    .cli-table th,
    .cli-table td {
        padding: 0.75rem 1rem;
    }

    .tech-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tech-value {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        align-items: stretch;
    }

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

    .accordion-header {
        padding: 1rem;
        font-size: 1rem;
    }

    .code-content {
        padding: 1rem;
        font-size: 0.8rem;
    }

    .compliance-grid,
    .metadata-grid,
    .security-grid,
    .dashboard-features {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   HIGH CONTRAST & ACCESSIBILITY
   ======================================== */
@media (prefers-contrast: high) {
    .feature-card,
    .platform-card,
    .metadata-card,
    .use-case-card,
    .security-item,
    .dashboard-feature {
        border-width: 2px;
    }

    .accordion-header:focus {
        outline: 3px solid var(--discovery-primary);
        outline-offset: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .discovery-container {
        padding: 0;
    }

    .hero-section,
    .feature-card,
    .platform-card {
        break-inside: avoid;
    }

    .accordion-content {
        max-height: none !important;
    }
}
