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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* Navigation */
.navbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-mobile {
    display: none;
}

.nav-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.3;
    color: #1f2937;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: #4b5563;
}

.lead {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

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

.hero-section .lead {
    color: rgba(255, 255, 255, 0.9);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

.feature-card {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #1f2937;
}

.feature-card p {
    margin-bottom: 1rem;
}

.feature-card a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.feature-card a:hover {
    text-decoration: underline;
}

/* Code Blocks */
pre {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

p code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    color: #e53e3e;
}

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

li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

th, td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: #f9fafb;
    font-weight: 600;
    color: #1f2937;
}

/* Blockquotes */
blockquote {
    border-left: 4px solid #2563eb;
    background: #f8fafc;
    padding: 1rem;
    margin: 2rem 0;
    font-style: italic;
}

/* Links */
a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

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

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

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e5e7eb;
        padding: 1rem 2rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-mobile {
        display: block;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    h1 {
        font-size: 2rem;
    }

    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 1rem;
    }

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

    pre {
        overflow-x: scroll;
    }
}

/* Specific Layout Styles */
.tutorial-nav {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.tutorial-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tutorial-nav ul li {
    margin-bottom: 0.5rem;
}

.api-section {
    background: #fefefe;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.method-signature {
    background: #1f2937;
    color: #f9fafb;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.example-section {
    border-left: 4px solid #10b981;
    background: #f0fdf4;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
}