/* Docs Section Styles */

/* Hero */
.docs-hero {
    padding: 160px 24px 80px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.docs-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.docs-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: white;
    margin: 24px 0 16px;
    line-height: 1.1;
}

.docs-hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* Docs Grid Section */
.docs-grid-section {
    padding: 0 24px 80px;
    position: relative;
    z-index: 1;
}

.docs-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

/* Docs Card */
.docs-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.docs-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(8px);
}

.docs-card-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.docs-card-content {
    flex: 1;
}

.docs-card-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 8px;
}

.docs-card-content p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 12px;
    line-height: 1.5;
}

.docs-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.docs-card-tags span {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    color: rgba(255, 255, 255, 0.7);
}

.docs-card-arrow {
    color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

/* Featured Card (NEXUS) */
.docs-card-featured {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.docs-card-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #6366f1);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.docs-card-featured:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-color: rgba(99, 102, 241, 0.5);
}

.docs-card-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 4px;
    color: white;
    margin-left: 8px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

.docs-card:hover .docs-card-arrow {
    color: rgba(255, 255, 255, 0.8);
    transform: translateX(4px);
}

/* Common Features Section */
.docs-common-section {
    padding: 80px 24px;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.docs-common-section h2 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin: 0 0 48px;
}

.docs-common-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.docs-common-item {
    text-align: center;
    padding: 24px;
}

.docs-common-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.docs-common-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin: 0 0 8px;
}

.docs-common-item p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    line-height: 1.5;
}

/* Footer */
.docs-footer {
    padding: 48px 24px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1;
}

.docs-footer-content p {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 8px;
}

.docs-footer-content a {
    color: #a78bfa;
    text-decoration: none;
}

.docs-footer-copy {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.3) !important;
}

/* Document View Page */
.docs-view {
    padding: 120px 24px 80px;
    position: relative;
    z-index: 1;
}

.docs-view-container {
    max-width: 900px;
    margin: 0 auto;
}

.docs-view-header {
    margin-bottom: 48px;
}

.docs-view-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 24px;
    transition: color 0.2s ease;
}

.docs-view-back:hover {
    color: white;
}

.docs-view-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: white;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.docs-view-header h1 span.icon {
    font-size: 0.8em;
}

.docs-view-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.docs-view-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.docs-view-meta-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

/* Markdown Content */
.docs-content {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 48px;
}

.docs-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 48px 0 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.docs-content h2:first-child {
    margin-top: 0;
}

.docs-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin: 32px 0 16px;
}

.docs-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 24px 0 12px;
}

.docs-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin: 0 0 16px;
}

.docs-content ul, .docs-content ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.docs-content li {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 8px;
}

.docs-content strong {
    color: white;
    font-weight: 600;
}

.docs-content a {
    color: #a78bfa;
    text-decoration: none;
}

.docs-content a:hover {
    text-decoration: underline;
}

/* Tables */
.docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.9rem;
}

.docs-content th {
    text-align: left;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.docs-content td {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.docs-content tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Code blocks */
.docs-content pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
}

.docs-content code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #a78bfa;
}

.docs-content pre code {
    color: rgba(255, 255, 255, 0.8);
}

/* Blockquotes */
.docs-content blockquote {
    margin: 24px 0;
    padding: 16px 24px;
    background: rgba(167, 139, 250, 0.1);
    border-left: 4px solid #a78bfa;
    border-radius: 0 8px 8px 0;
}

.docs-content blockquote p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

/* Horizontal rule */
.docs-content hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 48px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .docs-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .docs-card-arrow {
        display: none;
    }
    
    .docs-common-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .docs-content {
        padding: 24px;
    }
    
    .docs-content table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .docs-common-grid {
        grid-template-columns: 1fr;
    }
}

/* Mermaid Diagram Styles */
.docs-content .language-mermaid,
.docs-content pre:has(.language-mermaid) {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 48px 32px;
    margin: 40px 0;
    overflow-x: auto;
    display: flex;
    justify-content: center;
    min-height: 400px;
}

.docs-content .language-mermaid svg {
    min-width: 900px;
    width: 100%;
    max-width: 1200px;
    height: auto;
    min-height: 350px;
}

/* Force larger text in Mermaid */
.docs-content .mermaid {
    font-size: 16px !important;
}

.docs-content .mermaid .label {
    font-size: 14px !important;
    font-family: 'Inter', sans-serif !important;
}

.docs-content .mermaid .cluster-label .nodeLabel {
    font-size: 16px !important;
    font-weight: 600 !important;
}

.docs-content .mermaid .nodeLabel {
    font-size: 13px !important;
    padding: 8px 12px !important;
}

/* Mermaid node styling overrides */
.docs-content .mermaid .node rect,
.docs-content .mermaid .node polygon {
    rx: 8px;
    ry: 8px;
}

.docs-content .mermaid .cluster rect {
    rx: 12px !important;
    ry: 12px !important;
    stroke-width: 2px !important;
}

.docs-content .mermaid .edgePath path {
    stroke-width: 2px;
}

.docs-content .mermaid .label {
    font-family: 'Inter', sans-serif;
}

/* Hide raw mermaid code before rendering */
.docs-content pre code.language-mermaid:not([data-processed="true"]) {
    display: block;
    white-space: pre;
    padding: 16px;
    font-size: 0.75rem;
    opacity: 0.5;
}

/* ============================== */
/* Architecture Diagram Styles    */
/* ============================== */

.architecture-diagram {
    margin: 48px 0;
    padding: 32px;
    background: linear-gradient(135deg, rgba(15, 10, 31, 0.95) 0%, rgba(20, 15, 40, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.architecture-diagram::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Layer Styles */
.arch-layer {
    position: relative;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 0;
}

.arch-storefront {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(99, 102, 241, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.4);
}

.arch-backend {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.12) 0%, rgba(251, 146, 60, 0.05) 100%);
    border: 1px solid rgba(251, 146, 60, 0.4);
}

.arch-integrations {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(34, 197, 94, 0.05) 100%);
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.arch-layer-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.arch-icon {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.arch-layer-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0;
    letter-spacing: 0.5px;
}

.arch-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Monaco', 'Menlo', monospace;
}

/* Modules Grid */
.arch-modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.arch-module {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.arch-module:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.arch-module-header {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.arch-module-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.arch-module-items span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.arch-module-items span:hover {
    background: rgba(99, 102, 241, 0.15);
    color: white;
}

.arch-module-items.arch-code span {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    color: #a5b4fc;
}

/* Connector Styles */
.arch-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    position: relative;
}

.arch-connector-line {
    width: 3px;
    height: 40px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.8) 0%, rgba(251, 146, 60, 0.8) 100%);
    border-radius: 3px;
}

.arch-connector-arrow {
    font-size: 1.25rem;
    color: rgba(251, 146, 60, 0.8);
    margin-top: -8px;
}

/* Responsive */
@media (max-width: 768px) {
    .architecture-diagram {
        padding: 16px;
        margin: 24px 0;
    }
    
    .arch-layer {
        padding: 16px;
    }
    
    .arch-modules {
        grid-template-columns: 1fr;
    }
    
    .arch-layer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .arch-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
}

