/* Documentation Page Styles */

/* CSS Variables для повторяющихся значений */
:root {
    --doc-bg-dark: rgba(21, 21, 21, 0.8);
    --doc-bg-darker: rgba(21, 21, 21, 0.6);
    --doc-bg-light: rgba(255, 255, 255, 0.05);
    --doc-border: rgba(255, 255, 255, 0.1);
    --doc-accent: #6468FB;
    --doc-accent-bg: rgba(100, 104, 251, 0.2);
    --doc-accent-border: rgba(100, 104, 251, 0.4);
    --doc-text-primary: white;
    --doc-text-secondary: rgba(186, 186, 186, 1);
    --doc-text-muted: rgba(186, 186, 186, 0.8);
    --doc-text-dim: rgba(186, 186, 186, 0.6);
    --doc-transition: all 0.3s ease;
    --doc-transition-fast: all 0.2s ease;
    --doc-radius-sm: 10px;
    --doc-radius-md: 12px;
    --doc-radius-lg: 20px;
    --doc-radius-xl: 24px;
    --doc-font-main: 'Inter', 'Arial Narrow', Arial, sans-serif;
    --doc-font-title: 'Square721TL-BoldExtended', 'Arial Black', Arial, sans-serif;
    --doc-font-code: 'Courier New', 'Consolas', 'Monaco', monospace;
}

/* Base Layout */
.documentation-section {
    width: 100%;
    padding: 150px 40px 80px;
    min-height: calc(100vh - 200px);
}

.documentation-container {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    gap: 50px;
    align-items: flex-start;
    overflow: visible;
    justify-content: center;
}

/* Sidebar Wrapper */
.documentation-sidebar-wrapper {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 150px;
    max-height: calc(100vh - 200px);
    align-self: flex-start;
    overflow: visible;
    transition: width 0.3s ease;
    height: fit-content;
}

/* Toggle Button */
.sidebar-toggle-btn {
    position: absolute;
    top: 0;
    right: -24px;
    width: 24px;
    height: 40px;
    background: var(--doc-bg-dark);
    border: 1px solid var(--doc-border);
    border-left: none;
    border-radius: 0 var(--doc-radius-md) var(--doc-radius-md) 0;
    color: var(--doc-text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: var(--doc-transition);
    backdrop-filter: blur(10px);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
}

.sidebar-toggle-btn:hover {
    background: var(--doc-accent-bg);
    color: var(--doc-accent);
    border-color: var(--doc-accent-border);
}

.sidebar-toggle-btn i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

/* Collapsed State */
.documentation-sidebar-wrapper.collapsed {
    width: 80px;
    position: sticky;
    top: 150px;
    max-height: calc(100vh - 200px);
    align-self: flex-start;
    overflow: visible;
    height: fit-content;
}

.documentation-sidebar-wrapper.collapsed .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

.documentation-sidebar-wrapper.collapsed .sidebar-platform-selector {
    padding: 8px;
    overflow: hidden;
}

.documentation-sidebar-wrapper.collapsed .sidebar-platform-header {
    display: none;
}

.documentation-sidebar-wrapper.collapsed .sidebar-platform-buttons {
    flex-direction: column;
    gap: 4px;
}

.documentation-sidebar-wrapper.collapsed .sidebar-platform-btn {
    width: 100%;
    height: 40px;
    justify-content: center;
}

.documentation-sidebar-wrapper.collapsed .sidebar-platform-btn:first-child {
    width: 100%;
    padding: 0 8px;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.documentation-sidebar-wrapper.collapsed .sidebar-platform-btn:first-child span {
    display: inline;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.documentation-sidebar-wrapper.collapsed .sidebar-platform-btn .platform-icon-img {
    width: 24px;
    height: 24px;
}

.documentation-sidebar-wrapper.collapsed .sidebar-nav {
    padding: 12px 8px;
    overflow-y: auto;
    overflow-x: visible;
}

.documentation-sidebar-wrapper.collapsed .sidebar-item,
.documentation-sidebar-wrapper.collapsed .sidebar-group-header {
    padding: 8px;
    justify-content: center;
    align-items: center;
    font-size: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    width: 100%;
    min-height: 48px;
}

.documentation-sidebar-wrapper.collapsed .sidebar-item span,
.documentation-sidebar-wrapper.collapsed .sidebar-group-header span {
    display: none;
}

.documentation-sidebar-wrapper.collapsed .sidebar-item i:first-child,
.documentation-sidebar-wrapper.collapsed .sidebar-group-header i:first-child {
    font-size: 24px;
    width: 24px;
    height: 24px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.documentation-sidebar-wrapper.collapsed .sidebar-group-header i:last-child {
    display: none;
}

.documentation-sidebar-wrapper.collapsed .sidebar-search {
    display: none;
}

.documentation-sidebar-wrapper.collapsed .sidebar-group-content {
    display: none;
    padding-left: 0;
    margin-top: 4px;
}

.documentation-sidebar-wrapper.collapsed .sidebar-group-header.active ~ .sidebar-group-content {
    display: block;
}

.documentation-sidebar-wrapper.collapsed .code-theme-selector {
    margin-left: 0;
    justify-content: center;
    gap: 4px;
    position: relative;
    overflow: visible;
}

.documentation-sidebar-wrapper.collapsed .reading-mode-btn,
.documentation-sidebar-wrapper.collapsed .theme-settings-btn {
    width: 32px;
    height: 32px;
    font-size: 13px;
}

.documentation-sidebar-wrapper.collapsed .theme-dropdown {
    left: 100%;
    right: auto;
    transform: none;
    min-width: 220px;
    margin-left: 8px;
}

.documentation-sidebar-wrapper.collapsed .sidebar-category {
    margin-bottom: 8px;
    overflow: hidden;
}

.documentation-sidebar-wrapper.collapsed .sidebar-category-header {
    display: none !important;
    visibility: hidden;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.documentation-sidebar-wrapper.collapsed .sidebar-category-content {
    padding-left: 0;
    gap: 4px;
}

.documentation-sidebar-wrapper.collapsed .sidebar-subitem {
    padding: 8px;
    justify-content: center;
    align-items: center;
    min-width: 0;
    width: 100%;
    min-height: 48px;
    position: relative;
}

.documentation-sidebar-wrapper.collapsed .sidebar-subitem span {
    display: none;
}

.documentation-sidebar-wrapper.collapsed .sidebar-subitem .sidebar-module-icon {
    width: 24px;
    height: 24px;
    margin: 0;
    flex-shrink: 0;
}

.documentation-sidebar-wrapper.collapsed .sidebar-subitem i:not(.sidebar-module-icon) {
    display: none;
}

.documentation-sidebar-wrapper.collapsed .sidebar-subitem .sidebar-module-icon {
    display: inline-block !important;
    font-size: 20px;
    color: var(--doc-text-secondary);
}

.documentation-sidebar-wrapper.collapsed .sidebar-subitem::before {
    display: none;
}

.documentation-sidebar-wrapper.collapsed .documentation-sidebar {
    overflow: visible;
}

/* Sidebar */
.documentation-sidebar {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 10px;
}

/* Sidebar Navigation - общие стили для контейнера */
.sidebar-nav {
    background: var(--doc-bg-dark);
    border-radius: var(--doc-radius-lg);
    padding: 20px;
    border: 1px solid var(--doc-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    max-height: calc(100vh - 600px);
    scrollbar-gutter: stable;
}

/* Scrollbar Styles */
.sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
    margin: 0;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: var(--doc-transition-fast);
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Search */
.sidebar-search {
    margin-bottom: 8px;
}

.sidebar-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-search-icon {
    position: absolute;
    left: 12px;
    color: var(--doc-text-dim);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.sidebar-search-input {
    width: 100%;
    padding: 10px 36px;
    background: var(--doc-bg-darker);
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius-sm);
    color: var(--doc-text-primary);
    font-family: var(--doc-font-main);
    font-size: 14px;
    transition: var(--doc-transition-fast);
}

.sidebar-search-input::placeholder {
    color: rgba(186, 186, 186, 0.5);
}

.sidebar-search-input:focus {
    outline: none;
    border-color: var(--doc-accent-border);
    background: var(--doc-bg-dark);
    box-shadow: 0 0 0 2px rgba(100, 104, 251, 0.1);
}

.sidebar-search-clear {
    position: absolute;
    right: 8px;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: var(--doc-text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--doc-transition-fast);
    z-index: 1;
}

.sidebar-search-clear:hover {
    background: var(--doc-bg-light);
    color: var(--doc-text-muted);
}

/* Общие стили для интерактивных элементов sidebar */
.sidebar-item,
.sidebar-group-header,
.sidebar-subitem,
.toc-nav-item {
    font-family: var(--doc-font-main);
    color: var(--doc-text-primary);
    text-decoration: none;
    border-radius: var(--doc-radius-md);
    border: none;
    background: transparent;
    cursor: pointer;
    transition: var(--doc-transition);
    text-align: left;
    display: flex;
    align-items: center;
    width: 100%;
}

/* Основные элементы sidebar */
.sidebar-item,
.sidebar-group-header {
    font-size: 16px;
    font-weight: 500;
    padding: 12px 20px;
    gap: 12px;
}

.sidebar-item i:first-child,
.sidebar-group-header i:first-child {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-group-header {
    justify-content: space-between;
}

.sidebar-group-header i:last-child {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.sidebar-group-header.active i:last-child {
    transform: rotate(180deg);
}

/* Hover эффекты */
.sidebar-item:hover,
.sidebar-group-header:hover,
.sidebar-subitem:hover,
.toc-nav-item:hover {
    background: var(--doc-bg-light);
}

.sidebar-item:hover,
.sidebar-group-header:hover {
    color: var(--doc-accent);
}

.sidebar-subitem:hover,
.toc-nav-item:hover {
    color: var(--doc-text-primary);
}

/* Active state */
.sidebar-item.active,
.sidebar-group-header.active {
    background: var(--doc-accent-bg);
    color: var(--doc-accent);
}

.sidebar-item.active {
    padding-left: 17px;
}

/* Group */
.sidebar-group {
    display: flex;
    flex-direction: column;
}

.sidebar-group-content {
    display: none;
    padding-left: 0;
    margin-top: 8px;
}

.sidebar-group-header.active ~ .sidebar-group-content {
    display: block;
}

/* Category */
.sidebar-category {
    margin-bottom: 16px;
}

.sidebar-category-header {
    font-family: var(--doc-font-main);
    font-size: 11px;
    font-weight: 600;
    color: var(--doc-text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    padding-left: 20px;
    padding-top: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.sidebar-category-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-left: 20px;
}

/* Subitem */
.sidebar-subitem {
    font-size: 14px;
    font-weight: 400;
    color: var(--doc-text-secondary);
    padding: 10px 16px;
    padding-left: 24px;
    justify-content: space-between;
    margin-bottom: 4px;
    position: relative;
}

.sidebar-subitem img {
    position: absolute;
    right: 10px;
}

.sidebar-subitem::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--doc-accent);
    border-radius: 2px;
    transition: height 0.2s ease;
}

.sidebar-subitem span {
    flex: 1;
    max-width: 150px;
}

.sidebar-subitem[style*="display: none"] {
    display: none !important;
}

.sidebar-subitem.active {
    color: var(--doc-accent);
    background: rgba(100, 104, 251, 0.1);
}

.sidebar-subitem.active::before {
    height: 16px;
}

.sidebar-subitem.active:hover {
    background: rgba(100, 104, 251, 0.15);
}

.sidebar-subitem i {
    font-size: 12px;
    color: var(--doc-text-dim);
}

.sidebar-subitem:hover i,
.sidebar-subitem.active i {
    color: var(--doc-accent);
}

.sidebar-subitem.active .sidebar-module-icon {
    opacity: 1;
    filter: brightness(1.3) saturate(1.2);
    transform: scale(1.1);
}

.sidebar-module-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 0.7;
    transition: var(--doc-transition-fast);
    flex-shrink: 0;
}

.sidebar-subitem:hover .sidebar-module-icon {
    opacity: 1;
    transform: scale(1.1);
}

/* Theme Controls */
.code-theme-selector {
    position: relative;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    width: 100%;
    justify-content: space-between;
}

.reading-mode-btn {
    width: 36px;
    height: 36px;
    background: rgba(21, 21, 21, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--doc-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--doc-transition-fast);
    color: var(--doc-text-muted);
    font-size: 14px;
}

.reading-mode-btn:hover {
    background: var(--doc-bg-light);
    border-color: var(--doc-accent-border);
    color: var(--doc-accent);
}

.theme-selector-wrapper {
    position: relative;
    display: flex;
    flex: 1;
}

.theme-selector-select {
    background: rgba(21, 21, 21, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--doc-radius-sm);
    padding: 6px 28px 6px 10px;
    cursor: pointer;
    transition: var(--doc-transition-fast);
    color: var(--doc-text-muted);
    font-size: 12px;
    font-family: var(--doc-font-main);
    height: 36px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    width: 100%;
    flex: 1;
}

.theme-selector-select:hover {
    background-color: var(--doc-bg-light);
    border-color: var(--doc-accent-border);
    color: var(--doc-text-primary);
}

.theme-selector-select:focus {
    outline: none;
    border-color: var(--doc-accent-border);
    background-color: var(--doc-bg-light);
}

.reading-mode-btn.active {
    background: var(--doc-accent-bg);
    border-color: var(--doc-accent-border);
    color: var(--doc-accent);
}


/* Content Area */
.documentation-content-wrapper {
    flex: 1;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    position: relative;
    justify-content: center;
    min-width: 0;
}

.documentation-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
    max-width: 900px;
    align-items: center;
}

.content-header {
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    width: 100%;
}

.documentation-sidebar-wrapper.collapsed ~ .documentation-content-wrapper .content-header {
    margin-left: auto;
    margin-right: auto;
}

/* TOC */
.documentation-toc {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 150px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    background: var(--doc-bg-dark);
    border-radius: var(--doc-radius-lg);
    padding: 20px;
    border: 1px solid var(--doc-border);
    backdrop-filter: blur(10px);
    align-self: flex-start;
    display: flex;
    flex-direction: column;
}

.theme-buttons-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--doc-border);
}

.toc-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
}

.toc-title {
    font-family: var(--doc-font-main);
    font-size: 14px;
    font-weight: 600;
    color: var(--doc-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc-nav-item {
    font-size: 14px;
    font-weight: 400;
    color: var(--doc-text-muted);
    padding: 8px 12px;
    padding-left: 24px;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

.toc-nav-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--doc-accent);
    border-radius: 2px;
    transition: height 0.2s ease;
}

.toc-nav-item.active {
    color: var(--doc-accent);
    background: rgba(100, 104, 251, 0.1);
}

.toc-nav-item.active::before {
    height: 16px;
}

/* Platform Selector */
.sidebar-platform-selector {
    width: 100%;
    padding: 12px;
    background: var(--doc-bg-dark);
    border-radius: var(--doc-radius-lg) 0px var(--doc-radius-lg) var(--doc-radius-lg);
    border: 1px solid var(--doc-border);
    transition: var(--doc-transition);
    flex-shrink: 0;
    z-index: 10;
}

.sidebar-platform-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
}

.sidebar-platform-label {
    font-family: var(--doc-font-main);
    font-size: 12px;
    font-weight: 500;
    color: var(--doc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    margin-left: 5px;
}

.sidebar-platform-status {
    font-family: var(--doc-font-main);
    font-size: 11px;
    color: rgba(100, 104, 251, 0.8);
    font-weight: 500;
    text-align: right;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-platform-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar-platform-btn {
    width: 40px;
    height: 40px;
    background: rgba(21, 21, 21, 0.5);
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--doc-transition-fast);
    padding: 0;
    position: relative;
}

.sidebar-platform-btn:first-child {
    width: auto;
    padding: 0 12px;
    font-family: var(--doc-font-main);
    font-size: 12px;
    font-weight: 500;
    color: var(--doc-text-muted);
}

.sidebar-platform-btn:hover {
    background: var(--doc-bg-light);
    border-color: var(--doc-accent-border);
    transform: translateY(-1px);
}

.sidebar-platform-btn.active {
    background: var(--doc-accent-bg);
    border-color: var(--doc-accent-border);
}

.sidebar-platform-btn.active:first-child {
    color: var(--doc-accent);
}

.sidebar-platform-btn .platform-icon-img {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.sidebar-platform-btn:hover .platform-icon-img,
.sidebar-platform-btn.active .platform-icon-img {
    opacity: 1;
}

.sidebar-platform-btn.active .platform-icon-img {
    filter: brightness(1);
}

/* Content Headers */
.content-title {
    font-family: var(--doc-font-main);
    font-size: 48px;
    font-weight: 600;
    color: var(--doc-text-primary);
    margin: 0;
}

.content-product-title {
    font-family: var(--doc-font-title);
    font-size: 72px;
    font-weight: bold;
    color: var(--doc-text-primary);
    margin: 0 0 24px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.content-description {
    font-family: var(--doc-font-main);
    font-size: 20px;
    color: var(--doc-text-secondary);
    line-height: 1.6;
    margin: 0 0 32px 0;
    max-width: 900px;
}

/* Welcome Screen Styles */
.welcome-info-box {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(21, 21, 21, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    padding: 20px 24px;
    margin: 40px 0;
    max-width: 900px;
}

.welcome-info-box i {
    font-size: 20px;
    color: var(--doc-accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.welcome-info-box p {
    font-family: var(--doc-font-main);
    font-size: 15px;
    color: var(--doc-text-primary);
    line-height: 1.7;
    margin: 0;
}

.welcome-section {
    margin: 48px 0;
    max-width: 900px;
}

.welcome-section-title {
    font-family: var(--doc-font-main);
    font-size: 28px;
    font-weight: 600;
    color: var(--doc-text-primary);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--doc-border);
}

.welcome-section-text {
    font-family: var(--doc-font-main);
    font-size: 16px;
    color: var(--doc-text-secondary);
    line-height: 1.8;
    margin: 0;
}

.welcome-articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 32px;
    max-width: 900px;
}

.welcome-article-card {
    background: rgba(21, 21, 21, 0.8);
    border-radius: 24px;
    padding: 24px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.welcome-article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.welcome-article-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--doc-bg-light);
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius-sm);
    color: var(--doc-text-primary);
    font-size: 20px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.welcome-article-card:hover .welcome-article-icon {
    background: var(--doc-accent-bg);
    border-color: var(--doc-accent-border);
    color: var(--doc-accent);
}

.welcome-article-title {
    font-family: var(--doc-font-main);
    font-size: 18px;
    font-weight: 600;
    color: var(--doc-text-primary);
    margin: 0;
}

.welcome-article-description {
    font-family: var(--doc-font-main);
    font-size: 14px;
    color: var(--doc-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Markdown Content */
.markdown-content {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin-top: 40px;
    margin-left: auto;
    margin-right: auto;
}

/* Copy All Documentation Button */
.markdown-copy-all-wrapper {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.markdown-copy-all-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--doc-bg-dark);
    border: 1px solid var(--doc-border);
    color: var(--doc-text-secondary);
    padding: 8px 14px;
    border-radius: var(--doc-radius-sm);
    font-family: var(--doc-font-main);
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: var(--doc-transition-fast);
}

.markdown-copy-all-btn:hover {
    background: var(--doc-bg-light);
    border-color: var(--doc-border);
    color: var(--doc-text-primary);
}

.markdown-copy-all-btn:active {
    transform: translateY(0);
}

.markdown-copy-all-btn i {
    font-size: 12px;
}

.markdown-copy-all-btn.copied {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
    color: #4CAF50;
}

.markdown-copy-all-btn.copied:hover {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.5);
}

.documentation-sidebar-wrapper.collapsed ~ .documentation-content-wrapper .markdown-content {
    max-width: 1140px;
}

.markdown-content h1 {
    font-family: var(--doc-font-main);
    font-size: 36px;
    font-weight: 600;
    color: var(--doc-text-primary);
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--doc-border);
}

.markdown-content h2 {
    font-family: var(--doc-font-main);
    font-size: 28px;
    font-weight: 600;
    color: var(--doc-text-primary);
    margin: 32px 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--doc-border);
    transition: var(--doc-transition);
    position: relative;
    scroll-margin-top: 150px;
}

.markdown-content h2.flash-highlight {
    color: var(--doc-accent);
    border-bottom-color: var(--doc-accent-border);
    animation: flashHeading 2.5s ease-in-out;
}

.markdown-content h2.flash-highlight::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    bottom: 12px;
    width: 4px;
    background: var(--doc-accent);
    border-radius: 2px;
    animation: flashIndicator 2.5s ease-in-out;
}

@keyframes flashHeading {
    0%, 20% { color: var(--doc-accent); border-bottom-color: rgba(100, 104, 251, 0.7); }
    60% { color: var(--doc-accent); border-bottom-color: var(--doc-accent-border); }
    100% { color: var(--doc-text-primary); border-bottom-color: var(--doc-border); }
}

@keyframes flashIndicator {
    0%, 20%, 60% { opacity: 1; transform: scaleY(1); }
    100% { opacity: 0; transform: scaleY(0); }
}

.markdown-content h3 {
    font-family: var(--doc-font-main);
    font-size: 22px;
    font-weight: 600;
    color: var(--doc-text-primary);
    margin: 24px 0 16px 0;
}

.markdown-content h4 {
    font-family: var(--doc-font-main);
    font-size: 18px;
    font-weight: 600;
    color: var(--doc-text-primary);
    margin: 20px 0 12px 0;
}

.markdown-content p,
.markdown-content ul,
.markdown-content ol {
    font-family: var(--doc-font-main);
    font-size: 16px;
    color: var(--doc-text-secondary);
    line-height: 1.8;
    margin: 0 0 16px 0;
}

.markdown-content ul,
.markdown-content ol {
    padding-left: 24px;
}

.markdown-content li {
    margin-bottom: 8px;
}

.markdown-content code {
    font-family: var(--doc-font-code);
    font-size: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.95);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.markdown-content pre {
    background: var(--doc-bg-dark);
    border: 1px solid var(--doc-border);
    border-radius: 15px;
    padding: 20px;
    padding-top: 50px;
    overflow-x: auto;
    margin: 20px 0;
    position: relative;
}

.markdown-content pre code {
    background: transparent;
    color: var(--doc-text-secondary);
    padding: 0;
    border: none;
    font-size: 14px;
    line-height: 1.6;
    display: block;
    font-family: var(--doc-font-code);
}

.markdown-content pre code.hljs {
    background: transparent !important;
    padding: 0 !important;
    display: block;
    overflow-x: auto;
}

.markdown-content pre.hljs {
    background: var(--doc-bg-dark) !important;
}

/* Copy Code Button */
.copy-code-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--doc-accent-bg);
    border: 1px solid var(--doc-accent-border);
    color: var(--doc-accent);
    padding: 8px 16px;
    border-radius: var(--doc-radius-sm);
    font-family: var(--doc-font-main);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--doc-transition);
    z-index: 10;
    backdrop-filter: blur(10px);
}

.copy-code-btn:hover {
    background: rgba(100, 104, 251, 0.3);
    border-color: rgba(100, 104, 251, 0.6);
    transform: translateY(-2px);
}

.copy-code-btn.copied {
    background: rgba(90, 247, 90, 0.2);
    border-color: rgba(90, 247, 90, 0.4);
    color: #5AF75A;
}

.copy-code-btn i,
.copy-code-btn span {
    font-size: 14px;
}

/* Other Markdown Elements */
.markdown-content blockquote {
    border-left: 4px solid var(--doc-accent);
    padding-left: 20px;
    margin: 20px 0;
    color: var(--doc-text-muted);
    font-style: italic;
}

.markdown-content a {
    color: var(--doc-accent);
    text-decoration: none;
    transition: var(--doc-transition);
}

.markdown-content a:hover {
    color: #7F82FF;
    text-decoration: underline;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--doc-bg-darker);
    border-radius: var(--doc-radius-md);
    overflow: hidden;
}

.markdown-content th,
.markdown-content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--doc-border);
}

.markdown-content th {
    background: var(--doc-accent-bg);
    color: var(--doc-text-primary);
    font-weight: 600;
}

.markdown-content td {
    color: var(--doc-text-secondary);
}

.markdown-content img {
    max-width: 100%;
    max-height: 500px;
    height: auto;
    width: auto;
    object-fit: contain;
    border-radius: var(--doc-radius-md);
    margin: 20px auto;
    display: block;
    cursor: pointer;
    transition: var(--doc-transition);
}

/* Вертикальные изображения (высота больше ширины) - увеличиваем максимальную высоту */
.markdown-content img.vertical-image {
    max-height: 750px;
}

.markdown-content img:hover {
    transform: scale(1.02);
}

.markdown-content hr {
    border: none;
    border-top: 1px solid var(--doc-border);
    margin: 32px 0;
}

/* Messages */
.loading-indicator {
    font-family: var(--doc-font-main);
    font-size: 18px;
    color: var(--doc-text-secondary);
    text-align: center;
    padding: 40px;
}

.error-message {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: var(--doc-radius-md);
    padding: 24px;
    margin: 20px 0;
}

.error-message h3 {
    font-family: var(--doc-font-main);
    font-size: 20px;
    font-weight: 600;
    color: #FF6B6B;
    margin: 0 0 12px 0;
}

.error-message p {
    font-family: var(--doc-font-main);
    font-size: 14px;
    color: var(--doc-text-secondary);
    margin: 8px 0;
}

/* Reading Mode */
body.reading-mode .documentation-sidebar-wrapper,
body.reading-mode .documentation-toc {
    display: none !important;
}

body.reading-mode .documentation-container {
    max-width: 100%;
    padding: 0;
    justify-content: center;
}

body.reading-mode .documentation-content-wrapper {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

body.reading-mode .documentation-content {
    max-width: 100%;
    width: 100%;
}

body.reading-mode .markdown-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

body.reading-mode .header {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

body.reading-mode .header:hover {
    opacity: 1;
}

/* Exit Reading Mode Button */
.exit-reading-mode-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(100, 104, 251, 0.9);
    border: 1px solid rgba(100, 104, 251, 0.6);
    border-radius: var(--doc-radius-md);
    color: var(--doc-text-primary);
    font-family: var(--doc-font-main);
    font-size: 18px;
    cursor: pointer;
    z-index: 10000;
    transition: var(--doc-transition);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.exit-reading-mode-btn span {
    display: none;
}

.exit-reading-mode-btn:hover {
    background: rgba(100, 104, 251, 1);
    border-color: rgba(100, 104, 251, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(100, 104, 251, 0.4);
}

.exit-reading-mode-btn::after {
    content: var(--exit-reading-mode-text, 'Выйти из режима чтения');
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(21, 21, 21, 0.95);
    color: var(--doc-text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: var(--doc-font-main);
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
    pointer-events: none;
    border: 1px solid var(--doc-border);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10001;
}

.exit-reading-mode-btn::before {
    content: '';
    position: absolute;
    right: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid rgba(21, 21, 21, 0.95);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10001;
}

.exit-reading-mode-btn:hover::after,
.exit-reading-mode-btn:hover::before {
    opacity: 1;
}

body.reading-mode .exit-reading-mode-btn {
    display: flex;
}

/* Carousel */
.carousel-indicators {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--doc-transition);
}

.carousel-dot.active {
    background: var(--doc-text-primary);
    width: 14px;
    height: 14px;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.documentation-footer {
    width: 100%;
    padding: 40px;
    text-align: center;
}

/* Squircle Support */
@supports (corner-shape: squircle) {
    .welcome-info-box {
        corner-shape: squircle;
        border-radius: 40px;
    }

    .welcome-article-card {
        corner-shape: squircle;
        border-radius: 40px;
    }
    
    .welcome-article-card.gradient-border-feature::before {
        corner-shape: squircle;
        border-radius: 40px;
    }

    .markdown-copy-all-btn {
        corner-shape: squircle;
        border-radius: 20px;
    }

    .sidebar-nav,
    .documentation-toc,
    .sidebar-platform-selector {
        corner-shape: squircle;
        border-radius: 40px;
    }
    
    .sidebar-platform-selector {
        border-radius: 40px 0px 40px 40px;
    }
    
    .sidebar-item,
    .sidebar-group-header,
    .sidebar-subitem,
    .toc-nav-item {
        corner-shape: squircle;
        border-radius: var(--doc-radius-xl);
    }
    
    .markdown-content pre {
        corner-shape: squircle;
        border-radius: 30px;
    }
    
    .copy-code-btn,
    .exit-reading-mode-btn {
        corner-shape: squircle;
        border-radius: 20px;
    }
}

/* Responsive */
@media (max-width: 1024px) {

    .exit-reading-mode-btn {
        top: 20px;
        right: 29px;
    }
    
    .documentation-container {
        flex-direction: column;
        gap: 30px;
    }

    .documentation-sidebar-wrapper {
        width: 100%;
        position: static;
        max-height: none;
    }

    .sidebar-toggle-btn {
        display: none;
    }

    .documentation-sidebar {
        width: 100%;
    }
    
    .documentation-content-wrapper {
        flex-direction: column;
        gap: 30px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        align-items: center;
    }
    
    .documentation-toc {
        width: 100%;
        position: static;
        max-height: none;
        order: -1;
    }
    
    .toc-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .toc-nav-item {
        padding: 8px 16px;
        padding-left: 16px;
        white-space: nowrap;
    }
    
    .toc-nav-item::before {
        display: none;
    }

    .carousel-indicators {
        flex-direction: row;
    }

    .sidebar-platform-selector {
        border-radius: 40px;
    }
    
}

@media (max-width: 767px) {


    .sidebar-toggle-btn {
        display: none;
    }

   
    .documentation-section {
        padding: calc(92px + env(safe-area-inset-top)) 16px 40px;
    }

    .sidebar-platform-buttons {
        justify-content: center;
        gap: 8px;
    }

    .sidebar-platform-btn {
        width: 40px;
        height: 40px;
    }

    .sidebar-platform-btn:first-child {
        width: auto;
        padding: 0 12px;
        font-size: 12px;
    }

    .sidebar-platform-btn .platform-icon-img {
        width: 22px;
        height: 22px;
    }

    .content-title {
        font-size: 28px;
        margin-bottom: 16px;
    }

    .content-product-title {
        font-size: 32px;
        margin-bottom: 16px;
        letter-spacing: 1px;
    }

    .content-description {
        font-size: 15px;
        margin-bottom: 32px;
        line-height: 1.6;
    }

    .sidebar-nav {
        max-height: calc(100vh - 400px);
        padding: 12px;
    }

    .sidebar-item,
    .sidebar-group-header {
        font-size: 14px;
        padding: 10px 14px;
    }

    .sidebar-subitem {
        font-size: 13px;
        padding: 8px 10px;
    }

    .sidebar-subitem::before  {
        left: 3px;
    }

    .documentation-content-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .documentation-content {
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
    }
    
    .markdown-content {
        margin-top: 20px;
        padding: 0;
        max-width: 100%;
        width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    
    .content-header {
        max-width: 100%;
        width: 100%;
    }

    .markdown-content h1 {
        font-size: 24px;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .markdown-content h2 {
        font-size: 20px;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .markdown-content h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .markdown-content p,
    .markdown-content ul,
    .markdown-content ol {
        font-size: 15px;
        line-height: 1.7;
        max-width: 100%;
    }
    
    .markdown-content li {
        margin-bottom: 8px;
        line-height: 1.7;
    }

    .markdown-content pre {
        padding: 12px;
        font-size: 12px;
        overflow-x: auto;
        margin: 16px 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .markdown-content code {
        font-size: 13px;
        padding: 2px 6px;
    }

    .markdown-content table {
        font-size: 13px;
        display: block;
        overflow-x: auto;
        width: 100%;
        margin: 16px 0;
    }
    
    .markdown-content blockquote {
        margin: 16px 0;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .markdown-content img {
        max-width: 100%;
        max-height: 400px;
        height: auto;
        margin: 16px auto;
        display: block;
    }
    
    /* Вертикальные изображения на мобильных - больше высоты */
    .markdown-content img.vertical-image {
        max-height: 550px;
    }

    .welcome-articles-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .welcome-section-title {
        font-size: 22px;
        margin-bottom: 16px;
    }

    .welcome-info-box {
        padding: 16px 18px;
    }
    
    .welcome-article-card {
        padding: 20px 18px;
    }
    
    .welcome-article-title {
        font-size: 18px;
    }
    
    .welcome-article-description {
        font-size: 14px;
    }

    .copy-code-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Модальное окно для просмотра изображений */
.image-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.image-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.image-viewer-content {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.image-viewer-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--doc-radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.image-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(21, 21, 21, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--doc-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: var(--doc-transition);
    backdrop-filter: blur(10px);
    z-index: 2;
    font-size: 20px;
}

.image-viewer-close:hover {
    background: rgba(100, 104, 251, 0.9);
    border-color: rgba(100, 104, 251, 0.5);
    transform: scale(1.1);
}

.image-viewer-close:active {
    transform: scale(0.95);
}

@media (max-width: 767px) {
    .image-viewer-content {
        width: 95%;
        height: 95%;
    }
    
    .image-viewer-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 479px) {
    .content-title {
        font-size: 24px;
    }
    
    .content-product-title {
        font-size: 28px;
    }
    
    .content-description {
        font-size: 14px;
    }
    
    .markdown-content {
        margin-top: 16px;
    }
    
    .markdown-content h1 {
        font-size: 22px;
        margin-bottom: 14px;
        padding-bottom: 10px;
    }
    
    .markdown-content h2 {
        font-size: 18px;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    
    .markdown-content h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .markdown-content p,
    .markdown-content ul,
    .markdown-content ol {
        font-size: 14px;
        line-height: 1.7;
    }
    
    .markdown-content pre {
        padding: 10px;
        font-size: 11px;
    }
    
    .markdown-content code {
        font-size: 12px;
    }
    
    .markdown-content table {
        font-size: 12px;
    }
    
    .markdown-content blockquote {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .welcome-section-title {
        font-size: 20px;
    }

    .copy-code-btn span {
        display: none;
    }

    .copy-code-btn i {
        font-size: 16px;
    }

    .markdown-copy-all-btn span {
        display: none;
    }

    .markdown-copy-all-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .code-theme-selector {
        margin-top: 0;
        padding-top: 0;
    }
    
    .theme-selector-text {
        display: none;
    }
    
    .theme-selector-btn i:first-child {
        font-size: 13px;
    }
    
    .markdown-copy-all-wrapper {
        flex-wrap: wrap;
        gap: 8px;
    }

    .theme-option {
        font-size: 12px;
        padding: 7px 10px;
    }
    
    .documentation-toc {
        padding: 16px;
    }
    
    .toc-nav {
        flex-direction: column;
    }
    
    .toc-nav-item {
        padding: 8px 12px;
        padding-left: 12px;
        white-space: normal;
    }
}
