/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&display=swap');
/* Font Icons */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');
/* Prism CSS */
@import url('https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css');

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

:root {
    --primary-color: #3e5488;
    --secondary-color: #883e54;
    --background-color: #f8f9fd;
    --surface-color: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #ffffff;
    --accent-light: #eef2f7;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* App Layout */
.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0 max(20px, 5%);
    max-width: 1600px;
    margin: 0 auto;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-secondary);
    padding: 1.25rem 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    flex-shrink: 0;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
    text-align: left;
}

.header-nav {
    flex-grow: 1;
    margin: 0 2rem;
}

.header-title-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.header-title-link:hover {
    opacity: 0.9;
}

.header-title-link h1 {
    margin: 0;
}


.nav-links {
    list-style: none;
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.github-link {
    font-size: 1.75rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
    z-index: 1;
    flex-shrink: 0;
}

.github-link:hover {
    transform: scale(1.1);
}

/* Page Layout */
.page-container {
    margin: 0 1rem;
    padding: 2rem 1rem;
}

.page-header {
    margin-bottom: 3rem;
}

.page-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.page-description {
    color: var(--text-primary);
    max-width: 800px;
    line-height: 1.6;
}

/* Content Sections */
.content-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.content-section {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.content-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.content-section p {
    color: var(--text-primary);
    line-height: 1.6;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-section p:last-child {
    margin-bottom: 0;
}

/* Code Block Styles */
/* Code Block Styles */
.code-block-wrapper {
    position: relative;
    background: #282c34;
    border-radius: 8px;
    overflow: hidden;
}

.copy-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.copy-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.copy-button i {
    font-size: 0.9rem;
}

.code-container {
    background: #282c34;
    border-radius: 8px;
    overflow: hidden;
    margin: 0;
}

.code-container code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    display: block;
    overflow-x: auto;
}

/* Example Container */
.example-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.result-container {
    background: var(--accent-light);
    padding: 1rem;
    border-radius: 8px;
    overflow: auto;
}

.result-container h4 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
    }

    .github-link {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
}

/* Footer Styles */
.footer {
    margin-top: auto;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-secondary);
    border-radius: 16px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-left {
    text-align: left;
}

.footer-right {
    text-align: right;
}

.footer-ai {
    font-size: 0.8rem !important;
    opacity: 0.7 !important;
}

.footer-ai i {
    margin: 0 0.3rem;
}

/* Add responsive behavior for small screens */
@media (max-width: 768px) {
    .footer {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-left,
    .footer-right {
        text-align: center;
    }
}



/* Next Section Link styles */
.next-section {
    text-align: right;
}

.next-section a {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    background: var(--surface-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.next-section a:hover {
    background: var(--accent-light);
    transform: translateX(4px);
}

/* List Styles */
.content-section ul,
.content-section ol {
    margin: 0 0 1.5rem 0;
    padding-left: 2rem;
}

.content-section li {
    margin-bottom: 0.5rem;
}

.content-section ul {
    list-style-type: disc;
}

.content-section ol {
    list-style-type: decimal;
}

/* Nested lists */
.content-section ul ul,
.content-section ul ol,
.content-section ol ul,
.content-section ol ol {
    margin-top: 0.5rem;
    margin-bottom: 0;
}