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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-alt: #f9fafb;
    --border-color: #e5e7eb;
    --code-bg: #1e293b;
    --code-text: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Dark mode variables */
[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #10b981;
    --text-color: #f3f4f6;
    --text-light: #9ca3af;
    --bg-color: #111827;
    --bg-alt: #1f2937;
    --border-color: #374151;
    --code-bg: #1e293b;
    --code-text: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

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

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

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-text {
    flex: 1;
    min-width: 100%;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    font-style: italic;
}

/* Dark Mode Toggle */
.dark-mode-toggle-container {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.dark-mode-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.toggle-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.dark-mode-toggle-label:hover .toggle-icon {
    transform: rotate(15deg);
}

.dark-mode-toggle {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 26px;
    transition: background-color 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark-mode-toggle:checked + .toggle-slider {
    background-color: rgba(255, 255, 255, 0.5);
}

.dark-mode-toggle:checked + .toggle-slider::before {
    transform: translateX(24px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.dark-mode-toggle:focus + .toggle-slider {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Navigation */
nav {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 1rem 0;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
    background-color: var(--bg-alt);
}

/* Sections */
section {
    padding: 4rem 0;
}

section.alt {
    background-color: var(--bg-alt);
}

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

/* Hero Section */
.hero {
    padding: 3rem 0;
}

.hero h2 {
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

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

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

/* Code Blocks */
.code-block {
    position: relative;
    background-color: var(--code-bg);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

[data-theme="dark"] .code-block {
    background-color: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

.code-block pre {
    margin: 0;
    color: var(--code-text);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-block code {
    color: var(--code-text);
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.copy-btn:hover {
    background-color: var(--primary-dark);
}

.copy-btn.copied {
    background-color: var(--secondary-color);
}

/* Install Options */
.install-option {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.install-option h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.note {
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Info Box */
.info-box {
    background-color: var(--bg-alt);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0.375rem;
}

[data-theme="dark"] .info-box {
    background-color: rgba(59, 130, 246, 0.1);
}

.info-box strong {
    color: var(--primary-dark);
}

.info-box code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

[data-theme="dark"] .info-box code {
    background-color: rgba(255, 255, 255, 0.1);
}

.info-box ul {
    margin-top: 1rem;
    margin-left: 1.5rem;
}

.info-box li {
    margin: 0.5rem 0;
}

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

.feature-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

.feature-item code {
    background-color: var(--bg-alt);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: var(--primary-color);
}

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

.doc-card {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.doc-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.doc-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

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

/* Contributing Steps */
.contrib-steps {
    max-width: 800px;
    margin: 2rem auto;
    padding-left: 2rem;
}

.contrib-steps li {
    margin: 1rem 0;
    line-height: 1.8;
}

.contrib-steps code {
    background-color: var(--bg-alt);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

/* Requirements */
.requirements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 2rem auto;
}

.req-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.req-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

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

[data-theme="dark"] footer {
    background-color: #0f172a;
    color: #e2e8f0;
}

footer p {
    margin: 0.5rem 0;
}

footer a {
    color: white;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.2s;
}

footer p a {
    margin: 0;
}

[data-theme="dark"] footer a {
    color: #e2e8f0;
}

footer a:hover {
    color: var(--secondary-color);
}

[data-theme="dark"] footer a:hover {
    color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .header-content {
        flex-direction: column;
        align-items: center;
    }

    .header-text {
        min-width: auto;
    }

    .dark-mode-toggle-container {
        position: static;
        margin-top: 1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    section h2 {
        font-size: 2rem;
    }

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

    .code-block {
        font-size: 0.8rem;
    }

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

/* ADR Styles */
.adr-intro {
    background-color: var(--bg-alt);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
}

.adr-intro h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.adr-intro ul {
    margin-left: 1.5rem;
    margin-top: 1rem;
}

.adr-intro li {
    margin-bottom: 0.5rem;
}

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

.adr-card {
    background-color: var(--bg-alt);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 3px solid var(--primary-color);
}

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

.adr-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.adr-card p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.adr-card .btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.adr-card .btn:hover {
    background-color: var(--primary-dark);
}

/* Print Styles */
@media print {
    nav {
        display: none;
    }

    .copy-btn {
        display: none;
    }
}
