/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --text-color: #1e293b;
    --text-light: #475569;
    --bg-color: #ffffff;
    --bg-alt: #f8fafc;
    --border-color: #e2e8f0;
    --code-bg: #1e293b;
    --code-text: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero .subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Main Content */
main {
    padding: 3rem 0;
}

.section {
    margin-bottom: 3rem;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.section h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.section h4 {
    font-size: 1.25rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.section p {
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.75;
}

.section ul,
.section ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
    color: var(--text-light);
}

.section li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

.section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.section a:hover {
    text-decoration: underline;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background-color: var(--bg-alt);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

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

code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

p code,
li code {
    background-color: var(--bg-alt);
    color: var(--text-color);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

th {
    background-color: var(--bg-alt);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
}

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

tr:hover {
    background-color: var(--bg-alt);
}

/* Alert Boxes */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.alert-info {
    background-color: #dbeafe;
    border-color: var(--primary-color);
    color: #1e40af;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: var(--warning-color);
    color: #92400e;
}

.alert-success {
    background-color: #d1fae5;
    border-color: var(--success-color);
    color: #065f46;
}

/* Footer */
.footer {
    background-color: var(--bg-alt);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

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

    .features-grid {
        grid-template-columns: 1fr;
    }

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

    pre {
        padding: 1rem;
        font-size: 0.85rem;
    }
}

/* Syntax Highlighting Enhancement */
.language-cpp .keyword {
    color: #c678dd;
}

.language-cpp .string {
    color: #98c379;
}

.language-cpp .comment {
    color: #5c6370;
    font-style: italic;
}

/* Utility Classes */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.text-center { text-align: center; }
.text-muted { color: var(--text-light); }
