/* Global Styles */
:root {
    --primary-color: #3a86ff;
    --secondary-color: #8338ec;
    --accent-color: #ff006e;
    --background-color: #f8f9fa;
    --text-color: #212529;
    --light-gray: #e9ecef;
    --medium-gray: #adb5bd;
    --dark-gray: #495057;
}

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

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

header p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Navigation */
nav {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    display: flex;
    list-style: none;
    overflow-x: auto;
    padding: 0.5rem 0;
}

nav li {
    margin-right: 1.5rem;
    white-space: nowrap;
}

nav a {
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

nav a:hover, nav a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

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

.section {
    margin-bottom: 3rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 2rem;
}

.section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--light-gray);
}

.section h3 {
    color: var(--secondary-color);
    margin: 1.5rem 0 1rem;
}

.section p, .section ul, .section ol {
    margin-bottom: 1rem;
}

.section ul, .section ol {
    padding-left: 1.5rem;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--light-gray);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -12px;
    background-color: white;
    border: 4px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.right::after {
    left: -12px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: white;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
}

.card-body {
    padding: 1.5rem;
}

/* Footer */
footer {
    background-color: var(--dark-gray);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

footer p {
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item::after {
        left: 18px;
    }
    
    .left::after, .right::after {
        left: 18px;
    }
    
    .right {
        left: 0%;
    }
}

/* Markdown Content */
.markdown-content {
    line-height: 1.8;
}

.markdown-content h1, 
.markdown-content h2, 
.markdown-content h3, 
.markdown-content h4, 
.markdown-content h5, 
.markdown-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.markdown-content h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
}

.markdown-content h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 0.5rem;
}

.markdown-content h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.markdown-content h4 {
    font-size: 1.3rem;
    color: var(--dark-gray);
}

.markdown-content p {
    margin-bottom: 1.2rem;
}

.markdown-content ul, 
.markdown-content ol {
    margin-bottom: 1.2rem;
    padding-left: 2rem;
}

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

.markdown-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-left: 0;
    margin-right: 0;
    font-style: italic;
    color: var(--dark-gray);
}

.markdown-content code {
    background-color: var(--light-gray);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
}

.markdown-content pre {
    background-color: var(--light-gray);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1.2rem;
}

.markdown-content pre code {
    background-color: transparent;
    padding: 0;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.2rem;
}

.markdown-content th, 
.markdown-content td {
    border: 1px solid var(--medium-gray);
    padding: 0.5rem;
}

.markdown-content th {
    background-color: var(--light-gray);
}

/* Loading animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

.loading-spinner {
    border: 5px solid var(--light-gray);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}