/* Light theme (default) */
:root {
    --primary-color: #4a6baf;
    --primary-dark: #1d49aa;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --light-text: #666;
    --background: #ffffff;
    --card-bg: #f8f9fa;
    --border-color: #e9ecef;
    --code-bg: #222;
    --code-text: #00ff00;
    --code-border: rgba(0, 255, 0, 0.2);
    --header-bg: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    --header-text: white;
    --feature-card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --feature-card-hover-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    --footer-bg: var(--text-color);
    --footer-text: white;
}

/* Dark theme */
[data-theme="dark"] {
    --primary-color: #5a7bbf;
    --primary-dark: #2d59ba;
    --secondary-color: #1a1a1a;
    --text-color: #e0e0e0;
    --light-text: #b0b0b0;
    --background: #121212;
    --card-bg: #1e1e1e;
    --border-color: #333;
    --header-bg: linear-gradient(135deg, #2d3748, #1a202c);
    --header-text: #e0e0e0;
    --feature-card-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    --feature-card-hover-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    --footer-bg: #1a1a1a;
    --footer-text: #e0e0e0;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background);
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: calc(15vh - 50px) 0;
    text-align: center;
    min-height: 30vh;
    position: relative;
}

/* Theme toggle */
.theme-toggle-container {
    position: absolute;
    top: 20px;
    right: 20px;
}

.theme-toggle {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--header-text);
    transition: transform 0.3s ease, border-color 0.3s ease;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
}

/* Icon animation styles */
.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    position: absolute;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.theme-toggle .sun-icon {
    opacity: 0;
    transform: scale(0.5) rotate(-45deg);
}

.theme-toggle .moon-icon {
    opacity: 1;
    transform: scale(1) rotate(0);
}

[data-theme="dark"] .theme-toggle .sun-icon {
    opacity: 1;
    transform: scale(1) rotate(0);
}

[data-theme="dark"] .theme-toggle .moon-icon {
    opacity: 0;
    transform: scale(0.5) rotate(45deg);
}

[data-theme="dark"] .feature-icon svg {
    stroke: var(--primary-color);
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 300;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

.btn.primary:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    text-decoration: none;
}

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

.btn.secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    text-decoration: none;
}

/* Sections */
section {
    padding: 80px 0;
}

section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.2rem;
    color: var(--text-color);
}

/* Features */
.features {
    background-color: var(--secondary-color);
}

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

.feature-card {
    background-color: var(--background);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    box-shadow: var(--feature-card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-icon svg {
    width: 96px;
    height: 96px;
    stroke: var(--primary-color);
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--light-text);
}

/* Getting Started */
.getting-started h3 {
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.code-block {
    background-color: var(--code-bg);
    border-radius: 6px;
    margin: 1rem -16px;
    overflow-x: auto;
    padding: 8px 16px;
}

.code-block pre {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.code-block pre code {
    font-size: 0.9rem;
    display: block;
}

code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    padding-left: 3.2em;
}

/* Prism.js line numbers customization */
.line-numbers .line-numbers-rows {
    border-right: 1px solid rgba(0, 0, 0, 0.2);
    padding-right: 0.5rem;
    margin-left: -1.6em;
}

/* Make inline code stand out */
:not(pre) > code {
    background-color: var(--code-bg);
    color: var(--code-text);
    padding: 0.2em 0.4em;
    white-space: nowrap;
}

.installation, .usage {
    margin-bottom: 3rem;
}

/* Documentation */
.documentation {
    background-color: var(--secondary-color);
    text-align: center;
}

.documentation p {
    max-width: 700px;
    margin: 0 auto;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 0;
    text-align: center;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover {
    color: var(--footer-text);
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 60px 0;
    }

    header h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    section {
        padding: 60px 0;
    }

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

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

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}
