/* LMNA3.2 Technical Wiki - Modern Professional Styling */

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #0f3460;
    --highlight-color: #e94560;
    --text-color: #e4e4e7;
    --text-muted: #a1a1aa;
    --border-color: #3f3f46;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --code-bg: #1e1e1e;
    --sidebar-width: 300px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100vh;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 2rem 0;
    border-bottom: 3px solid var(--highlight-color);
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, #fff, var(--highlight-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header .subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

header .version-badge {
    background: var(--highlight-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 3rem;
}

/* Sidebar Navigation */
aside {
    position: sticky;
    top: 120px;
    height: calc(100vh - 150px);
    overflow-y: auto;
    background: var(--secondary-color);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

aside h3 {
    color: var(--highlight-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

nav ul {
    list-style: none;
}

nav li {
    margin-bottom: 0.5rem;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

nav a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateX(5px);
}

nav a.active {
    background: var(--highlight-color);
    color: white;
    font-weight: 600;
}

/* Main Content */
main {
    background: var(--primary-color);
    border-radius: 12px;
    padding: 3rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Typography */
main h1, main h2, main h3, main h4 {
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

main h1 {
    font-size: 3rem;
    border-bottom: 3px solid var(--highlight-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

main h2 {
    font-size: 2rem;
    margin-top: 3rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-color);
}

main h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    color: var(--highlight-color);
}

main h4 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    color: var(--text-muted);
}

main p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Lists */
main ul, main ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

main li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

main ul li {
    list-style-type: none;
    position: relative;
    padding-left: 1.5rem;
}

main ul li::before {
    content: "▸";
    color: var(--highlight-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Checkmarks and Crosses */
main ul li::before {
    content: "✓";
    color: var(--success-color);
}

/* Tables */
main table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
}

main th, main td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

main th {
    background: var(--accent-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

main tr:hover {
    background: var(--primary-color);
}

main tr:last-child td {
    border-bottom: none;
}

/* Code Blocks */
main pre {
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 2rem 0;
    position: relative;
}

main pre::before {
    content: attr(data-language);
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0 8px 0 8px;
    font-weight: 600;
}

main code {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    color: #d4d4d4;
}

main p code, main li code {
    background: var(--accent-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85em;
}

/* Inline Code */
main code:not(pre code) {
    background: var(--accent-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: #fff;
}

/* Mermaid Diagrams */
.mermaid {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    overflow-x: auto;
    text-align: center;
}

.mermaid svg {
    max-width: 100%;
    height: auto;
}

/* Blockquotes */
main blockquote {
    border-left: 4px solid var(--highlight-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: var(--secondary-color);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

/* Horizontal Rules */
main hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, var(--highlight-color), transparent);
    margin: 3rem 0;
}

/* Alerts and Callouts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success-color);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning-color);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error-color);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--highlight-color);
    box-shadow: 0 8px 24px rgba(233, 69, 96, 0.2);
}

.feature-card h4 {
    color: var(--highlight-color);
    margin-bottom: 0.5rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary-color);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--highlight-color);
}

/* Footer */
footer {
    background: var(--secondary-color);
    padding: 2rem;
    text-align: center;
    border-top: 2px solid var(--border-color);
    margin-top: 3rem;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
    }
    
    aside {
        position: static;
        height: auto;
        max-height: 300px;
    }
    
    main h1 {
        font-size: 2rem;
    }
    
    main h2 {
        font-size: 1.5rem;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
        gap: 2rem;
    }
    
    main {
        padding: 2rem 1.5rem;
    }
    
    header {
        padding: 1.5rem 0;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    main h1 {
        font-size: 1.75rem;
    }
    
    main h2 {
        font-size: 1.3rem;
    }
    
    main h3 {
        font-size: 1.1rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    header, aside, footer {
        display: none;
    }
    
    main {
        box-shadow: none;
        border: none;
        padding: 0;
    }
    
    main h1, main h2, main h3, main h4 {
        color: black;
    }
    
    main p {
        color: #333;
    }
    
    .mermaid {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    main pre {
        page-break-inside: avoid;
        background: #f5f5f5;
        border: 1px solid #ccc;
    }
}

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

main {
    animation: fadeIn 0.5s ease-out;
}

/* Table of Contents in Sidebar */
.toc-section {
    margin-bottom: 1.5rem;
}

.toc-section h4 {
    color: var(--highlight-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toc-section ul {
    list-style: none;
    padding-left: 0;
}

.toc-section ul li {
    margin-bottom: 0.3rem;
}

.toc-section ul li a {
    font-size: 0.85rem;
    padding: 0.3rem 0.5rem;
}