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

:root {
    --primary-color: #00A896;
    --secondary-color: #02C39A;
    --accent-color: #028090;
    --dark-text: #2C3E50;
    --light-text: #7F8C8D;
    --background: #F8F9FA;
    --white: #FFFFFF;
    --border-color: #E1E8ED;
    --hover-bg: #F0F3F5;
    --blue-btn: #0066CC;
    --orange-btn: #FF6B35;
}

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

/* Header Styles */
.header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 28px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.app-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-text);
    margin: 0;
}

.app-subtitle {
    font-size: 13px;
    color: var(--light-text);
    margin: 0;
}

.header-meta {
    display: flex;
    align-items: center;
}

.doc-label {
    font-size: 20px;
    color: var(--dark-text);
    font-weight: 500;
    padding-left: 20px;
    border-left: 2px solid var(--border-color);
}

.header-search {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.1);
}

.search-icon {
    position: absolute;
    left: 18px;
    color: var(--light-text);
    font-size: 16px;
}

.clear-search {
    position: absolute;
    right: 18px;
    color: var(--light-text);
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.clear-search:hover {
    color: var(--dark-text);
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-result-item {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--hover-bg);
}

.search-result-title {
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 4px;
}

.search-result-path {
    font-size: 13px;
    color: var(--light-text);
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: var(--light-text);
}

.search-highlight {
    background-color: yellow;
    font-weight: 600;
}

.header-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-block;
}

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

.btn-support:hover {
    background-color: #0052A3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
}

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

.btn-demo:hover {
    background-color: #0052A3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
}

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

.btn-install:hover {
    background-color: #E85A2A;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

/* Container Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    position: relative;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    background-color: var(--white);
    min-height: calc(100vh - 100px);
    max-height: calc(100vh - 100px);
    padding: 30px 0;
    position: sticky;
    top: 100px;
    height: fit-content;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--background);
}

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

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--light-text);
}

/* Firefox scrollbar */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--background);
}

.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu > ul > li {
    margin-bottom: 5px;
}

.nav-link {
    display: block;
    padding: 10px 30px;
    color: var(--dark-text);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

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

.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(0, 168, 150, 0.05);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.sub-menu {
    list-style: none;
    padding-left: 0;
    margin-top: 5px;
}

.sub-menu .nav-link {
    padding: 8px 30px 8px 50px;
    font-size: 14px;
    color: var(--light-text);
}

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

/* Level 3 sub-menu styling */
.sub-menu-lv3 {
    list-style: none;
    padding-left: 0;
    margin-top: 0;
    margin-bottom: 5px;
}

.sub-menu-lv3 .nav-link {
    padding: 7px 30px 7px 70px;
    font-size: 13px;
    color: #95A5A6;
    position: relative;
}

.sub-menu-lv3 .nav-link::before {
    content: "└";
    position: absolute;
    left: 55px;
    color: var(--border-color);
    font-weight: normal;
}

.sub-menu-lv3 .nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(0, 168, 150, 0.03);
}

.sub-menu-lv3 .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(0, 168, 150, 0.08);
    border-left-color: transparent;
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px 60px;
    background-color: var(--white);
    max-width: calc(100% - 280px);
}

.content-section {
    margin-bottom: 60px;
    scroll-margin-top: 120px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
}

.subsection-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 15px;
    margin-top: 10px;
}

.section-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--dark-text);
}

.section-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-text);
    margin: 25px 0 15px 0;
}

.section-content p {
    margin-bottom: 15px;
}

.section-content ul,
.section-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.section-content li {
    margin-bottom: 10px;
}

.steps-list {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
}

.steps-list > li {
    counter-increment: step-counter;
    margin-bottom: 25px;
    padding-left: 50px;
    position: relative;
}

.steps-list > li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.steps-list > li strong {
    display: block;
    font-size: 18px;
    color: var(--dark-text);
    margin-bottom: 8px;
}

.steps-list > li p {
    color: var(--light-text);
    margin-bottom: 5px;
}

.steps-list > li ul {
    margin-top: 10px;
    padding-left: 20px;
}

/* Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 30px 0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* Info Boxes */
.info-box,
.success-box {
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    display: flex;
    align-items: start;
    gap: 15px;
}

.info-box {
    background-color: #E3F2FD;
    border-left: 4px solid #2196F3;
}

.success-box {
    background-color: #E8F5E9;
    border-left: 4px solid #4CAF50;
}

.info-box i,
.success-box i {
    font-size: 24px;
    margin-top: 2px;
}

.info-box i {
    color: #2196F3;
}

.success-box i {
    color: #4CAF50;
}

.info-box p,
.success-box p {
    margin: 0;
    flex: 1;
}

/* Code Block */
.code-block {
    background-color: #F4F5F7;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.code-block code {
    color: #2C3E50;
}

/* Documentation Images */
.doc-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-search {
        width: 100%;
        max-width: 100%;
        order: 3;
    }

    .sidebar {
        width: 250px;
    }

    .main-content {
        padding: 30px 40px;
        max-width: calc(100% - 250px);
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        min-height: auto;
    }

    .main-content {
        max-width: 100%;
        padding: 20px;
    }

    .section-title {
        font-size: 26px;
    }

    .subsection-title {
        font-size: 20px;
    }

    .doc-label {
        display: none;
    }

    .header-search {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .app-title {
        font-size: 18px;
    }

    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .header-search {
        width: 100%;
    }

    .search-input {
        font-size: 14px;
        padding: 10px 40px;
    }

    .main-content {
        padding: 15px;
    }

    .steps-list > li {
        padding-left: 45px;
    }

    .steps-list > li::before {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

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