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

:root {
    /* Light mode colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --accent-primary: #3b82f6;
    --accent-secondary: #1d4ed8;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-error: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Dark mode colors */
.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --accent-primary: #60a5fa;
    --accent-secondary: #3b82f6;
    --accent-success: #34d399;
    --accent-warning: #fbbf24;
    --accent-error: #f87171;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

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

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Header and Navigation */
.header {
    position: sticky;
    top: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-brand {
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.tagline {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

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

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--accent-primary);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    color: var(--accent-primary);
    background-color: var(--bg-secondary);
}

.theme-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

.sun-icon {
    display: none;
}

.dark-mode .moon-icon {
    display: none;
}

.dark-mode .sun-icon {
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
}

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

.btn-primary:hover {
    background-color: var(--accent-secondary);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 4rem 0;
    min-height: 80vh;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

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

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Code Preview */
.hero-visual {
    display: flex;
    justify-content: center;
}

.code-preview {
    background-color: var(--bg-secondary);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    max-width: 500px;
    width: 100%;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.code-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
}

.dot.red { background-color: #ef4444; }
.dot.yellow { background-color: #f59e0b; }
.dot.green { background-color: #10b981; }

.code-title {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.code-content {
    padding: 1.5rem;
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: auto;
}

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

/* Sections */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Features Section */
.features {
    padding: 6rem 0;
}

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

.feature-card {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.feature-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--accent-primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.feature-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Documentation Section */
.documentation {
    padding: 6rem 0;
}

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

.doc-card {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.doc-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.doc-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.doc-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.doc-link {
    color: var(--accent-primary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.doc-link:hover {
    color: var(--accent-secondary);
}

/* API Section */
.api {
    padding: 6rem 0;
}

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

.api-example {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.api-example h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.code-block {
    background-color: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Download Section */
.download {
    padding: 6rem 0;
}

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

.download-card {
    background-color: var(--bg-primary);
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.download-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.download-card:hover::before {
    opacity: 1;
}

.download-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.download-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.5;
}

.download-card .btn {
    margin-bottom: 1rem;
    min-width: 200px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
}

.download-card small {
    color: var(--text-muted);
    font-size: 0.875rem;
    display: block;
    margin-top: 0.5rem;
}

/* Footer */
.footer {
    padding: 2rem 0 1rem;
    border-top: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}



.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    position: relative;
}

.footer-section h3::after,
.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2rem;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 1px;
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
    text-align: center;
    margin: 0;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
    transition: transform 0.2s ease;
}

.footer-section ul li:hover {
    transform: translateX(5px);
}

.footer-section ul li a {
    color: var(--text-secondary);
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-block;
    padding: 0.25rem 0;
    position: relative;
}

.footer-section ul li a::before {
    content: '→';
    margin-right: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: var(--accent-primary);
}

.footer-section ul li a:hover {
    color: var(--accent-primary);
}

.footer-section ul li a:hover::before {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}



/* Documentation Layout */
.main-content {
    padding: 2rem 0;
}

.content-header {
    text-align: center;
    margin-bottom: 3rem;
}

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

.content-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.content-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    align-items: start;
}

.content-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-nav {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.sidebar-nav h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.sidebar-nav ul {
    list-style: none;
}

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

.sidebar-nav ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.875rem;
}

.sidebar-nav ul li a:hover {
    color: var(--accent-primary);
}

.content-main section {
    margin-bottom: 3rem;
}

.content-main h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-primary);
}

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

.content-main h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.content-main ul, .content-main ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.content-main li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

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

.step-card {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
}

.step-number {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--accent-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Info Boxes */
.info-box {
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--accent-primary);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.info-box h4 {
    margin-bottom: 0.75rem;
    color: var(--accent-primary);
}

.info-box p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

/* Troubleshoot Items */
.troubleshoot-item {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.troubleshoot-item h4 {
    color: var(--accent-error);
    margin-bottom: 0.75rem;
}

.troubleshoot-item p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.troubleshoot-item p:last-child {
    margin-bottom: 0;
}

/* Code Blocks */
.code-block {
    background-color: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    margin: 1rem 0;
}

.code-block pre {
    margin: 0;
}

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

/* Configuration Tables */
.config-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: var(--bg-secondary);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.config-table th {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.config-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.config-table tr:last-child td {
    border-bottom: none;
}

.config-table code {
    background-color: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

/* Certificate Types */
.cert-type {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.cert-type h4 {
    color: var(--accent-primary);
    margin-bottom: 0.75rem;
}

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

.cert-type ul {
    margin-bottom: 0;
}

/* Performance Profiles */
.perf-profile {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.perf-profile h4 {
    color: var(--accent-success);
    margin-bottom: 0.75rem;
}

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

.perf-profile ul {
    margin-bottom: 0;
}

.perf-profile code {
    background-color: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

/* Web Interface Elements */
.feature-highlight {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

.feature-highlight h3 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.url-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.url-item {
    background-color: var(--bg-secondary);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

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

.url-item code {
    background-color: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--accent-primary);
}

.url-item .description {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.control-item {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.control-item h4 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.control-item ul {
    margin-bottom: 0;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.analytics-item {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.analytics-item h4 {
    color: var(--accent-success);
    margin-bottom: 1rem;
}

.analytics-item ul {
    margin-bottom: 0;
}

.api-endpoints {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.endpoint {
    background-color: var(--bg-secondary);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.endpoint code {
    background-color: var(--bg-tertiary);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--accent-primary);
    white-space: nowrap;
}

.endpoint span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 2rem 0;
    }

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

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

    .hero-stats {
        justify-content: center;
    }

    .nav-menu {
        gap: 1rem;
    }

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

    .api-examples {
        grid-template-columns: 1fr;
    }

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

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

    .content-sidebar {
        position: static;
        order: 2;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

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

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

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

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .content-header h1 {
        font-size: 2rem;
    }
} 