.main-content {
    margin-top: 72px;
    min-height: calc(100vh - 72px);
    display: flex;
}

.sidebar {
    width: 300px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 10px 0;
    position: fixed;
    height: calc(100vh - 72px);
    overflow-y: auto;
    transition: all 0.3s ease;
}

.sidebar-content {
    padding: 0 32px;
}

.nav-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.nav-section-title:hover {
    color: var(--primary);
}

.nav-section.expanded > .nav-section-title {
    color: var(--primary);
}

.nav-section-title::after {
    content: '+';
    font-size: 18px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.nav-section-title.active::after {
    transform: rotate(45deg);
}

.nav-section ul {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

.nav-section.expanded ul {
    max-height: var(--ul-max-height, 500px);
    margin-top: 16px;
    opacity: 1;
}

.nav-section > ul > li {
    margin-bottom: 8px;
}

.nav-section > ul > li > a {
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.nav-section > ul > li > a:hover {
    background: var(--card-hover-bg);
    color: var(--primary);
}

.nav-section > ul > li > a.active {
    background: var(--card-hover-bg);
    color: var(--primary);
}

.content-area {
    flex: 1;
    margin-left: 300px;
    padding: 48px;
    transition: all 0.3s ease;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }
    .content-area {
        margin-left: 250px;
        padding: 32px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        flex-direction: column;
    }

    .content-area {
        margin-left: 0;
        padding: 24px;
    }
}

section#overview,
section#services,
section#demo {
    scroll-margin-top: 88px;
}

.product-header {
    margin-bottom: 24px;
}

.product-title {
    font-size: 34px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    line-height: 1.2;
    position: relative;
    padding-left: 20px;
}

.product-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, #8B5CF6 0%, #6D28D9 100%);
}

.product-description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 32px;
    padding: 24px;
    background: var(--surface);
    border-radius: 12px;
}

.product-features {
    margin-bottom: 24px;
}

.product-features h3 {
    display: none;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
    padding-left: 10px;
    padding-right: 10px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}

.feature-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.product-services {
    margin-bottom: 32px;
}

.product-services h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.service-card {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--card-hover-bg);
}

.service-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.service-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.card-tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
    background: var(--gradient-start);
    color: var(--primary);
    border-radius: 4px;
}

.code-preview-wrapper {
    margin-top: 4px;
}

.code-preview-container {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    transition: all 0.3s ease;
}

.code-preview-container.dark {
    --border: #334155;
    --surface: #1E293B;
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    background: #1E293B;
}

.code-preview-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--background);
    border-bottom: 1px solid var(--border);
}

.code-preview-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.code-preview-tabs {
    display: flex;
    gap: 4px;
    background: var(--border);
    padding: 4px;
    border-radius: 8px;
}

.code-preview-tab {
    padding: 6px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.code-preview-tab:hover {
    color: var(--text-primary);
}

.code-preview-tab.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.code-preview-content {
    min-height: 200px;
    overflow: hidden;
}

.code-block {
    margin: 0;
    padding: 16px;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.code-block .comment {
    color: #6B7280;
}

.code-preview-container.dark .code-block .comment {
    color: #9CA3AF;
}

.code-block .string {
    color: #059669;
}

.code-preview-container.dark .code-block .string {
    color: #34D399;
}

.code-block .keyword {
    color: #7C3AED;
    font-weight: 500;
}

.code-preview-container.dark .code-block .keyword {
    color: #A78BFA;
}

.code-block .number {
    color: #DC2626;
}

.code-preview-container.dark .code-block .number {
    color: #F87171;
}

.preview-block {
    padding: 16px;
    background: var(--surface);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-error {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    padding: 40px;
}

.preview-loading {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    padding: 40px;
}

.preview-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

section#demo {
    margin-top: 48px;
}

section#demo h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.demo-item {
    margin-bottom: 48px;
}

.demo-item h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.demo-info {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.info-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary);
    color: white;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
}

.prompt-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: 12px;
}

.prompt-section-title {
    font-weight: 600;
    color: var(--text-primary);
}

.model-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 0px;
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    width: fit-content;
}

.sticky-tabs-wrapper {
    position: sticky;
    top: 72px;
    z-index: 100;
    background: var(--background);
    padding: 12px 0;
    margin-bottom: 0px;
}

.demo-item:not(:first-child) .sticky-tabs-wrapper {
    margin-top: 0px;
}

.model-tab {
    padding: 8px 18px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.model-tab:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}

.model-tab.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px var(--primary-shadow);
}

.model-content {
    position: relative;
}

.model-preview-root {
    display: none !important;
}

.model-preview-root.active {
    display: block !important;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.copy-btn.copied {
    background: #10B981;
    color: white;
    border-color: #10B981;
}

.copy-icon {
    font-size: 12px;
}

#case1,
#case2,
#case3 {
    scroll-margin-top: 88px;
}

.preview-iframe {
    width: 100%;
    border: none;
    border-radius: 8px;
    background: white;
    overflow-y: auto;
    overflow-x: hidden;
}

.preview-html {
    min-height: 200px;
    overflow: auto;
}

.iframe-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: var(--background);
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 48px 32px;
    text-align: center;
}

.iframe-error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.iframe-error-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.iframe-error-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.iframe-error-btn {
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

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