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

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #8b5cf6;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

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

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

/* ==========================================
   Navigation
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.github-link {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    transition: var(--transition);
}

.github-link:hover {
    background: var(--primary-color);
    color: white !important;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    padding: 150px 0 100px;
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 100%);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    font-size: 1rem;
}

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

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

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

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

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    padding-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* ==========================================
   Features Section
   ========================================== */
.features {
    padding: 100px 0;
    background: var(--bg-white);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-primary);
}

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

.feature-card {
    padding: 2rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==========================================
   Quick Start Section
   ========================================== */
.quickstart {
    padding: 100px 0;
    background: var(--bg-light);
}

.quickstart-content {
    display: grid;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.quickstart-step {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    position: relative;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 2.5rem;
    width: 40px;
    height: 40px;
    background: var(--gradient-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
}

.quickstart-step h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.quickstart-step p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.code-block {
    position: relative;
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.code-block pre {
    margin: 0;
}

.code-block code {
    color: #e2e8f0;
}

.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

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

.copy-btn svg {
    display: block;
}

/* ==========================================
   Live Demo Section
   ========================================== */
.live-demo {
    padding: 100px 0;
    background: var(--bg-white);
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-top: -2rem;
    margin-bottom: 3rem;
}

.demo-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.demo-container {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.demo-app {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    min-height: 400px;
}

.demo-app x-todo-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.demo-app input[type="text"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.demo-app input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.demo-app .add-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.demo-app .add-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.todo-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 0.875rem;
}

.todo-stats span {
    color: var(--text-secondary);
}

.todo-stats strong {
    color: var(--text-primary);
    font-weight: 600;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.todo-item:hover {
    background: #e2e8f0;
}

.todo-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.todo-item span {
    flex: 1;
    color: var(--text-primary);
}

.todo-item span.done {
    text-decoration: line-through;
    color: var(--text-secondary);
    opacity: 0.6;
}

.todo-item .delete-btn {
    padding: 0.375rem 0.75rem;
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.todo-item .delete-btn:hover {
    background: #ef4444;
    color: white;
}

.demo-code {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.code-tabs {
    display: flex;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.code-tab {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.code-tab:hover {
    color: var(--text-primary);
}

.code-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.code-tab-content {
    display: none;
    padding: 1.5rem;
}

.code-tab-content.active {
    display: block;
}

.code-tab-content .code-block {
    margin: 0;
}

/* ==========================================
   Examples Section
   ========================================== */
.examples {
    padding: 100px 0;
    background: var(--bg-white);
}

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

.example-card {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 16px;
    transition: var(--transition);
}

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

.example-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.example-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.example-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.example-link:hover {
    color: var(--primary-dark);
}

.examples-cta {
    text-align: center;
}

/* ==========================================
   CTA Section
   ========================================== */
.cta-section {
    padding: 100px 0;
    background: var(--gradient-blue);
    color: white;
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

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

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

.cta-section .btn-primary:hover {
    background: var(--bg-light);
}

.cta-section .btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

/* ==========================================
   Footer
   ========================================== */
.footer {
    padding: 60px 0 30px;
    background: var(--text-primary);
    color: white;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.footer-brand p {
    margin-top: 0.5rem;
    opacity: 0.7;
}

.footer-links {
    display: flex;
    gap: 3rem;
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    opacity: 0.6;
    font-size: 0.875rem;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

    .features,
    .quickstart,
    .live-demo,
    .examples,
    .cta-section {
        padding: 60px 0;
    }

    .demo-wrapper {
        grid-template-columns: 1fr;
    }

    .demo-app {
        min-height: 300px;
    }

    .demo-app x-todo-form {
        flex-direction: column;
    }

    .todo-stats {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        gap: 2rem;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
    }
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.feature-card,
.example-card,
.quickstart-step {
    animation: fadeInUp 0.6s ease-out;
}

/* ==========================================
   Utility Classes
   ========================================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ==========================================
   Prism.js Theme Override
   ========================================== */
/* Override Prism.js background to match our design */
code[class*="language-"],
pre[class*="language-"] {
    background: transparent !important;
    color: #e2e8f0;
    text-shadow: none;
}

/* Keep syntax highlighting colors but with our background */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #6c7a89;
}

.token.punctuation {
    color: #c5d4dd;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #f39c12;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #a3d977;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #67c5ce;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #c678dd;
}

.token.function,
.token.class-name {
    color: #61afef;
}

.token.regex,
.token.important,
.token.variable {
    color: #e06c75;
}

.token.important,
.token.bold {
    font-weight: bold;
}

.token.italic {
    font-style: italic;
}
