:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --code-bg: #1e293b;
    --sidebar-width: 280px;
}

[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
    --code-bg: #0a0f1a;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.7;
    transition: background 0.3s, color 0.3s;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-primary);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    transition: transform 0.3s, background 0.3s;
    z-index: 1000;
}

.sidebar-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 600;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 0.95rem;
}

.nav-item:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.nav-item.active {
    background: var(--bg-secondary);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 500;
}

.nav-item i {
    width: 18px;
    font-size: 1rem;
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.header {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#google_translate_element {
    display: inline-block;
}

#google_translate_element select {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

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

.search-box i {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    color: var(--text-primary);
    width: 250px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    width: 38px;
    height: 38px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.1rem;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.content {
    padding: 2rem;
    max-width: 100%;
    width: 100%;
}

.section {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

.section h2 i {
    color: var(--primary);
}

.section h3 {
    font-size: 1.35rem;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.section h4 {
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem;
    font-weight: 500;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.card {
    background: var(--bg-secondary);
    padding: 1.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.2s;
    text-align: center;
}

.card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.card h3, .card h4 {
    margin: 1rem 0 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.content-block {
    margin: 1.5rem 0;
}

.content-block p {
    margin: 1rem 0;
    color: var(--text-secondary);
}

.content-block ul, .content-block ol {
    margin: 1rem 0 1rem 1.5rem;
    color: var(--text-secondary);
}

.content-block li {
    margin: 0.5rem 0;
}

.code-block {
    position: relative;
    background: var(--code-bg);
    border-radius: 6px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    border: 1px solid var(--border);
}

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

.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.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

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

code {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary);
}

.alert {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 6px;
    margin: 1.5rem 0;
    border-left: 3px solid;
}

.alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.alert-info {
    background: rgba(59, 130, 246, 0.08);
    border-color: #3b82f6;
    color: var(--text-primary);
}

.alert-info i {
    color: #3b82f6;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: #f59e0b;
    color: var(--text-primary);
}

.alert-warning i {
    color: #f59e0b;
}

.alert-success {
    background: rgba(34, 197, 94, 0.08);
    border-color: #22c55e;
    color: var(--text-primary);
}

.alert-success i {
    color: #22c55e;
}

.alert strong {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.alert p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.table-responsive {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.docs-table thead {
    background: var(--bg-tertiary);
}

.docs-table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.docs-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

.docs-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.badge-secondary {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

.tabs {
    margin: 1.5rem 0;
}

.tab-buttons {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
    font-weight: 500;
}

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

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

.tab-content {
    display: none;
}

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

.accordion {
    margin: 1.5rem 0;
}

.accordion-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: left;
    transition: all 0.2s;
}

.accordion-header:hover {
    background: var(--bg-tertiary);
}

.accordion-header i {
    transition: transform 0.3s;
    color: var(--text-secondary);
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
}

.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    margin-top: 3rem;
    padding: 0;
    position: relative;
    left: 0;
    width: 100%;
}

.footer-wrapper {
    width: 100%;
    padding: 2.5rem 2rem 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

.footer-section p, .footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0.5rem 0;
    transition: color 0.2s;
    font-size: 0.95rem;
}

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

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: var(--primary);
}

.steps {
    margin: 2rem 0;
}

.step {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.step.completed {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step.completed .step-number {
    background: #22c55e;
}

.step-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.step-content p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.step-content ul {
    margin: 0.75rem 0 0 1.5rem;
}

.image-placeholder {
    background: var(--bg-secondary);
    border: 2px dashed var(--border);
    border-radius: 6px;
    padding: 3rem;
    text-align: center;
    margin: 1.5rem 0;
}

.image-placeholder i {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.image-placeholder p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.collapsible-section {
    overflow: hidden;
}

.section-toggle {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    transition: all 0.3s;
}

.section-toggle:hover {
    opacity: 0.8;
}

.toggle-icon {
    transition: transform 0.3s;
    font-size: 1.5rem;
    color: var(--primary);
}

.collapsible-section.open .toggle-icon {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.collapsible-section.open .collapsible-content {
    max-height: 50000px;
}

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 250px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .footer {
        margin-left: 0;
        width: 100%;
    }

    .menu-toggle {
        display: block;
    }

    .content {
        padding: 1rem;
    }

    .section {
        padding: 1.5rem;
    }

    .section-header h1 {
        font-size: 1.75rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    .search-box input {
        width: 150px;
    }

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

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

    #google_translate_element {
        display: none;
    }
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

html {
    scroll-behavior: smooth;
}

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