/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1976d2;
    --secondary-color: #424242;
    --accent-color: #ff6f00;
    --background-color: #f5f5f5;
    --card-background: #ffffff;
    --text-color: #212121;
    --text-secondary: #757575;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
}

[data-theme="dark"] {
    --primary-color: #42a5f5;
    --secondary-color: #e0e0e0;
    --accent-color: #ff9800;
    --background-color: #121212;
    --card-background: #1e1e1e;
    --text-color: #e0e0e0;
    --text-secondary: #b0b0b0;
    --border-color: #333333;
    --success-color: #66bb6a;
    --warning-color: #ffa726;
    --error-color: #ef5350;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--card-background);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Theme Selector */
.theme-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-selector label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.theme-selector select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--card-background);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.theme-selector select:hover {
    border-color: var(--primary-color);
}

.theme-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1565c0 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.hero .version {
    font-size: 1rem;
    opacity: 0.8;
}

/* Main Content */
main {
    padding: 3rem 0;
}

section {
    margin-bottom: 4rem;
}

h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
}

h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(to right, #e3f2fd, #f3e5f5);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.highlight-box h3 {
    color: var(--primary-color);
    margin-top: 0;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.feature-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Architecture Diagram */
.architecture-diagram {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.architecture-diagram pre {
    margin: 0;
}

.layer-description {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.layer-description ul {
    list-style-position: inside;
    margin-top: 1rem;
}

.layer-description li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

/* Benefits */
.benefit-list {
    display: grid;
    gap: 2rem;
}

.benefit-item {
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.benefit-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Paradigm Grid */
.paradigm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.paradigm-card {
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.paradigm-card:hover {
    transform: translateY(-3px);
}

.paradigm-card h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* CTA Grid */
.cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.cta-card {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.cta-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.cta-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.cta-card p {
    color: var(--text-secondary);
}

/* Code Blocks */
pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    border-left: 4px solid var(--primary-color);
}

code {
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--card-background);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

tr:hover {
    background: #f5f5f5;
}

/* Footer */
footer {
    background: var(--secondary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

footer p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-right {
        flex-direction: column;
        width: 100%;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .theme-selector {
        width: 100%;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero .subtitle {
        font-size: 1.2rem;
    }

    .feature-grid,
    .paradigm-grid,
    .cta-grid {
        grid-template-columns: 1fr;
    }
}

/* Mermaid Diagrams */
.mermaid {
    background: transparent;
    text-align: center;
}

/* Sequence Diagrams */
.sequence-diagram {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Flow Charts */
.flow-chart {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Info Boxes */
.info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.warning-box {
    background: #fff3e0;
    border-left: 4px solid var(--warning-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.success-box {
    background: #e8f5e9;
    border-left: 4px solid var(--success-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}
