@import url('./tokens.css?v=20260318cursor106');
@import url('./layout.css?v=20260318cursor106');

.ui-icon {
    width: 1.1rem;
    height: 1.1rem;
    object-fit: contain;
    vertical-align: middle;
    flex-shrink: 0;
}

.ui-icon.nav-header-icon {
    width: 1.2rem;
    height: 1.2rem;
}

.ui-icon.section-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.ui-icon.page-title-icon {
    width: 1.55rem;
    height: 1.55rem;
}

.ui-icon.card-icon {
    width: 1.4rem;
    height: 1.4rem;
}

.ui-icon.result-icon {
    width: 1rem;
    height: 1rem;
}

.ui-codicon,
.sidebar-kind-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    flex-shrink: 0;
    line-height: 1;
}

.ui-codicon {
    font-size: 1rem;
    width: 1rem;
    height: 1rem;
    object-fit: contain;
}

.ui-codicon.nav-icon {
    font-size: 1rem;
    min-width: 1rem;
}

.ui-codicon.page-icon {
    font-size: 1.3rem;
    width: 1.3rem;
    height: 1.3rem;
}

.ui-codicon.card-icon,
.ui-codicon.result-icon,
.ui-codicon.list-icon {
    font-size: 1.05rem;
    width: 1.05rem;
    height: 1.05rem;
}

.sidebar-kind-icon {
    font-size: 1.05rem;
    margin-left: 0.45rem;
}

.glsl-kind-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8rem;
    height: 1.45rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-color);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    font-family: var(--font-code);
    flex-shrink: 0;
}

.glsl-kind-badge.inline {
    vertical-align: middle;
    margin-left: 0.35rem;
}

.glsl-kind-badge.card {
    min-width: 2.2rem;
    height: 1.7rem;
    font-size: 0.78rem;
}

.sidebar-header {
    padding: 14px 16px;
    background: transparent;
    text-align: center;
}

.brand-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
}

.brand-link:hover {
    color: white;
    opacity: 0.92;
}

.brand-logo-image {
    display: block;
    width: min(100%, 220px);
    height: auto;
    object-fit: contain;
}

.reference-library-grid,
.reference-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.reference-library-card,
.reference-item-card {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.reference-item-card {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
}

.reference-item-card h3,
.reference-library-card h2 {
    margin: 0;
}

.reference-item-card p,
.reference-library-card p {
    margin: 0;
}

.reference-ar-title {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.reference-inline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    margin: 0.45rem 0 0.85rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.reference-inline-meta a,
.reference-inline-meta span {
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.reference-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.reference-summary-card {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
}

.reference-summary-card h3 {
    margin: 0 0 0.55rem;
    color: var(--accent-color);
}

.reference-summary-card p {
    margin: 0;
}

.reference-list {
    margin: 0;
    padding-inline-start: 1.2rem;
    display: grid;
    gap: 0.55rem;
}

.reference-link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.reference-section-stack {
    display: grid;
    gap: 0.9rem;
}

.reference-section-card {
    display: block;
}

.reference-section-card .reference-link-grid {
    margin-top: 0;
}

.reference-section-card .reference-list {
    margin-top: 0;
}

.reference-link-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    text-decoration: none;
}

.reference-link-chip .ui-codicon,
.reference-item-card .ui-codicon {
    flex-shrink: 0;
}

.reference-item-card h3 {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.reference-link-chip.static {
    pointer-events: none;
}

.reference-table-card {
    overflow: hidden;
}

.reference-table-shell {
    overflow-x: auto;
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
}

.reference-table th,
.reference-table td {
    padding: 0.8rem 0.9rem;
    text-align: right;
    vertical-align: top;
    border-bottom: 1px solid var(--border-color);
}

.reference-table th {
    color: var(--text-secondary);
    font-weight: 700;
}

.reference-code-block {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    border-radius: 16px;
    background: rgba(10, 13, 24, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.reference-two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.reference-empty {
    margin: 0;
    color: var(--text-muted);
}

/* البحث في الشريط الجانبي */
.search-container {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 25;
    background: linear-gradient(180deg, rgba(15, 15, 26, 0.98), rgba(15, 15, 26, 0.94));
    backdrop-filter: blur(12px);
}

.search-input-shell {
    position: relative;
}

.search-input-icon {
    position: absolute;
    inset-inline-start: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
    opacity: 0.88;
}

.search-input-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.search-input-icon circle,
.search-input-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.search-input {
    width: 100%;
    padding-block: 12px;
    padding-inline: 40px 44px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--code-bg);
    color: var(--text-color);
    font-family: var(--font-arabic);
    font-size: 0.95rem;
    direction: rtl;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.search-container.is-active .search-input-icon,
.search-input-shell:focus-within .search-input-icon {
    color: var(--accent-soft, var(--accent-color));
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-clear-btn {
    position: absolute;
    inset-inline-end: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.search-clear-btn:hover {
    background: rgba(233, 69, 96, 0.18);
    color: var(--text-color);
}

/* فلترة البحث */
.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: max-height 0.2s ease, margin-top 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.search-container.is-active .search-filters {
    margin-top: 10px;
    max-height: 220px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.search-subfilters {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-btn {
    padding: 5px 12px;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.filter-btn {
    font-family: var(--font-arabic);
}

.search-autocomplete {
    position: absolute;
    top: calc(100% - 2px);
    right: 15px;
    left: 15px;
    z-index: 30;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.search-autocomplete-header {
    padding: 10px 14px;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.search-history-clear-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-color);
    padding: 4px 10px;
    font-size: 0.75rem;
    font-family: var(--font-arabic);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.search-history-clear-btn:hover {
    background: rgba(233, 69, 96, 0.14);
    border-color: rgba(233, 69, 96, 0.28);
}

.search-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    color: var(--text-color);
    text-align: right;
    cursor: pointer;
    font-family: var(--font-arabic);
}

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

.search-autocomplete-item:hover {
    background: rgba(88, 166, 255, 0.10);
}

.search-history-item .result-icon {
    opacity: 0.86;
}

.search-history-name {
    font-family: var(--font-arabic);
}

.search-autocomplete-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    gap: 4px;
}

.search-autocomplete-name {
    font-family: var(--font-code);
    color: var(--text-color);
    white-space: normal;
    overflow-wrap: anywhere;
}

.search-autocomplete-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-autocomplete-section {
    font-size: 0.75rem;
    color: var(--accent-color);
    background: rgba(88, 166, 255, 0.10);
    border: 1px solid rgba(88, 166, 255, 0.18);
    padding: 4px 8px;
    border-radius: 999px;
    flex-shrink: 0;
}

.recent-visited-panel {
    margin: 10px 12px 8px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background:
        radial-gradient(circle at top right, rgba(88, 166, 255, 0.08), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.recent-visited-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.recent-visited-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.recent-visited-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--accent-color);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.recent-visited-title {
    color: var(--text-color);
    font-size: 0.92rem;
    font-weight: 800;
}

.recent-visited-clear-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-color);
    padding: 4px 10px;
    font-size: 0.74rem;
    font-family: var(--font-arabic);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.recent-visited-clear-btn:hover {
    background: rgba(233, 69, 96, 0.14);
    border-color: rgba(233, 69, 96, 0.28);
}

.recent-visited-list {
    display: grid;
    gap: 8px;
}

.recent-visited-empty {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 0.82rem;
    text-align: right;
}

.recent-visited-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    padding: 10px 10px 10px 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}

.recent-visited-open-btn {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: right;
    padding: 0;
    font-family: var(--font-arabic);
}

.recent-visited-open-btn:hover .recent-visited-name {
    color: var(--accent-color);
}

.recent-visited-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.recent-visited-name {
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: normal;
    overflow-wrap: anywhere;
}

.recent-visited-section {
    color: var(--text-muted);
    font-size: 0.76rem;
    white-space: normal;
    overflow-wrap: anywhere;
}

.recent-visited-remove-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
    padding: 2px 4px;
    flex-shrink: 0;
}

.recent-visited-remove-btn:hover {
    color: #ff8f8f;
}

.sidebar-smart-scroll-btn {
    position: fixed;
    right: calc(min(var(--sidebar-width), 58vw) - 3.3rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 108;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 50%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
        rgba(15, 23, 42, 0.92);
    color: var(--text-color);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    opacity: 0.42;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
    pointer-events: auto;
    touch-action: manipulation;
    animation: smartScrollPulse 1.8s ease-in-out infinite;
}

.sidebar-smart-scroll-btn:hover,
.sidebar-smart-scroll-btn:focus-visible,
.sidebar-smart-scroll-btn.is-active {
    transform: translateY(-50%) scale(1.06);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
        rgba(15, 23, 42, 0.96);
    border-color: rgba(88, 166, 255, 0.22);
    opacity: 1;
}

.sidebar-smart-scroll-btn:focus-visible {
    outline: 2px solid rgba(88, 166, 255, 0.4);
    outline-offset: 2px;
}

.sidebar-jump-menu {
    position: fixed;
    right: calc(min(var(--sidebar-width), 58vw) - 7.2rem);
    top: 50%;
    transform: translateY(-50%) scale(0.92);
    z-index: 107;
    display: grid;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.sidebar-jump-menu.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

.sidebar-jump-chip {
    min-width: 2.45rem;
    height: 2.2rem;
    padding: 0 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
        rgba(15, 23, 42, 0.92);
    color: var(--text-color);
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.sidebar-jump-chip:hover,
.sidebar-jump-chip:focus-visible {
    border-color: rgba(88, 166, 255, 0.24);
    color: var(--accent-color);
    outline: none;
}

.sidebar-smart-scroll-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--accent-color);
    font-size: 1.05rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.sidebar-close-open-btn {
    position: fixed;
    right: calc(min(var(--sidebar-width), 58vw) - 3.1rem);
    top: calc(50% - 3.7rem);
    transform: scale(0.92);
    z-index: 107;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
        rgba(15, 23, 42, 0.92);
    color: #f3b6b6;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s, border-color 0.2s ease, color 0.2s ease;
    animation: sidebarCloseOpenPulse 1.35s ease-in-out infinite;
}

.sidebar-close-open-btn.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
    transition-delay: 0s;
}

.sidebar-close-open-btn:hover,
.sidebar-close-open-btn:focus-visible {
    border-color: rgba(255, 120, 120, 0.28);
    color: #ffd0d0;
    outline: none;
}

@keyframes sidebarCloseOpenPulse {
    0%, 100% {
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
        opacity: 0.72;
    }
    50% {
        box-shadow: 0 10px 24px rgba(255, 120, 120, 0.22);
        opacity: 1;
    }
}

/* قائمة التنقل */
.nav-section {
    border-bottom: 1px solid var(--border-color);
}

.nav-cluster {
    margin: 10px 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
        rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.nav-cluster.has-active-trail {
    border-color: rgba(255, 107, 107, 0.18);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.nav-cluster .nav-section:last-child {
    border-bottom: 0;
}

.nav-cluster.collapsed .nav-section {
    display: none;
}

.nav-cluster.collapsed .nav-cluster-items {
    display: none;
}

.nav-super-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--border-color);
    background:
        radial-gradient(circle at top right, rgba(255, 107, 107, 0.12), transparent 48%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
    cursor: pointer;
}

.nav-super-header:focus-visible,
.nav-section-header:focus-visible,
.nav-constant-group-header:focus-visible,
.nav-item:focus-visible {
    outline: 2px solid rgba(255, 107, 107, 0.55);
    outline-offset: -2px;
}

.nav-cluster-vulkan .nav-super-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.nav-super-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: 0.01em;
}

.nav-super-icon {
    width: 1.3rem;
    height: 1.3rem;
    margin-left: 0;
    filter: drop-shadow(0 3px 8px rgba(255, 107, 107, 0.22));
}

.nav-super-header-note {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.nav-super-header-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
    min-width: fit-content;
}

.nav-super-header-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    padding: 0.18rem 0.55rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 107, 107, 0.12);
    color: var(--text-color);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
    direction: ltr;
    white-space: nowrap;
}

.nav-super-header-toggle {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.nav-cluster.collapsed .nav-super-header-toggle {
    transform: rotate(-90deg);
}

.nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    background:
        radial-gradient(circle at top right, rgba(255, 107, 107, 0.08), transparent 52%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
}

.nav-section-header:hover {
    background:
        radial-gradient(circle at top right, rgba(255, 107, 107, 0.12), transparent 52%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
        var(--hover-bg);
}

.nav-section.has-active-trail > .nav-section-header {
    background:
        radial-gradient(circle at top right, rgba(255, 107, 107, 0.14), transparent 52%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.nav-section-header h3 {
    font-size: 0.95rem;
    color: var(--text-color);
}

.nav-section-header .icon {
    transition: transform 0.2s ease;
}

.nav-section.collapsed .nav-section-header .icon {
    transform: rotate(-90deg);
}

/* عناصر التنقل في القائمة الجانبية */
.nav-section .nav-items {
    max-height: 2000px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(0, 0, 0, 0.06)),
        rgba(0,0,0,0.1);
    display: block;
}

.nav-section.collapsed .nav-items {
    max-height: 0;
    overflow: hidden;
}

.nav-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 20px 11px 15px;
    color: var(--text-muted);
    border-right: 3px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    font-size: 0.9rem;
    background:
        radial-gradient(circle at top right, rgba(255, 107, 107, 0.05), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent);
}

.nav-group-label {
    padding: 10px 20px 6px 15px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    opacity: 0.85;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

#glsl-list .nav-group-label,
#imgui-list .nav-group-label,
#game-ui-list .nav-group-label,
.nav-cluster-sdl3 .nav-group-label {
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item:hover {
    background:
        radial-gradient(circle at top right, rgba(255, 107, 107, 0.10), transparent 56%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
        var(--hover-bg);
    color: var(--text-color);
    border-right-color: var(--accent-color);
    transform: translateX(-1px);
}

.nav-item.active {
    background:
        radial-gradient(circle at top right, rgba(255, 107, 107, 0.14), transparent 54%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
        var(--hover-bg);
    color: #ffd1d1;
    border-right-color: var(--accent-color);
    box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.16);
}

.nav-item.active .nav-icon,
.nav-item.active span:first-child {
    color: var(--accent-color);
}

.nav-item[aria-current="page"] {
    font-weight: 700;
}

.nav-item span {
    flex-shrink: 0;
}

.nav-item span:last-child {
    flex: 1;
    min-width: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* عناصر فرعية */
.nav-subitems {
    list-style: none;
    padding-right: 20px;
    background: rgba(0,0,0,0.1);
}

.nav-subitems .nav-item {
    font-size: 0.85rem;
    padding: 8px 20px;
}

.nav-cluster-items {
    padding: 8px 0 10px;
}

.nav-constant-group {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-constant-group.has-active-trail {
    border-top-color: rgba(255, 107, 107, 0.14);
}

.nav-constant-group:first-child {
    border-top: none;
}

.nav-constant-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.84rem;
    transition: background 0.2s ease, color 0.2s ease;
    background:
        radial-gradient(circle at top right, rgba(255, 107, 107, 0.06), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.nav-constant-group-header:hover {
    background:
        radial-gradient(circle at top right, rgba(255, 107, 107, 0.10), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
        rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}

.nav-constant-group.has-active-trail > .nav-constant-group-header {
    background:
        radial-gradient(circle at top right, rgba(255, 107, 107, 0.12), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
        rgba(255, 255, 255, 0.03);
    color: var(--text-color);
}

.nav-constant-group-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.nav-constant-group-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
    text-align: left;
    font-family: var(--font-code);
}

.nav-constant-group-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: transform 0.18s ease, color 0.18s ease;
    transform: rotate(90deg);
}

.nav-constant-group.collapsed .nav-constant-group-caret {
    transform: rotate(0deg);
}

.nav-constant-group-header:hover .nav-constant-group-caret {
    color: var(--accent-color);
}

.nav-constant-group-count {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nav-constant-group-items {
    padding-bottom: 8px;
}

.nav-constant-group.collapsed .nav-constant-group-items {
    display: none;
}

.nav-constant-group .nav-item {
    padding-right: 24px;
    font-size: 0.82rem;
}

.nav-constant-group.file-nav-group {
    margin: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
        rgba(255, 255, 255, 0.01);
}

.nav-constant-group.file-nav-group .nav-constant-group-header {
    padding: 10px 12px;
}

.nav-constant-group.file-nav-group .nav-constant-group-title {
    direction: rtl;
    text-align: right;
    font-family: var(--font-arabic);
    font-weight: 600;
}

.nav-constant-group.file-nav-group .nav-item {
    padding-right: 20px;
    gap: 8px;
}

.vulkan-example-nav-group .nav-group-description {
    padding: 7px 18px 11px;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.7;
}

.vulkan-example-nav-group .nav-item {
    padding-right: 18px;
}

.imgui-example-nav-group .nav-group-description,
.game-ui-example-nav-group .nav-group-description,
.sdl3-example-nav-group .nav-group-description {
    padding: 7px 18px 11px;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.7;
}

.imgui-example-nav-group .nav-item,
.game-ui-example-nav-group .nav-item,
.sdl3-example-nav-group .nav-item {
    padding-right: 18px;
}

.glsl-example-nav-group .nav-group-description {
    padding: 7px 18px 10px;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.7;
}

.glsl-example-nav-group .nav-item {
    padding-right: 18px;
}

.sdl3-package-group > .nav-constant-group-items {
    padding-top: 4px;
}

.sdl3-package-kind-section,
.game-ui-reference-kind-section,
.imgui-reference-kind-section,
.vulkan-sidebar-kind-section {
    margin: 4px 8px 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent),
        rgba(255, 255, 255, 0.01);
}

.sdl3-package-kind-section .nav-section-header,
.game-ui-reference-kind-section .nav-section-header,
.imgui-reference-kind-section .nav-section-header,
.vulkan-sidebar-kind-section .nav-section-header {
    padding: 11px 13px;
}

.sdl3-package-kind-section .nav-section-header h3,
.game-ui-reference-kind-section .nav-section-header h3,
.imgui-reference-kind-section .nav-section-header h3,
.vulkan-sidebar-kind-section .nav-section-header h3 {
    font-size: 0.88rem;
}

.nav-section-inline-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8rem;
    margin-inline-start: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.sdl3-package-kind-section .nav-item,
.game-ui-reference-kind-section .nav-item,
.imgui-reference-kind-section .nav-item,
.vulkan-sidebar-kind-section .nav-item {
    padding-right: 16px;
}

.embedded-file-section {
    margin-top: 24px;
}

.embedded-file-frame-wrap {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.10);
    min-height: 70vh;
}

.embedded-file-frame {
    width: 100%;
    min-height: 72vh;
    border: 0;
    background: #ffffff;
    display: block;
}

/* المحتوى الرئيسي */
.main-content {
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    padding: 30px clamp(18px, 2.6vw, 42px) 56px;
}

body.sidebar-resizing,
body.sidebar-resizing * {
    cursor: ew-resize !important;
    user-select: none !important;
}

/* رأس الصفحة */
.page-header {
    margin-bottom: 28px;
    padding: 24px 24px 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
        var(--card-bg);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

.anchor-target-flash {
    position: relative;
    border-radius: 12px;
    background:
        linear-gradient(90deg, rgba(255, 193, 7, 0.22), rgba(255, 107, 107, 0.14)),
        var(--card-bg);
    box-shadow:
        0 0 0 3px rgba(255, 193, 7, 0.50),
        0 0 0 12px rgba(255, 193, 7, 0.10);
    border-right: 4px solid rgba(255, 193, 7, 0.92);
    animation: anchorTargetPulse 0.68s ease-out 1;
}

.anchor-target-active {
    position: relative;
    border-radius: 12px;
    background:
        linear-gradient(90deg, rgba(88, 166, 255, 0.14), rgba(255, 193, 7, 0.10)),
        var(--card-bg);
    box-shadow:
        0 0 0 2px rgba(88, 166, 255, 0.34),
        0 10px 28px rgba(88, 166, 255, 0.10);
    border-right: 4px solid rgba(88, 166, 255, 0.92);
}

@keyframes anchorTargetPulse {
    0% {
        box-shadow:
            0 0 0 0 rgba(255, 193, 7, 0.60),
            0 0 0 0 rgba(255, 193, 7, 0.16);
        transform: translateY(-2px);
    }
    45% {
        box-shadow:
            0 0 0 4px rgba(255, 193, 7, 0.38),
            0 0 0 14px rgba(255, 193, 7, 0.10);
        transform: translateY(0);
    }
    100% {
        box-shadow:
            0 0 0 2px rgba(255, 193, 7, 0.42),
            0 0 0 10px rgba(255, 193, 7, 0.08);
        transform: translateY(0);
    }
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.vulkan-example-hero {
    display: grid;
    grid-template-columns: clamp(320px, 34vw, 390px) minmax(0, 1fr);
    align-items: stretch;
    gap: 20px;
    margin-bottom: 28px;
    direction: ltr;
}

.vulkan-example-page-header {
    margin-bottom: 0;
    padding: 18px 20px 16px;
    border-radius: 20px;
    direction: rtl;
    text-align: right;
}

.vulkan-example-page-header h1 {
    margin-bottom: 6px;
}

.vulkan-example-page-header-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.vulkan-example-page-header-copy p {
    margin: 0;
    line-height: 1.7;
    max-width: 72ch;
}

.vulkan-example-page-header .breadcrumb {
    margin-bottom: 12px;
    color: var(--text-muted);
}

.vulkan-example-page-header-preview {
    display: flex;
    align-items: stretch;
    justify-content: center;
    align-self: stretch;
}

.vulkan-example-page-header-preview .vulkan-ready-example-shot {
    width: 100%;
    max-width: 390px;
    margin: 0;
    align-self: center;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.vulkan-example-page-header-preview .glsl-ready-example-shot {
    width: 100%;
    max-width: 390px;
    margin: 0;
    align-self: center;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.vulkan-example-page-header-preview .sdl3-ready-example-shot,
.vulkan-example-page-header-preview .imgui-example-shot {
    width: 100%;
    max-width: 390px;
    margin: 0;
    align-self: center;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.vulkan-example-page-header-preview .game-ui-hero-shot {
    width: 100%;
    max-width: 390px;
    margin: 0;
    align-self: center;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.vulkan-example-page-header-preview .vulkan-ready-example-shot figcaption {
    display: none;
}

.vulkan-example-page-header-preview .glsl-ready-example-shot figcaption {
    display: none;
}

.vulkan-example-page-header-preview .sdl3-ready-example-shot figcaption,
.vulkan-example-page-header-preview .imgui-example-shot figcaption {
    display: none;
}

.vulkan-example-page-header-preview .game-ui-hero-shot figcaption {
    display: none;
}

.game-ui-hero-shot-stage {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 220px;
    padding: 16px;
    border-radius: 16px;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(88, 166, 255, 0.10), transparent 52%),
        #09101a;
}

.game-ui-hero-shot-stage > * {
    max-width: 100% !important;
    box-sizing: border-box;
    margin-inline: auto !important;
}

.game-ui-hero-shot-stage img,
.game-ui-hero-shot-stage svg,
.game-ui-hero-shot-stage canvas,
.game-ui-hero-shot-stage video,
.game-ui-hero-shot-stage figure {
    display: block;
    max-width: 100% !important;
    height: auto !important;
}

.game-ui-hero-shot-stage-mockup,
.game-ui-hero-shot-stage-empty {
    padding: 20px;
}

.page-header .badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: normal;
}

.badge-function {
    background: #238636;
    color: white;
}

.badge-macro {
    background: #8957e5;
    color: white;
}

.badge-variable {
    background: #1f6feb;
    color: white;
}

.badge-file {
    background: #bf8700;
    color: white;
}

.badge-tutorial {
    background: var(--accent-color);
    color: white;
}

/* معلومات إضافية */
.meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* صناديق المحتوى */
.card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.10);
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 1.2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 15px 0 25px;
}

.info-card,
.content-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.info-value {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
}

.prose-card p {
    margin-bottom: 12px;
}

.prose-card p:last-child {
    margin-bottom: 0;
}

.bootstrap-error-actions {
    margin-top: 18px;
}

.bootstrap-error-button {
    padding: 10px 16px;
    border: 1px solid rgba(79, 120, 182, 0.3);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(233, 242, 255, 0.95), rgba(215, 229, 248, 0.95));
    color: #15355f;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.bootstrap-error-button:hover {
    background: linear-gradient(180deg, rgba(241, 247, 255, 0.98), rgba(223, 235, 250, 0.98));
}

.doc-link {
    color: #8cc8ff;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    word-break: break-word;
}

.doc-link:hover {
    color: #ffd166;
}

.explanation-section h3 {
    color: var(--accent-color);
    margin: 18px 0 10px;
    font-size: 1.02rem;
}

.example-explanation-sectioned {
    margin-top: 6px;
}

.example-explanation-head {
    margin-bottom: 14px;
    padding: 16px 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent),
        var(--card-bg);
}

.example-explanation-head h2 {
    margin: 0;
    padding: 0;
    border: 0;
    display: block;
    font-size: 1.18rem;
    color: var(--text-color);
}

.example-explanation-anchor-nav {
    gap: 8px;
    margin: 12px 0 0;
}

.example-explanation-anchor-nav .related-link {
    border-radius: 12px;
    padding: 7px 12px;
}

.example-explanation-summary-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.example-explanation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.example-explanation-block {
    min-width: 0;
    padding: 16px 18px;
}

.example-explanation-block-wide {
    grid-column: 1 / -1;
}

.example-explanation-block h3 {
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    color: var(--accent-color);
}

.example-explanation-summary-card {
    padding: 14px 16px;
}

.example-explanation-summary-card h3 {
    font-size: 0.98rem;
}

.example-explanation-summary-card .best-practices-list,
.example-explanation-summary-card .flow-list {
    padding-right: 18px;
}

.example-explanation-block .params-table,
.example-explanation-block .values-table,
.example-explanation-block .analysis-line-card,
.example-explanation-block .reference-list,
.example-explanation-block .reference-summary-list,
.example-explanation-block .example-section,
.example-explanation-block .tutorial-example-section,
.example-explanation-block .code-container {
    margin-top: 8px;
}

.example-explanation-block .best-practices-list,
.example-explanation-block .flow-list {
    margin: 0;
}

.example-explanation-block .see-also-links {
    align-items: flex-start;
}

.analysis-line-card {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.analysis-line-header {
    color: var(--text-muted);
    font-size: 0.84rem;
    margin-bottom: 8px;
    direction: ltr;
    text-align: left;
}

.analysis-line-code {
    background: var(--code-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    direction: ltr;
    text-align: left;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.analysis-line-code code {
    display: block;
    font-family: var(--font-code);
    color: #f8fafc;
}

.analysis-elements-list {
    margin: 10px 0 0;
    padding-right: 18px;
}

.analysis-elements-list li {
    margin-bottom: 12px;
}

.analysis-function-list {
    display: grid;
    gap: 12px;
}

.analysis-function-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
}

.analysis-function-card p {
    margin: 8px 0 0;
}

.analysis-function-name {
    direction: ltr;
    text-align: left;
    font-family: var(--font-code);
    font-size: 0.95rem;
    font-weight: 700;
}

.analysis-function-name .related-link {
    direction: ltr;
    unicode-bidi: plaintext;
}

.usage-bridge-list {
    display: grid;
    gap: 12px;
}

.usage-bridge-line {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
}

.usage-bridge-targets {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 8px;
    direction: ltr;
    text-align: left;
}

.usage-bridge-link {
    direction: ltr;
    unicode-bidi: plaintext;
    font-family: var(--font-code);
    font-weight: 700;
}

.usage-bridge-text {
    line-height: 1.9;
}

.analysis-table-code {
    direction: ltr;
    text-align: left;
}

.reference-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: block;
}

.reference-list li {
    margin: 0;
    display: block;
    width: 100%;
    padding: 0;
}

.reference-list li + li {
    margin-top: 8px;
}

.reference-list .related-link,
.reference-list .related-link-static {
    display: inline-flex;
    justify-content: flex-start;
    text-align: right;
    border-radius: 12px;
    max-width: min(100%, 36rem);
    padding: 6px 12px;
    line-height: 1.6;
}

.reference-list .entity-link-with-icon {
    align-items: flex-start;
}

.reference-summary-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    align-items: flex-start;
}

.reference-summary-list li,
.reference-summary-list .reference-list-item {
    display: flex;
    width: auto;
}

.reference-summary-list li + li {
    margin-top: 0;
}

.reference-summary-list .related-link,
.reference-summary-list .related-link-static {
    width: auto;
    max-width: none;
    justify-content: flex-start;
    text-align: left;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.reference-summary-groups {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.reference-summary-group {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent),
        rgba(255, 255, 255, 0.016);
    min-width: 0;
}

.reference-summary-group h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--heading-color);
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.reference-summary-list.reference-summary-list-vertical {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.reference-summary-list.reference-summary-list-vertical li,
.reference-summary-list.reference-summary-list-vertical .reference-list-item {
    display: inline-flex;
    width: auto;
    max-width: 100%;
}

.reference-summary-list.reference-summary-list-vertical .related-link,
.reference-summary-list.reference-summary-list-vertical .related-link-static {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    white-space: normal;
    align-self: flex-start;
}

.analysis-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.analysis-related-list li {
    margin: 0;
}

.analysis-related-rich-line {
    line-height: 1.55;
}

.analysis-related-rich-line small,
.analysis-related-rich-block small {
    color: var(--text-muted);
}

.analysis-related-separator {
    display: inline-block;
    margin: 0 4px;
    color: var(--text-muted);
}

.analysis-related-empty {
    display: inline-flex;
    width: 100%;
}

.flow-list {
    padding-right: 20px;
}

.flow-list li {
    margin-bottom: 8px;
}

/* كتل الكود - LTR */
.code-block {
    background: var(--code-bg);
    border-radius: 8px;
    overflow: visible;
    margin: 15px 0;
    direction: ltr;
    text-align: left;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid var(--border-color);
}

.code-header span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.code-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 15px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid var(--border-color);
}

.code-toolbar-title {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.code-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.code-language {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    font-size: 0.78rem;
    font-weight: 700;
    direction: ltr;
}

.code-action-btn {
    padding: 5px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.code-action-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.18);
}

.code-action-btn.is-copied {
    background: rgba(61, 180, 137, 0.18);
    border-color: rgba(61, 180, 137, 0.35);
    color: #b6f1d6;
}

/* روابط الدوال والماكرو في الكود */
.code-link {
    color: #61dafb;
    text-decoration: none;
    border-bottom: 1px dashed #61dafb;
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 0 2px;
    border-radius: 2px;
}

.code-link:hover {
    color: #21a1f1;
    border-bottom-style: solid;
    background-color: rgba(97, 218, 251, 0.15);
}

.sdl3-inline-code,
.sdl3-syntax-code,
.vulkan-inline-code,
.glsl-inline-code {
    font-family: var(--font-code);
    unicode-bidi: plaintext;
}

.vulkan-inline-code {
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
    display: inline-block;
    max-width: 100%;
    vertical-align: middle;
}

.glsl-inline-code {
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
    display: inline-block;
    max-width: 100%;
    vertical-align: middle;
    white-space: nowrap;
}

.glsl-inline-code .glsl-kind-badge,
.glsl-inline-code .inline-entity-icon,
.glsl-inline-code .entity-label-icon {
    display: none;
}

.glsl-inline-code .entity-inline-label,
.glsl-inline-code .entity-link-with-icon {
    display: inline;
    gap: 0;
}

.glsl-inline-code .entity-label-text,
.glsl-inline-code .entity-label-code {
    display: inline;
}

.glsl-inline-code .code-link,
.glsl-inline-code .code-link-static {
    padding: 0;
    border-radius: 0;
}

.vulkan-signature-code .inline-entity-icon,
.vulkan-signature-code .entity-label-icon {
    display: none;
}

.vulkan-signature-code .entity-inline-label,
.vulkan-signature-code .entity-link-with-icon {
    display: inline;
    gap: 0;
}

.vulkan-signature-code .entity-label-text,
.vulkan-signature-code .entity-label-code {
    display: inline;
}

.vulkan-signature-code .code-link,
.vulkan-signature-code .code-link-static {
    padding: 0;
    border-radius: 0;
}

.sdl3-inline-code .code-link,
.sdl3-inline-code .code-link-static,
.vulkan-inline-code .code-link,
.vulkan-inline-code .code-link-static,
.sdl3-syntax-code .code-link,
.sdl3-syntax-code .code-link-static {
    font: inherit;
    line-height: inherit;
    padding: 0 1px;
}

.sdl3-syntax-block {
    line-height: 1.9;
}

.sdl3-syntax-code {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
}

.code-link-static {
    color: inherit;
    border-bottom: 1px dotted rgba(97, 218, 251, 0.42);
    cursor: help;
}

.code-link-static:focus {
    outline: 1px solid rgba(97, 218, 251, 0.42);
    outline-offset: 2px;
}

.copy-btn {
    padding: 5px 12px;
    border: none;
    border-radius: 5px;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s ease;
}

.copy-btn:hover {
    background: #ff6b6b;
}

.code-container.is-collapsed .code-block {
    display: none;
}

pre {
    padding: 20px;
    overflow-x: auto;
    overflow-y: visible;
    font-family: var(--font-code);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
}

code {
    font-family: var(--font-code);
    display: inline;
    word-break: break-word;
}

.code-block code {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Syntax Highlighting */
.keyword { color: var(--code-keyword); }
.string { color: var(--code-string); }
.function { color: var(--code-function); }
.number { color: var(--code-number); }
.comment {
    color: var(--code-comment);
    font-style: italic;
}

.comment .code-link,
.comment .code-token {
    color: inherit !important;
    text-decoration-color: currentColor;
}
.type { color: #ffa657; }
.macro { color: #ff7b72; }
.variable { color: #79c0ff; }
.operator { color: #c9d1d9; }

/* تعليقات الكود بالعربية */
.code-comment-ar {
    color: var(--code-comment);
    direction: rtl;
    text-align: right;
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
}

/* الأسماء القابلة للنقر */
.clickable {
    color: var(--link-color);
    cursor: pointer;
    border-bottom: 1px dashed var(--link-color);
    transition: all 0.2s ease;
}

.clickable:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* الجداول */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

th, td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--hover-bg);
    font-weight: 600;
}

tr:hover {
    background: var(--hover-bg);
}

/* قائمة المعاملات */
.params-list {
    list-style: none;
}

.param-item {
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    border-right: 3px solid var(--accent-color);
}

.param-name {
    font-family: var(--font-code);
    color: var(--code-function);
    font-size: 1rem;
}

.param-type {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-right: 10px;
}

.param-desc {
    margin-top: 8px;
    color: var(--text-color);
}

/* التحذيرات والملاحظات */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.alert-warning {
    background: rgba(210, 153, 34, 0.15);
    border: 1px solid var(--warning-color);
}

.alert-error {
    background: rgba(248, 81, 73, 0.15);
    border: 1px solid var(--error-color);
}

.alert-success {
    background: rgba(63, 185, 80, 0.15);
    border: 1px solid var(--success-color);
}

.alert-info {
    background: rgba(88, 166, 255, 0.15);
    border: 1px solid var(--link-color);
}

.page-smart-scroll-btn {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 108;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 4.4rem;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0 999px 999px 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.09)),
        rgba(15, 23, 42, 0.92);
    color: var(--text-color);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22), inset -1px 0 0 rgba(255, 255, 255, 0.06);
    opacity: 0.42;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
    pointer-events: auto;
    touch-action: manipulation;
    animation: smartScrollPulse 1.8s ease-in-out infinite;
}

.page-smart-scroll-btn:hover,
.page-smart-scroll-btn:focus-visible,
.page-smart-scroll-btn.is-active {
    transform: translateY(-50%) translateX(0.18rem);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.12)),
        rgba(15, 23, 42, 0.96);
    opacity: 1;
}

.page-smart-scroll-btn:focus-visible {
    outline: 2px solid rgba(88, 166, 255, 0.4);
    outline-offset: 2px;
}

@keyframes smartScrollPulse {
    0%, 100% {
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
        border-color: rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 12px 30px rgba(88, 166, 255, 0.34);
        border-color: rgba(88, 166, 255, 0.42);
    }
}

.page-smart-scroll-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--accent-color);
    font-size: 1.18rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

/* صفحة الفهرس */
.index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.index-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.index-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-3px);
}

.index-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.index-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.index-card .count {
    color: var(--accent-color);
    font-size: 0.85rem;
}

/* فهرس أبجدي */
.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 8px;
}

.alphabet-nav a {
    padding: 8px 15px;
    border-radius: 5px;
    background: var(--hover-bg);
    color: var(--text-color);
    font-weight: 600;
}

.alphabet-nav a:hover, .alphabet-nav a.active {
    background: var(--accent-color);
}

/* قائمة العناصر */
.items-list {
    list-style: none;
}

.items-list li {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.items-list li:hover {
    background: var(--hover-bg);
}

.items-list .item-name {
    font-family: var(--font-code);
    color: var(--link-color);
}

.items-list .item-brief {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* قسم تعليمي */
.tutorial-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.tutorial-chapter {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    width: calc(50% - 10px);
}

.tutorial-chapter h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
}

.tutorial-lessons {
    list-style: none;
}

.tutorial-lessons li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.tutorial-lessons li:last-child {
    border-bottom: none;
}

/* صور ومخططات تعليمية */
.diagram-container {
    text-align: center;
    margin: 25px 0;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
}

.diagram-container img {
    max-width: 100%;
    border-radius: 8px;
}

.diagram-caption {
    margin-top: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* صفحة الدرس */
.lesson-progress {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: var(--card-bg);
    border-radius: 8px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.lesson-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.nav-button {
    padding: 12px 25px;
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-button:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

/* نتائج البحث */
.search-results {
    margin-top: 20px;
}

.search-result-item {
    padding: 20px;
    background: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.search-result-item h4 {
    margin-bottom: 10px;
}

.search-result-item .highlight {
    background: rgba(233, 69, 96, 0.3);
    padding: 2px 5px;
    border-radius: 3px;
}

/* الصفحة غير موجودة */
.not-found {
    text-align: center;
    padding: 100px 20px;
}

.not-found h1 {
    font-size: 5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

/* التذييل */
footer {
    margin-top: 50px;
    padding: 30px;
    background: var(--sidebar-bg);
    text-align: center;
    color: var(--text-muted);
}

/* التصميم المتجاوب */
@media (max-width: 900px) {
    .page-smart-scroll-btn,
    .page-branch-menu {
        display: none;
    }
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .sidebar-resizer {
        display: none;
    }

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

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

    .tutorial-chapter {
        width: 100%;
    }

    .menu-toggle {
        display: block;
    }
}

/* زر القائمة للموبايل */
.menu-toggle {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 200;
    padding: 10px 15px;
    background: var(--accent-color);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: none;
}

@media (max-width: 900px) {
    .menu-toggle {
        display: block;
    }
}

/* تأثيرات التحميل */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* أيقونات */
.icon {
    width: 20px;
    height: 20px;
    display: inline-block;
}

/* Scrollbar مخصص */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--primary-color);
}

/* ===== تنسيقات الصفحات الجديدة ===== */

/* إحصائيات الصفحة الرئيسية */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background:
        radial-gradient(circle at top right, rgba(88, 166, 255, 0.08), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
        var(--card-bg);
    border-radius: 18px;
    padding: 20px 22px;
    text-align: right;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 36px rgba(233, 69, 96, 0.14);
    border-color: var(--accent-color);
}

.stat-number {
    display: block;
    font-size: 2.1rem;
    font-weight: bold;
    color: var(--accent-color);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* تصنيفات الدوال */
.category-section {
    margin-bottom: 10px;
}

.sdl3-index-group {
    margin-bottom: 18px;
    padding: 18px 20px 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, rgba(255, 209, 102, 0.10), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}

.sdl3-index-group-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.sdl3-index-group-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sdl3-index-group-kicker {
    color: var(--text-muted);
    font-size: 0.79rem;
    font-weight: 600;
}

.sdl3-index-group-header h2 {
    margin: 0;
    padding: 0;
    border: 0;
    display: block;
    font-size: 1.12rem;
    line-height: 1.8;
}

.sdl3-index-group-count {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-color);
    font-size: 0.78rem;
    font-weight: 700;
}

.sdl3-index-group-links {
    gap: 12px;
}

.sdl3-index-group .related-link {
    justify-content: flex-start;
    border-radius: 14px;
    line-height: 1.7;
    background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 720px) {
    .sdl3-index-group {
        padding: 16px;
    }

    .sdl3-index-group-header {
        flex-direction: column;
    }

    .sdl3-index-group-count {
        align-self: flex-start;
    }
}

.sdl3-ready-examples-intro {
    margin-bottom: 16px;
}

.sdl3-ready-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.sdl3-ready-example-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent),
        var(--card-bg);
}

.sdl3-ready-example-card h3,
.sdl3-ready-example-card h4 {
    margin: 0;
    border: 0;
    padding: 0;
}

.sdl3-ready-example-card h3 {
    font-size: 1.1rem;
}

.sdl3-ready-example-card h4 {
    font-size: 0.96rem;
}

.sdl3-ready-example-header,
.sdl3-ready-example-body {
    display: grid;
    align-items: stretch;
    gap: 18px;
}

.sdl3-ready-example-body {
    grid-template-columns: minmax(0, 1fr) clamp(320px, 34vw, 390px);
}

.sdl3-ready-example-copy {
    min-width: 0;
}

.sdl3-ready-example-shot {
    width: 100%;
    max-width: 390px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    justify-self: center;
}

.sdl3-ready-example-shot svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}

.sdl3-ready-example-shot figcaption {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.8;
}

.sdl3-ready-example-code .doc-code-container,
.sdl3-ready-example-code .example-section {
    margin-bottom: 0;
}

@media (max-width: 860px) {
    .sdl3-ready-example-body {
        grid-template-columns: 1fr;
    }

    .sdl3-ready-example-shot {
        width: 100%;
        max-width: 360px;
    }
}

.glsl-ready-examples-intro {
    margin-bottom: 16px;
}

.glsl-ready-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
}

.glsl-ready-example-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent),
        var(--card-bg);
}

.glsl-ready-example-card h3,
.glsl-ready-example-card h4 {
    margin: 0;
    border: 0;
    padding: 0;
}

.glsl-ready-example-card h3 {
    font-size: 1.08rem;
}

.glsl-ready-example-card h4 {
    font-size: 0.95rem;
}

.glsl-ready-example-copy h4,
.glsl-ready-shader-info-card h4,
.sdl3-ready-example-copy h4,
.sdl3-ready-example-card > h4,
.vulkan-ready-example-overview-card h4,
.vulkan-ready-example-support-card h4,
.example-unified-section-card h4,
.example-unified-support-card h4 {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: 0 0 8px;
    border-bottom: 1px solid rgba(88, 166, 255, 0.28);
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.example-unified-section-card .doc-code-container,
.example-unified-section-card .example-section {
    margin-bottom: 0;
}

.example-unified-section-card .example-code-note {
    margin: 0 0 12px;
}

.example-unified-support-card .best-practices-list {
    margin: 0;
}

.glsl-ready-example-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(320px, 34vw, 390px);
    align-items: stretch;
    gap: 18px;
}

.glsl-ready-example-body-no-preview {
    grid-template-columns: 1fr;
}

.glsl-ready-example-copy {
    min-width: 0;
}

.glsl-ready-example-shot {
    width: 100%;
    max-width: 390px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    justify-self: center;
}

.glsl-ready-example-shot svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}

.glsl-ready-example-shot figcaption {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.glsl-ready-shaders-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.glsl-ready-shader-stack {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    height: 100%;
}

.glsl-ready-shader-info-card {
    padding: 16px 18px;
}

.glsl-ready-shader-info-card h4 {
    margin-bottom: 10px;
}

.glsl-ready-shader-info-card .example-code-note {
    margin: 0;
}

.glsl-ready-shader-stack > .glsl-ready-code-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.glsl-ready-shader-stack > .glsl-ready-code-container .code-block {
    flex: 1;
}

.glsl-ready-shader-card {
    min-width: 0;
}

.glsl-ready-shader-card .example-section,
.glsl-ready-shader-card .doc-code-container {
    margin-bottom: 0;
}

.glsl-ready-example-links {
    gap: 8px;
}

.glsl-example-hero-section {
    margin-bottom: 4px;
}

.glsl-example-hero-card {
    display: grid;
    gap: 18px;
    background:
        radial-gradient(circle at top right, rgba(116, 190, 255, 0.14), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
        var(--card-bg);
}

.glsl-example-anchor-nav {
    gap: 8px;
    margin-top: 12px;
}

.glsl-example-detail-section {
    display: grid;
    gap: 14px;
}

.glsl-example-section-header h2 {
    margin: 0;
    border: 0;
    padding: 0;
}

.glsl-example-phase-grid,
.glsl-example-flow-grid,
.glsl-example-line-grid,
.glsl-example-tooltip-grid,
.glsl-example-image-grid,
.glsl-example-imgui-grid,
.glsl-example-link-groups,
.glsl-example-integration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.glsl-example-phase-card h3,
.glsl-example-flow-card h3,
.glsl-example-line-card h3,
.glsl-example-tooltip-card h3,
.glsl-example-image-card h3,
.glsl-example-imgui-card h3 {
    margin: 0 0 12px;
}

.glsl-example-phase-fields,
.glsl-example-tooltip-fields {
    display: grid;
    gap: 12px;
}

.glsl-example-phase-fields>div,
.glsl-example-tooltip-fields>div {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.025);
}

.glsl-example-phase-fields p,
.glsl-example-tooltip-fields span,
.glsl-example-image-card p,
.glsl-example-imgui-card p,
.glsl-example-flow-card p,
.glsl-example-line-card p {
    margin: 8px 0 0;
}

.glsl-example-line-meta {
    margin-bottom: 12px;
}

.glsl-example-line-snippet {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #0e1520;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
}

.glsl-example-line-snippet code {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
}

.glsl-example-inline-note {
    color: var(--text-muted);
}

.glsl-example-link-groups .see-also-links,
.glsl-example-image-card .see-also-links {
    gap: 8px;
}

.glsl-example-image-card .glsl-ready-example-meta {
    align-items: flex-start;
    justify-content: flex-start;
}

.glsl-example-layout-card p:last-child,
.glsl-example-support-card p:last-child {
    margin-bottom: 0;
}

.glsl-example-groups-section {
    margin-top: 8px;
}

.glsl-example-section-clusters {
    display: grid;
    gap: 16px;
}

.glsl-example-section-cluster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top left, rgba(92, 183, 255, 0.08), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
        var(--card-bg);
}

.glsl-example-section-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    list-style: none;
}

.glsl-example-section-summary::-webkit-details-marker {
    display: none;
}

.glsl-example-section-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.glsl-example-section-title {
    font-weight: 700;
    color: var(--text-primary);
}

.glsl-example-section-count,
.glsl-example-section-note {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
    white-space: nowrap;
}

.glsl-example-section-body {
    margin-top: 16px;
    display: grid;
    gap: 16px;
}

.glsl-section-overview-card {
    background:
        radial-gradient(circle at top right, rgba(122, 212, 255, 0.08), transparent 32%),
        rgba(255, 255, 255, 0.02);
}

.glsl-section-overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.glsl-section-overview-head h3 {
    margin: 0;
    border: 0;
    padding: 0;
}

.glsl-section-overview-grid,
.glsl-example-file-grid,
.glsl-example-definition-grid,
.glsl-example-relationship-grid,
.glsl-example-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.glsl-section-overview-grid > div,
.glsl-example-file-card,
.glsl-example-definition-card,
.glsl-example-relationship-card,
.glsl-example-icon-card,
.glsl-example-section-card {
    min-width: 0;
}

.glsl-section-overview-grid > div {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.025);
}

.glsl-section-overview-grid > div p:last-child,
.glsl-example-file-card p:last-child,
.glsl-example-definition-card p:last-child,
.glsl-example-relationship-card p:last-child,
.glsl-example-icon-card p:last-child,
.glsl-example-section-card p:last-child {
    margin-bottom: 0;
}

.glsl-example-file-card h3,
.glsl-example-definition-card h3,
.glsl-example-relationship-card h3,
.glsl-example-icon-card h3,
.glsl-example-section-card h3 {
    margin: 0 0 12px;
    border: 0;
    padding: 0;
}

.glsl-example-file-card code {
    word-break: break-word;
}

.glsl-example-icon-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.glsl-example-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    font-size: 1.2rem;
}

.glsl-example-section-icon-symbol {
    font-size: 1.45rem;
    line-height: 1;
}

@media (max-width: 860px) {
    .example-explanation-grid {
        grid-template-columns: 1fr;
    }

    .glsl-ready-example-header,
    .glsl-ready-example-body,
    .glsl-section-overview-head,
    .glsl-example-section-summary,
    .glsl-example-section-title-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .glsl-ready-example-body {
        grid-template-columns: 1fr;
    }

    .glsl-ready-example-shot {
        width: 100%;
        max-width: 390px;
        margin: 4px auto 0;
    }
}

.tutorial-visual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.tutorial-visual-card {
    margin: 0;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top right, rgba(107, 189, 255, 0.12), transparent 34%),
        rgba(255, 255, 255, 0.025);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

.tutorial-visual-card svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}

.tutorial-visual-card figcaption {
    margin-top: 10px;
    color: var(--text-muted);
    line-height: 1.85;
    font-size: 0.88rem;
}

.example-platform-section {
    display: grid;
    gap: 10px;
    margin-top: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(135deg, rgba(123, 195, 255, 0.10), transparent 55%),
        rgba(255, 255, 255, 0.025);
}

.example-platform-label {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.example-platform-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.example-platform-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(15, 24, 34, 0.55);
    color: var(--text-color);
    font-size: 0.84rem;
    font-weight: 700;
}

.example-platform-note {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.9rem;
}

.example-command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.example-command-container {
    margin-bottom: 0;
}

.example-command-container .doc-code-container,
.example-command-container .example-section,
.glsl-ready-code-container .doc-code-container,
.glsl-ready-code-container .example-section {
    margin-bottom: 0;
}

.glsl-ready-code-container {
    margin-bottom: 0;
}

.glsl-vulkan-workflow-section {
    display: grid;
    gap: 16px;
}

.glsl-vulkan-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.95fr);
    gap: 18px;
    align-items: stretch;
    background:
        radial-gradient(circle at top left, rgba(105, 187, 255, 0.13), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
        var(--card-bg);
}

.glsl-vulkan-hero-copy {
    display: grid;
    gap: 14px;
}

.glsl-vulkan-hero-copy h3,
.glsl-vulkan-hero-copy p {
    margin: 0;
}

.glsl-vulkan-hero-shot {
    margin: 0;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
}

.glsl-vulkan-hero-shot svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}

.glsl-vulkan-hero-shot figcaption {
    margin-top: 10px;
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.84rem;
}

.glsl-vulkan-difference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.glsl-vulkan-command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.glsl-vulkan-usage-card {
    margin-top: 0;
}

.library-example-preview-section {
    margin-top: 18px;
}

.library-example-preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.library-example-preview-heading {
    min-width: 0;
}

.library-example-preview-heading h2 {
    margin: 0;
}

.library-example-preview-heading p {
    margin: 8px 0 0;
    color: var(--text-muted);
    line-height: 1.85;
}

.library-example-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.library-example-preview-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
}

.library-example-preview-grid > .library-example-preview-card:only-child {
    width: min(100%, 430px);
    max-width: 430px;
    justify-self: start;
}

.library-example-preview-grid:has(> .library-example-preview-card:nth-child(2):last-child) {
    grid-template-columns: repeat(auto-fit, minmax(300px, 430px));
    justify-content: start;
}

.vulkan-example-clusters {
    display: grid;
    gap: 14px;
}

.vulkan-example-cluster {
    overflow: hidden;
}

.vulkan-example-cluster-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    list-style: none;
}

.vulkan-example-cluster-summary::-webkit-details-marker {
    display: none;
}

.vulkan-example-cluster-title-wrap {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.vulkan-example-cluster-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
}

.vulkan-example-cluster-count {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 700;
}

.vulkan-example-cluster-note {
    max-width: 520px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
    text-align: right;
}

.vulkan-example-cluster-body {
    margin-top: 16px;
}

.vulkan-example-cluster-body-note {
    margin: 0 0 14px;
    color: var(--text-muted);
    line-height: 1.85;
}

.library-example-preview-media {
    min-height: 0;
}

.library-example-preview-media .sdl3-ready-example-shot,
.library-example-preview-media .glsl-ready-example-shot,
.library-example-preview-media .vulkan-ready-example-shot,
.library-example-preview-media .imgui-example-shot,
.library-example-preview-media .game-ui-index-preview {
    margin: 0;
    max-width: none;
    width: 100%;
}

.library-example-preview-card .sdl3-ready-example-shot figcaption,
.library-example-preview-card .glsl-ready-example-shot figcaption,
.library-example-preview-card .vulkan-ready-example-shot figcaption,
.library-example-preview-card .imgui-example-shot figcaption,
.library-example-preview-card .game-ui-index-preview figcaption {
    display: none;
}

.library-example-preview-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 10px;
}

.library-example-preview-copy h3,
.library-example-preview-copy p {
    margin: 0;
}

.library-example-preview-copy p {
    color: var(--text-muted);
    line-height: 1.8;
}

.library-example-preview-actions {
    margin-top: auto;
}

.game-ui-example-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 16px;
    align-items: start;
}

.game-ui-example-summary-card,
.game-ui-representation-card {
    height: 100%;
}

.game-ui-example-summary-card {
    display: grid;
    align-content: start;
    gap: 14px;
}

.game-ui-example-summary-intro {
    display: grid;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.game-ui-example-summary-intro h3 {
    margin: 0;
    color: var(--text-color);
}

.game-ui-example-summary-intro p {
    margin: 0;
    color: var(--text-muted);
}

.game-ui-example-summary-points {
    display: grid;
    gap: 10px;
}

.game-ui-example-summary-point {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent),
        rgba(255, 255, 255, 0.015);
}

.game-ui-example-summary-point strong,
.game-ui-example-summary-point p {
    margin: 0;
}

.game-ui-example-summary-point strong {
    color: var(--text-color);
}

.game-ui-representation-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.game-ui-representation-card-split {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
    gap: 14px;
    align-items: stretch;
}

.game-ui-representation-card-panel {
    min-width: 0;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
        rgba(255, 255, 255, 0.015);
}

.game-ui-representation-card-panel-visual {
    display: grid;
    align-content: start;
    overflow: hidden;
}

.game-ui-representation-card-panel-details {
    display: grid;
    align-content: start;
    gap: 12px;
}

.game-ui-representation-card-panel-details h3 {
    margin: 0;
    color: var(--text-color);
}

.game-ui-representation-card-panel-details p {
    margin: 0;
}

.game-ui-representation-card-visual {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 260px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top, rgba(88, 166, 255, 0.08), transparent 55%),
        rgba(255, 255, 255, 0.018);
    overflow: hidden;
}

.game-ui-representation-card-visual-stage {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.game-ui-representation-card-visual-stage > * {
    max-width: 100% !important;
    box-sizing: border-box;
    margin-inline: auto !important;
}

.game-ui-representation-card-visual-stage img,
.game-ui-representation-card-visual-stage svg,
.game-ui-representation-card-visual-stage canvas,
.game-ui-representation-card-visual-stage video,
.game-ui-representation-card-visual-stage figure {
    display: block;
    max-width: 100% !important;
    height: auto !important;
}

.game-ui-representation-card-visual-stage pre {
    max-width: 100%;
    overflow: auto;
}

.game-ui-representation-card-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 18px;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    text-align: center;
}

.game-ui-representation-card-mockup {
    margin: 0;
}

@media (max-width: 860px) {
    .library-example-preview-header {
        flex-direction: column;
    }
}

@media (max-width: 980px) {
    .game-ui-example-overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .game-ui-representation-card-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .glsl-vulkan-hero-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .glsl-ready-shaders-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .tutorial-visual-grid,
    .example-command-grid,
    .glsl-vulkan-command-grid,
    .glsl-example-phase-grid,
    .glsl-example-flow-grid,
    .glsl-example-line-grid,
    .glsl-example-tooltip-grid,
    .glsl-example-image-grid,
    .glsl-example-imgui-grid,
    .glsl-example-link-groups,
    .glsl-example-integration-grid {
        grid-template-columns: 1fr;
    }

    .glsl-ready-example-body {
        grid-template-columns: 1fr;
    }

    .glsl-ready-example-shot {
        width: 100%;
        max-width: 390px;
        margin: 4px auto 0;
    }
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--hover-bg);
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.category-header:hover {
    background: var(--border-color);
}

.category-header.collapsed + .category-items {
    display: none;
}

.category-count {
    background: var(--accent-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.category-items {
    padding: 10px 0;
}

/* عناصر الشريط الجانبي */
.sidebar-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 6px;
    margin: 2px 5px;
    transition: all 0.2s ease;
}

.sidebar-item:hover {
    background: var(--hover-bg);
}

.sidebar-item .item-name {
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--text-color);
}

.sidebar-item .item-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-code);
}

.function-item:hover .item-name {
    color: var(--code-function);
}

.macro-item:hover .item-name {
    color: var(--code-keyword);
}

.variable-item:hover .item-name {
    color: var(--code-number);
}

.tutorial-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tutorial-number {
    background: var(--border-color);
    color: var(--text-muted);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.file-item .item-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* أقسام الصفحة */
section {
    margin-bottom: 30px;
}

section h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

/* جدول المعاملات */
.params-table, .values-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    table-layout: fixed;
}

.params-table th, .params-table td,
.values-table th, .values-table td {
    padding: 12px 15px;
    text-align: right;
    overflow-wrap: anywhere;
    word-break: break-word;
    vertical-align: top;
}

.params-table th, .values-table th {
    background: var(--hover-bg);
    font-weight: 600;
}

.params-table tr:nth-child(even),
.values-table tr:nth-child(even) {
    background: rgba(0,0,0,0.1);
}

.params-table-vulkan-function {
    table-layout: auto;
}

.params-table-vulkan-function col.param-col-name,
.params-table-vulkan-function col.param-col-type {
    width: 1%;
}

.params-table-vulkan-function col.param-col-details {
    width: auto;
}

.params-table-vulkan-function th.param-col-name,
.params-table-vulkan-function td.param-col-name,
.params-table-vulkan-function th.param-col-type,
.params-table-vulkan-function td.param-col-type {
    width: 1%;
    white-space: nowrap;
}

.params-table-vulkan-function td.param-col-name,
.params-table-vulkan-function td.param-col-type {
    direction: ltr;
    text-align: left;
}

.params-table-vulkan-function th.param-col-details,
.params-table-vulkan-function td.param-col-details {
    width: auto;
}

.params-table.example-local-symbols-table {
    table-layout: fixed;
}

.params-table.example-local-symbols-table col.example-local-symbols-col-name {
    width: 16%;
}

.params-table.example-local-symbols-table col.example-local-symbols-col-kind {
    width: 5%;
}

.params-table.example-local-symbols-table col.example-local-symbols-col-signature {
    width: 24%;
}

.params-table.example-local-symbols-table col.example-local-symbols-col-purpose {
    width: auto;
}

.params-table.example-local-symbols-table th,
.params-table.example-local-symbols-table td {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    vertical-align: top;
}

.params-table.example-local-symbols-table td:nth-child(1),
.params-table.example-local-symbols-table td:nth-child(2) {
    font-size: 0.95rem;
}

.params-table.example-local-symbols-table th:nth-child(2),
.params-table.example-local-symbols-table td:nth-child(2) {
    padding-right: 7px;
    padding-left: 7px;
    font-size: 0.82rem;
    line-height: 1.4;
}

.params-table.example-local-symbols-table td:nth-child(2) > *,
.params-table.example-local-symbols-table th:nth-child(2) > * {
    font-size: inherit;
    line-height: inherit;
}

.params-table.example-local-symbols-table td:nth-child(3) code,
.params-table.example-local-symbols-table td:nth-child(3) .vulkan-inline-code,
.params-table.example-local-symbols-table td:nth-child(3) .vulkan-signature-code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.params-table.example-functions-table {
    table-layout: fixed;
}

.params-table.example-functions-table col.example-functions-col-name {
    width: 14%;
}

.params-table.example-functions-table col.example-functions-col-signature {
    width: 26%;
}

.params-table.example-functions-table col.example-functions-col-purpose {
    width: 24%;
}

.params-table.example-functions-table col.example-functions-col-return {
    width: 12%;
}

.params-table.example-functions-table col.example-functions-col-usage {
    width: 24%;
}

.params-table.example-functions-table td:nth-child(2) code,
.params-table.example-functions-table td:nth-child(2) .vulkan-inline-code,
.params-table.example-functions-table td:nth-child(2) .vulkan-signature-code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.params-table.example-functions-table td:nth-child(5) {
    vertical-align: top;
}

.params-table.example-functions-table td:nth-child(3),
.params-table.example-functions-table td:nth-child(4),
.params-table.example-functions-table td:nth-child(5) {
    line-height: 1.7;
}

.params-table.example-functions-table td:nth-child(3) .analysis-related-list {
    gap: 10px;
}

.params-table.example-functions-table td:nth-child(5) .analysis-related-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.params-table.example-functions-table td:nth-child(5) .analysis-related-list li {
    display: inline-flex;
    max-width: 100%;
}

.params-table.example-functions-table td:nth-child(5) .related-link,
.params-table.example-functions-table td:nth-child(5) .related-link-static {
    width: auto;
    max-width: 100%;
    white-space: normal;
}

.param-name, .param-type {
    font-family: var(--font-code);
}

@media (max-width: 900px) {
    .params-table-vulkan-function th.param-col-name,
    .params-table-vulkan-function td.param-col-name,
    .params-table-vulkan-function th.param-col-type,
    .params-table-vulkan-function td.param-col-type {
        white-space: normal;
    }

    .params-table.example-local-symbols-table col.example-local-symbols-col-name {
        width: 20%;
    }

    .params-table.example-local-symbols-table col.example-local-symbols-col-kind {
        width: 8%;
    }

    .params-table.example-local-symbols-table col.example-local-symbols-col-signature {
        width: 28%;
    }

    .params-table.example-functions-table col.example-functions-col-name {
        width: 16%;
    }

    .params-table.example-functions-table col.example-functions-col-signature {
        width: 24%;
    }

    .params-table.example-functions-table col.example-functions-col-purpose {
        width: 25%;
    }

    .params-table.example-functions-table col.example-functions-col-return {
        width: 13%;
    }

    .params-table.example-functions-table col.example-functions-col-usage {
        width: 22%;
    }

    .params-table.example-functions-table th:nth-child(5),
    .params-table.example-functions-table td:nth-child(5) {
        white-space: normal;
    }
}

.param-type {
    color: var(--code-number);
}

.sdl3-parameter-description-cell {
    overflow-wrap: normal !important;
    word-break: normal !important;
}

.sdl3-parameter-code-shell {
    display: block;
    direction: ltr;
    text-align: left;
    overflow-x: auto;
    max-width: 100%;
}

.sdl3-parameter-code-block {
    margin: 0;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    word-break: normal;
    overflow-wrap: normal;
    line-height: 1.85;
    unicode-bidi: plaintext;
}

.sdl3-parameter-code-block code {
    display: block;
    white-space: pre-wrap;
    word-break: normal;
    overflow-wrap: normal;
}

/* قيم الإرجاع */
.return-values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.return-value-item {
    padding: 15px;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.return-value-item.success {
    border-right: 3px solid var(--success-color);
}

.return-value-item.error {
    border-right: 3px solid var(--error-color);
}

.return-value-item code {
    display: block;
    font-family: var(--font-code);
    margin-bottom: 5px;
    color: var(--code-function);
}

.return-value-item span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* قائمة الملاحظات */
.notes-list {
    list-style: none;
    padding: 0;
}

.notes-list li {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: var(--card-bg);
    border-radius: 8px;
    border-right: 3px solid var(--link-color);
}

/* روابط "انظر أيضاً" */
.see-also-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sdl3-see-also-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    width: auto;
    max-width: min(100%, 42rem);
}

.sdl3-see-also-list .related-link,
.sdl3-see-also-list .related-link-static {
    width: auto;
    max-width: min(100%, 20rem);
    justify-content: flex-start;
    border-radius: 12px;
    text-align: right;
    flex: 0 1 auto;
}

.see-also-links.sdl3-see-also-list,
.content-card .see-also-links.sdl3-see-also-list,
.prose-card .see-also-links.sdl3-see-also-list,
.sdl3-ready-example-card .see-also-links.sdl3-see-also-list,
.example-unified-related-links {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    align-items: start !important;
    justify-content: stretch !important;
    gap: 10px 12px !important;
    width: 100% !important;
    max-width: 100% !important;
}

.see-also-links.sdl3-see-also-list > .related-link,
.see-also-links.sdl3-see-also-list > .related-link-static,
.content-card .see-also-links.sdl3-see-also-list > .related-link,
.content-card .see-also-links.sdl3-see-also-list > .related-link-static,
.prose-card .see-also-links.sdl3-see-also-list > .related-link,
.prose-card .see-also-links.sdl3-see-also-list > .related-link-static,
.sdl3-ready-example-card .see-also-links.sdl3-see-also-list > .related-link,
.sdl3-ready-example-card .see-also-links.sdl3-see-also-list > .related-link-static,
.example-unified-related-links > .reference-list-item,
.example-unified-related-links > .related-link,
.example-unified-related-links > .related-link-static {
    display: inline-flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 0 1 auto !important;
    align-self: flex-start;
    box-sizing: border-box;
}

.example-unified-related-links .reference-list-item {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
}

.example-unified-related-links .related-link,
.example-unified-related-links .related-link-static {
    white-space: nowrap;
    text-align: right;
    justify-content: flex-start;
    overflow-wrap: normal;
    word-break: normal;
    line-height: 1.5;
    padding: 10px 14px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sdl3-see-also-list .entity-label-text,
.sdl3-see-also-list .entity-label-code,
.example-unified-related-links .entity-label-text,
.example-unified-related-links .entity-label-code {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

@media (max-width: 720px) {
    .see-also-links.sdl3-see-also-list,
    .content-card .see-also-links.sdl3-see-also-list,
    .prose-card .see-also-links.sdl3-see-also-list,
    .sdl3-ready-example-card .see-also-links.sdl3-see-also-list,
    .example-unified-related-links {
        grid-template-columns: 1fr !important;
    }
}

.see-also-section .sdl3-see-also-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px 12px;
}

.see-also-section .sdl3-see-also-list > * {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    flex: 0 1 auto;
}

.related-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-family: var(--font-code);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
    text-align: center;
}

.entity-link-with-icon {
    gap: 0.32rem;
}

.entity-inline-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
    vertical-align: middle;
}

.entity-inline-label-code {
    font-family: var(--font-code);
}

.entity-label-text,
.entity-label-code {
    font: inherit;
    color: inherit;
}

.entity-label-code {
    background: transparent;
    padding: 0;
    border: 0;
}

.inline-entity-icon {
    width: 0.95rem;
    height: 0.95rem;
    object-fit: contain;
    flex-shrink: 0;
}

.inline-entity-icon-code {
    width: 0.82rem;
    height: 0.82rem;
}

.related-link-static {
    cursor: default;
}

.related-link:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

@media (max-width: 960px) {
    .reference-summary-list .related-link,
    .reference-summary-list .related-link-static {
        white-space: normal;
    }
}

.linked-notes-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.linked-notes-item {
    margin: 0;
}

.linked-notes-list .content-card {
    margin: 0;
    width: 100%;
}

.linked-notes-list .related-link,
.linked-notes-list .related-link-static {
    justify-content: flex-start;
    text-align: right;
}

/* حاوية الكود */
.code-container {
    background: var(--code-bg);
    border-radius: 12px;
    overflow: visible;
    border: 1px solid var(--border-color);
    max-width: 100%;
}

.code-block {
    margin: 0;
    max-width: 100%;
}

.code-container .code-block {
    margin: 0;
}

/* نتائج البحث */
.search-results-header {
    margin-bottom: 20px;
}

.search-results-header h2 {
    margin-bottom: 5px;
}

.search-results-header p {
    color: var(--text-muted);
}

.search-results-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(88, 166, 255, 0.10);
    border: 1px solid rgba(88, 166, 255, 0.20);
    color: var(--text-color);
    font-size: 0.84rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    min-width: 0;
}

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

.result-icon {
    font-size: 1.5rem;
}

.result-type {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: capitalize;
    flex-shrink: 0;
}

.result-section {
    font-size: 0.78rem;
    color: var(--accent-color);
    background: rgba(88, 166, 255, 0.10);
    border: 1px solid rgba(88, 166, 255, 0.18);
    padding: 4px 9px;
    border-radius: 999px;
    flex-shrink: 0;
}

.result-name {
    font-family: var(--font-code);
    color: var(--text-color);
    flex: 1;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.result-desc {
    flex: 2;
    min-width: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.6;
}

/* التنقل في الدروس */
.tutorial-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.nav-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-arabic);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.nav-btn.prev {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

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

.nav-btn:hover {
    transform: translateY(-2px);
}

/* لا توجد نتائج */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results h2 {
    color: var(--text-muted);
    border: none;
}

.no-results p {
    color: var(--text-muted);
}

.no-results-guidance {
    max-width: 760px;
    margin: 0.75rem auto 0;
    line-height: 1.9;
}

.search-recovery {
    margin-top: 20px;
}

.search-recovery-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.search-recovery-action {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-color);
    cursor: pointer;
    font: inherit;
    text-align: right;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.search-recovery-action:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.search-recovery-action-label {
    color: var(--text-primary);
    font-weight: 700;
}

.search-recovery-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.search-recovery-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
    font: inherit;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.search-recovery-link:hover {
    border-color: var(--accent-color);
    background: var(--hover-bg);
    transform: translateY(-1px);
}

.search-recovery-meta {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* المحتوى التعليمي */
.tutorial-content {
    line-height: 2;
}

.tutorial-description {
    font-size: 1.1rem;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    border-right: 4px solid var(--accent-color);
}

.tutorial-body {
    margin-bottom: 25px;
}

.tutorial-body h3 {
    color: var(--accent-color);
    margin: 20px 0 10px;
}

.tutorial-body ul {
    margin-right: 20px;
    margin-bottom: 15px;
}

.tutorial-body li {
    margin-bottom: 8px;
}

.tutorial-downloads {
    display: grid;
    gap: 14px;
}

.tutorial-downloads-intro {
    margin-bottom: 0;
}

.tutorial-download-link {
    color: var(--link-color);
    font-weight: 700;
    text-decoration: none;
}

.tutorial-download-link:hover {
    text-decoration: underline;
}

.tutorial-code-chunks {
    display: grid;
    gap: 14px;
}

.tutorial-code-chunk-card {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    background: var(--card-bg);
}

.tutorial-code-chunk-label {
    padding: 10px 14px;
    font-weight: 700;
    color: var(--accent-color);
    background: linear-gradient(90deg, rgba(219, 92, 50, 0.08), rgba(219, 92, 50, 0.02));
    border-bottom: 1px solid var(--border-color);
}

.tutorial-video-card {
    margin-bottom: 22px;
    width: 100%;
    max-width: none;
}

.tutorial-video-copy {
    display: grid;
    gap: 0;
    padding: 24px 26px;
    background:
        radial-gradient(circle at top right, rgba(88, 166, 255, 0.10), transparent 34%),
        linear-gradient(135deg, rgba(30, 30, 48, 0.96), rgba(24, 28, 42, 0.98));
    border: 1px solid rgba(136, 162, 204, 0.18);
    box-shadow: 0 20px 42px rgba(8, 12, 22, 0.18);
}

.tutorial-video-layout {
    display: grid;
    grid-template-columns: minmax(300px, 36%) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    direction: ltr;
}

.tutorial-video-media-column,
.tutorial-video-text-column {
    direction: rtl;
}

.tutorial-video-media-column {
    display: grid;
    gap: 14px;
    max-width: 500px;
    justify-self: start;
}

.tutorial-video-text-column {
    display: grid;
    gap: 14px;
    align-content: start;
}

.tutorial-video-copy p {
    margin: 0;
    color: rgba(234, 234, 234, 0.90);
    line-height: 1.9;
}

.tutorial-video-heading {
    padding-inline-start: 14px;
    border-inline-start: 4px solid rgba(88, 166, 255, 0.72);
    color: #f4f8ff;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.6;
}

.tutorial-video-text-panel {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tutorial-video-intro-text {
    font-size: 1rem;
    color: rgba(239, 244, 255, 0.95);
}

.tutorial-video-note {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(88, 166, 255, 0.08);
    border: 1px solid rgba(88, 166, 255, 0.14);
    color: rgba(205, 215, 232, 0.82);
    font-size: 0.94rem;
}

.tutorial-video-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tutorial-video-actions-row-media {
    justify-content: stretch;
}

.tutorial-video-action-btn {
    flex: 1 1 0;
    min-width: 0;
}

.tutorial-video-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.tutorial-video-preview-shell {
    position: relative;
    width: 100%;
    padding: 7px;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(120, 156, 255, 0.34), rgba(80, 211, 255, 0.12), rgba(233, 69, 96, 0.18));
    box-shadow:
        0 22px 42px rgba(5, 10, 20, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tutorial-video-preview-button {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(72, 122, 255, 0.18), transparent 44%),
        linear-gradient(180deg, #0d1320, #0a0f18);
    cursor: zoom-in;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 16px 30px rgba(0, 0, 0, 0.22);
}

.tutorial-video-preview-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.tutorial-video-preview-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(7, 10, 18, 0.08), rgba(7, 10, 18, 0.42)),
        radial-gradient(circle at center, rgba(233, 69, 96, 0.22), transparent 22%);
}

.tutorial-video-overlay-actions {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.tutorial-video-overlay-actions[hidden] {
    display: none !important;
}

.tutorial-video-overlay-btn {
    position: absolute;
    bottom: 18px;
    min-width: 176px;
    min-height: 56px;
    padding: 12px 18px;
    border-radius: 22px;
    font-size: 0.94rem;
    font-weight: 800;
    letter-spacing: 0;
    background: linear-gradient(180deg, rgba(30, 38, 58, 0.44), rgba(18, 24, 38, 0.36));
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #f4f7ff;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
        0 10px 24px rgba(4, 8, 18, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    pointer-events: auto;
    transition:
        transform 0.22s ease,
        background 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        color 0.22s ease;
}

.tutorial-video-overlay-btn-play {
    right: 18px;
}

.tutorial-video-overlay-btn-youtube {
    left: 18px;
}

.tutorial-video-overlay-btn:hover,
.tutorial-video-overlay-btn:focus-visible {
    background: linear-gradient(180deg, rgba(52, 62, 92, 0.60), rgba(29, 36, 56, 0.50));
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 18px 34px rgba(4, 8, 18, 0.22),
        0 0 0 4px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.tutorial-video-overlay-btn:active {
    transform: translateY(0) scale(0.98);
    background: linear-gradient(180deg, rgba(72, 84, 118, 0.68), rgba(34, 43, 66, 0.58));
    box-shadow:
        0 8px 20px rgba(4, 8, 18, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.tutorial-video-zoom-badge {
    position: absolute;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    color: #fff;
}

.tutorial-video-zoom-badge {
    inset-inline-end: 16px;
    top: 16px;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.8rem;
}

.tutorial-video-modal {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(3, 7, 18, 0.78);
    backdrop-filter: blur(6px);
}

.tutorial-video-modal[hidden] {
    display: none !important;
}

.tutorial-video-modal-dialog {
    position: relative;
    width: min(1100px, 100%);
}

.tutorial-video-modal-close {
    position: absolute;
    top: -12px;
    inset-inline-end: -12px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    font-size: 1.45rem;
    cursor: pointer;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.tutorial-video-modal-frame-shell,
.tutorial-video-embed-shell {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(146, 170, 220, 0.18);
    background:
        radial-gradient(circle at top, rgba(72, 122, 255, 0.18), transparent 46%),
        linear-gradient(180deg, #0b1018, #090d14);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 20px 40px rgba(0, 0, 0, 0.24);
    aspect-ratio: 16 / 9;
}

.tutorial-video-embed,
.tutorial-video-modal-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

body.tutorial-video-modal-open {
    overflow: hidden;
}

.pipeline-diagram {
    display: grid;
    gap: 18px;
}

.pipeline-diagram-intro {
    border-right: 4px solid #db5c32;
    background:
        radial-gradient(circle at top right, rgba(219, 92, 50, 0.18), transparent 38%),
        linear-gradient(135deg, rgba(255, 248, 240, 0.95), rgba(255, 255, 255, 0.98));
}

.pipeline-animated-visual {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 18px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(150, 92, 52, 0.16);
    background:
        radial-gradient(circle at 15% 20%, rgba(15, 118, 110, 0.15), transparent 28%),
        radial-gradient(circle at 85% 30%, rgba(124, 58, 237, 0.14), transparent 26%),
        radial-gradient(circle at 70% 80%, rgba(194, 65, 12, 0.14), transparent 26%),
        linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(255, 248, 240, 0.98));
    overflow: hidden;
}

.pipeline-animated-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
    transform: translateX(-100%);
    animation: pipelineSweep 4.2s ease-in-out infinite;
    pointer-events: none;
}

.pipeline-visual-lane {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: center;
    min-height: 82px;
    padding: 10px 0;
}

.pipeline-visual-lane::before {
    content: "";
    position: absolute;
    left: 4%;
    right: 4%;
    top: 50%;
    height: 3px;
    transform: translateY(-50%);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.08));
}

.pipeline-visual-node {
    position: relative;
    z-index: 1;
    padding: 12px 10px;
    text-align: center;
    font-weight: 700;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.pipeline-visual-pulse {
    position: absolute;
    top: 50%;
    left: 4%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border-radius: 999px;
    box-shadow: 0 0 0 10px rgba(219, 92, 50, 0.08);
    background: currentColor;
    animation: pipelinePulseTravel 3.2s linear infinite;
}

.lane-geometry { color: #0f766e; }
.lane-raster { color: #7c3aed; }
.lane-fragment { color: #c2410c; }
.lane-raster .pipeline-visual-pulse { animation-delay: 0.8s; }
.lane-fragment .pipeline-visual-pulse { animation-delay: 1.6s; }

.pipeline-visual-sidecar {
    display: grid;
    gap: 12px;
    align-content: center;
}

.pipeline-gif-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.pipeline-gif-hero {
    display: grid;
}

.pipeline-gif-card {
    margin: 0;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.pipeline-gif-card-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
    min-height: 280px;
    border-radius: 24px;
    border-color: rgba(15, 118, 110, 0.22);
    background:
        radial-gradient(circle at 12% 18%, rgba(15, 118, 110, 0.12), transparent 26%),
        radial-gradient(circle at 88% 22%, rgba(194, 65, 12, 0.12), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.98));
}

.pipeline-gif-card img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 220px;
    object-fit: cover;
    background:
        radial-gradient(circle at 50% 18%, rgba(255,255,255,0.9), rgba(241,245,249,0.98));
}

.pipeline-gif-card-hero img {
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    border-left: 1px solid rgba(148, 163, 184, 0.16);
}

.pipeline-gif-card figcaption {
    display: grid;
    gap: 6px;
    padding: 14px 15px 16px;
}

.pipeline-gif-card-hero figcaption {
    align-content: center;
    gap: 10px;
    padding: 22px 24px;
}

.pipeline-gif-card strong {
    color: #0f172a;
}

.pipeline-gif-card span {
    color: #475569;
    line-height: 1.8;
}

.pipeline-sidecar-card {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
}

.pipeline-sidecar-card strong {
    display: block;
    margin-bottom: 6px;
    color: #0f172a;
}

.pipeline-sidecar-card span {
    color: #475569;
    line-height: 1.8;
    display: block;
}

.pipeline-stage-track {
    display: grid;
    grid-template-columns: repeat(11, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

.pipeline-stage {
    position: relative;
    grid-column: span 2;
    padding: 18px 16px 16px;
    border-radius: 18px;
    border: 1px solid rgba(150, 92, 52, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 245, 239, 0.95));
    box-shadow: 0 18px 45px rgba(69, 41, 21, 0.08);
    overflow: hidden;
}

.pipeline-stage::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    border-radius: 18px 0 0 18px;
    background: var(--stage-accent, #db5c32);
}

.pipeline-stage-badge {
    position: relative;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--stage-accent, #db5c32);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--stage-accent, #db5c32) 45%, transparent);
    margin-bottom: 10px;
}

.pipeline-stage-badge::after {
    content: "";
    position: absolute;
    top: calc(100% + 3px);
    left: 50%;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid color-mix(in srgb, var(--stage-accent, #db5c32) 90%, #ffffff 10%);
    filter: drop-shadow(0 4px 6px color-mix(in srgb, var(--stage-accent, #db5c32) 20%, transparent));
}

.pipeline-stage h4 {
    margin: 12px 0 8px;
    color: #1f2937;
}

.pipeline-stage p {
    margin: 0;
    line-height: 1.85;
    color: #4b5563;
    font-size: 0.96rem;
}

.pipeline-stage-meta {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stage-input { --stage-accent: #0f766e; }
.stage-assembly { --stage-accent: #0f4c81; }
.stage-vertex { --stage-accent: #1d4ed8; }
.stage-raster { --stage-accent: #7c3aed; }
.stage-fragment { --stage-accent: #c2410c; }
.stage-output { --stage-accent: #b42318; }

.pipeline-stage-arrow {
    position: relative;
    grid-column: span 1;
    align-self: center;
    min-height: 100%;
}

.pipeline-stage-arrow::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 8%;
    right: 16%;
    height: 4px;
    border-radius: 999px;
    transform: translateY(-50%);
    background:
        linear-gradient(90deg, rgba(219, 92, 50, 0.15), rgba(219, 92, 50, 0.9), rgba(219, 92, 50, 0.15));
    background-size: 200% 100%;
    animation: pipelineFlow 2.4s linear infinite;
}

.pipeline-stage-arrow::after {
    content: "";
    position: absolute;
    top: 50%;
    left: calc(100% - 18px);
    width: 14px;
    height: 14px;
    border-top: 4px solid rgba(219, 92, 50, 0.9);
    border-left: 4px solid rgba(219, 92, 50, 0.9);
    transform: translateY(-50%) rotate(135deg);
}

.pipeline-support-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

@keyframes pipelineFlow {
    0% {
        background-position: 200% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes pipelineSweep {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(120%);
    }
}

@keyframes pipelinePulseTravel {
    0% {
        left: 4%;
        transform: translateY(0) scale(0.92);
        opacity: 0.15;
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translateY(0) scale(1.05);
    }
    100% {
        left: calc(96% - 18px);
        transform: translateY(0) scale(0.92);
        opacity: 0.2;
    }
}

@media (max-width: 1100px) {
    .pipeline-animated-visual {
        grid-template-columns: 1fr;
    }

    .pipeline-stage-track {
        grid-template-columns: 1fr;
    }

    .pipeline-stage,
    .pipeline-stage-arrow {
        grid-column: auto;
    }

    .pipeline-stage-arrow {
        min-height: 40px;
    }

    .pipeline-stage-arrow::before {
        top: 10px;
        bottom: 8px;
        left: 50%;
        right: auto;
        width: 4px;
        height: auto;
        transform: translateX(-50%);
        background:
            linear-gradient(180deg, rgba(219, 92, 50, 0.15), rgba(219, 92, 50, 0.9), rgba(219, 92, 50, 0.15));
        background-size: 100% 200%;
        animation: pipelineFlowVertical 2.4s linear infinite;
    }

    .pipeline-stage-arrow::after {
        top: auto;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%) rotate(225deg);
    }

    .pipeline-support-grid {
        grid-template-columns: 1fr;
    }

    .pipeline-gif-gallery {
        grid-template-columns: 1fr;
    }

    .pipeline-gif-card-hero {
        grid-template-columns: 1fr;
    }

    .pipeline-gif-card-hero img {
        min-height: 210px;
        border-left: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    }
}

@media (max-width: 720px) {
    .pipeline-visual-lane {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 8px 0;
    }

    .pipeline-visual-lane::before,
    .pipeline-visual-pulse {
        display: none;
    }
}

@keyframes pipelineFlowVertical {
    0% {
        background-position: 50% 200%;
    }
    100% {
        background-position: 50% 0%;
    }
}

/* تعليقات الكود العربية */
.code-block .comment {
    color: var(--code-comment) !important;
}

/* الثوابت في الكود */
.code-token {
    position: relative;
    outline: none;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.code-token.entity-link-with-icon,
.code-token .entity-inline-label {
    font-family: var(--font-code);
}

.constant {
    color: var(--code-keyword) !important;
    font-weight: 500;
}

.code-token[data-tooltip] {
    cursor: help;
}

.code-token[data-tooltip]::after {
    content: none;
}

.code-token[data-tooltip]:hover::after,
.code-token[data-tooltip]:focus::after,
.code-token[data-tooltip]:active::after,
.code-token[data-tooltip]:focus-visible::after {
    content: none;
}

.app-tooltip {
    position: fixed;
    inset: auto auto auto auto;
    background: rgba(11, 17, 28, 0.98);
    color: #f8fafc;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-family: var(--font-arabic);
    font-weight: 500;
    line-height: 1.75;
    text-align: right;
    white-space: normal;
    width: max-content;
    min-width: 180px;
    max-width: min(360px, 84vw);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(8px);
    pointer-events: none;
    opacity: 0;
    transform: translateY(0);
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 2000;
}

.app-tooltip.visible {
    opacity: 1;
    transform: translateY(-2px);
}

.app-tooltip[data-placement="bottom"].visible {
    transform: translateY(2px);
}

.app-tooltip-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.app-tooltip-fields {
    display: grid;
    gap: 7px;
}

.app-tooltip-field {
    display: grid;
    gap: 2px;
}

.app-tooltip-field-label {
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
}

.app-tooltip-field-value {
    color: #f8fafc;
}

.app-tooltip-notes {
    display: grid;
    gap: 6px;
}

.app-tooltip-fields + .app-tooltip-notes,
.app-tooltip-title + .app-tooltip-notes,
.app-tooltip-title + .app-tooltip-fields {
    margin-top: 8px;
}

.app-tooltip-notes p {
    margin: 0;
    color: #dbe7f4;
}

.imgui-signature-shell .code-block,
.imgui-gui-preview-block {
    direction: ltr;
    text-align: left;
}

.imgui-header-files-card {
    direction: rtl;
    text-align: right;
}

.imgui-header-files-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.imgui-header-files-heading h2 {
    margin-bottom: 6px;
}

.imgui-header-files-heading-note {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-family: var(--font-code);
    text-align: left;
}

.imgui-header-files-include {
    margin: 16px 0 12px;
    direction: ltr;
    text-align: left;
}

.imgui-header-files-include .doc-link,
.imgui-header-files-include code {
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
}

.imgui-gui-preview {
    margin: 16px auto;
    max-width: 760px;
    padding: 14px 16px;
    border: 1px solid rgba(140, 200, 255, 0.18);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(47, 116, 192, 0.10), rgba(255, 255, 255, 0.02));
}

.imgui-gui-preview-title {
    color: var(--text-color);
    font-weight: 700;
    margin-bottom: 10px;
}

.imgui-gui-preview-block {
    margin: 0 0 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(7, 12, 20, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: #f8fafc;
    font-family: var(--font-code);
    white-space: pre-wrap;
}

.imgui-parameter-jump-link {
    text-decoration: none;
}

.imgui-example-shot {
    width: 100%;
    max-width: 390px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    justify-self: center;
}

.imgui-example-shot img {
    width: 100%;
    display: block;
    border-radius: 16px;
    border: 0;
    background: #08101c;
}

.imgui-example-shot figcaption {
    margin-top: 10px;
    color: var(--text-muted);
    line-height: 1.8;
}

.imgui-index-grid-widgets {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.imgui-index-card {
    overflow: hidden;
}

.imgui-index-card p {
    margin: 0;
}

.imgui-index-preview {
    width: 100%;
    margin-top: 4px;
    direction: rtl;
    text-align: right;
}

.imgui-index-preview-window {
    min-height: 108px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background:
        linear-gradient(180deg, rgba(53, 68, 89, 0.96), rgba(19, 28, 40, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 12px 24px rgba(0, 0, 0, 0.16);
}

.imgui-index-preview-image {
    display: block;
    width: 100%;
    min-height: 108px;
    background: #0f172a;
    object-fit: cover;
}

.imgui-index-preview-titlebar {
    height: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background:
        radial-gradient(circle at 12px 50%, rgba(255, 148, 122, 0.9) 0 2px, transparent 2.5px),
        radial-gradient(circle at 22px 50%, rgba(255, 217, 102, 0.9) 0 2px, transparent 2.5px),
        radial-gradient(circle at 32px 50%, rgba(106, 214, 168, 0.9) 0 2px, transparent 2.5px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.imgui-index-preview-body {
    min-height: 89px;
    padding: 15px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    color: #e5edf7;
    font-family: var(--font-arabic);
    font-size: 0.82rem;
}

.imgui-index-control-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.imgui-index-control-row-space {
    justify-content: space-between;
}

.imgui-index-control-stack {
    display: grid;
    gap: 8px;
}

.imgui-index-control-label,
.imgui-index-slider-value,
.imgui-index-text-line {
    color: #edf4ff;
}

.imgui-index-control-button {
    align-self: stretch;
    padding: 10px 14px;
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(93, 116, 152, 0.95), rgba(64, 82, 109, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    text-align: center;
    font-weight: 700;
}

.imgui-index-control-checkbox {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border-radius: 4px;
    border: 1px solid rgba(208, 220, 240, 0.58);
    background: rgba(12, 18, 28, 0.55);
    position: relative;
}

.imgui-index-control-checkbox.is-checked::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 2px;
    background:
        linear-gradient(135deg, transparent 38%, #cce1ff 38% 48%, transparent 48%),
        linear-gradient(45deg, transparent 52%, #cce1ff 52% 64%, transparent 64%),
        linear-gradient(180deg, rgba(88, 166, 255, 0.84), rgba(88, 166, 255, 0.64));
}

.imgui-index-control-input {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid rgba(188, 203, 224, 0.24);
    background: rgba(10, 16, 26, 0.56);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-family: var(--font-code);
    direction: ltr;
}

.imgui-index-control-caret {
    width: 1px;
    height: 16px;
    background: rgba(248, 250, 252, 0.88);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
}

.imgui-index-slider-track {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: rgba(15, 22, 34, 0.88);
    border: 1px solid rgba(196, 210, 230, 0.15);
    overflow: hidden;
}

.imgui-index-slider-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 58%;
    background: linear-gradient(90deg, rgba(88, 166, 255, 0.92), rgba(123, 209, 255, 0.85));
}

.imgui-index-slider-knob {
    position: absolute;
    top: 50%;
    left: calc(58% - 8px);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    transform: translateY(-50%);
    background: linear-gradient(180deg, #f8fbff, #c7d7eb);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.imgui-index-text-line {
    min-height: 14px;
}

.imgui-index-text-line.is-short {
    width: 62%;
    color: rgba(229, 237, 247, 0.82);
}

.imgui-index-preview-fallback {
    margin: 0;
    white-space: pre-wrap;
    font-family: var(--font-code);
    font-size: 0.76rem;
    line-height: 1.55;
}

.game-ui-index-preview {
    width: 100%;
    margin-top: 4px;
    direction: rtl;
    text-align: right;
}

.game-ui-index-preview-window {
    min-height: 132px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background:
        linear-gradient(180deg, rgba(24, 33, 48, 0.98), rgba(11, 17, 28, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 12px 24px rgba(0, 0, 0, 0.18);
}

.game-ui-index-preview-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 54%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.game-ui-index-preview-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #e5edf7;
    font-size: 0.71rem;
    font-weight: 700;
    line-height: 1.2;
}

.game-ui-index-preview-chip.muted {
    color: #9fb0c5;
    background: rgba(148, 163, 184, 0.12);
}

.game-ui-index-preview-body {
    min-height: 92px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(circle at center, rgba(37, 99, 235, 0.08), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.game-ui-index-preview-visual {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.78);
    transform-origin: center center;
}

.game-ui-index-preview-visual * {
    pointer-events: none !important;
}

.game-ui-index-preview-fallback {
    margin: 0;
    width: 100%;
    direction: ltr;
    text-align: left;
    white-space: pre;
    font-family: var(--font-code);
    font-size: 0.61rem;
    line-height: 1.45;
    color: #d9e5f2;
}

.game-ui-index-preview-empty {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #dbe7f5;
    text-align: center;
}

.game-ui-index-preview-empty strong {
    font-size: 0.84rem;
}

.game-ui-index-preview-empty p {
    margin: 0;
    max-width: 20rem;
    color: #9fb0c5;
    font-size: 0.76rem;
    line-height: 1.6;
}

.glsl-index-preview {
    width: 100%;
    margin: 0;
    direction: rtl;
    text-align: right;
}

.glsl-index-preview-window {
    min-height: 150px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background:
        linear-gradient(180deg, rgba(22, 33, 49, 0.98), rgba(10, 16, 27, 0.99));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 12px 24px rgba(0, 0, 0, 0.16);
}

.glsl-index-preview-titlebar {
    min-height: 18px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background:
        radial-gradient(circle at 12px 50%, rgba(255, 148, 122, 0.9) 0 2px, transparent 2.5px),
        radial-gradient(circle at 22px 50%, rgba(255, 217, 102, 0.9) 0 2px, transparent 2.5px),
        radial-gradient(circle at 32px 50%, rgba(106, 214, 168, 0.9) 0 2px, transparent 2.5px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.glsl-index-preview-kind {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #edf4ff;
    font-size: 0.75rem;
    line-height: 1.4;
}

.glsl-index-preview-body {
    min-height: 131px;
    padding: 14px;
    display: grid;
    gap: 10px;
}

.glsl-index-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.glsl-index-preview-name {
    margin: 0;
    padding: 6px 9px;
    border-radius: 9px;
    background: rgba(11, 17, 27, 0.66);
    border: 1px solid rgba(188, 203, 224, 0.16);
    color: #f3f8ff;
    font-family: var(--font-code);
    font-size: 0.82rem;
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
}

.glsl-index-preview-stage {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(79, 180, 255, 0.14);
    border: 1px solid rgba(111, 184, 255, 0.18);
    color: #d8ebff;
    font-size: 0.72rem;
    line-height: 1.4;
}

.glsl-index-preview-code {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(188, 203, 224, 0.14);
    background: rgba(7, 11, 19, 0.6);
    color: #d7e5f7;
    font-family: var(--font-code);
    font-size: 0.78rem;
    line-height: 1.7;
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.glsl-index-preview-note {
    margin: 0;
    color: #b2c3d7;
    font-size: 0.78rem;
    line-height: 1.75;
}

.imgui-parameter-table {
    table-layout: auto;
}

.imgui-parameter-table col.imgui-param-col-name,
.imgui-parameter-table col.imgui-param-col-type {
    width: 1%;
}

.imgui-parameter-table col.imgui-param-col-details {
    width: auto;
}

.imgui-parameter-table th.imgui-param-col-name,
.imgui-parameter-table td.imgui-param-col-name,
.imgui-parameter-table th.imgui-param-col-type,
.imgui-parameter-table td.imgui-param-col-type {
    width: 1%;
    white-space: nowrap;
}

.imgui-parameter-table td.imgui-param-col-name,
.imgui-parameter-table td.imgui-param-col-type {
    direction: ltr;
    text-align: left;
    overflow-wrap: normal;
    word-break: normal;
}

.imgui-related-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    align-items: flex-start;
}

.imgui-related-list li {
    display: flex;
    width: auto;
}

.imgui-related-list li + li {
    margin-top: 0;
}

.imgui-related-list .related-link,
.imgui-related-list .related-link-static {
    max-width: none;
    width: auto;
    justify-content: flex-start;
    text-align: left;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

@media (max-width: 960px) {
    .imgui-parameter-table th.imgui-param-col-name,
    .imgui-parameter-table td.imgui-param-col-name,
    .imgui-parameter-table th.imgui-param-col-type,
    .imgui-parameter-table td.imgui-param-col-type {
        white-space: normal;
    }

    .imgui-related-list .related-link,
    .imgui-related-list .related-link-static {
        white-space: normal;
    }
}

.imgui-frame-list {
    display: grid;
    gap: 12px;
}

.imgui-frame-card {
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.imgui-frame-card strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
}

.imgui-execution-map {
    display: grid;
    justify-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.imgui-execution-step {
    width: min(100%, 520px);
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(47, 116, 192, 0.12);
    border: 1px solid rgba(140, 200, 255, 0.18);
    text-align: center;
}

.imgui-execution-arrow {
    color: var(--text-muted);
    font-weight: 700;
}

.imgui-inline-note {
    display: inline-block;
    margin-right: 8px;
    color: var(--text-muted);
}

.inline-static-token {
    display: inline-flex;
    align-items: center;
}

.file-lines-chunk {
    margin: 1rem 0;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    background: var(--card-bg);
}

.file-lines-chunk summary {
    cursor: pointer;
    padding: 0.9rem 1rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.03);
}

.file-chunk-body {
    padding: 0.8rem;
}

.file-chunk-placeholder {
    padding: 0.9rem 1rem;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
}

.file-chunk-placeholder p + p {
    margin-top: 0.45rem;
}

.file-source-chunk-list {
    display: block;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    background: var(--code-bg);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
}

.file-source-chunk {
    background: transparent;
    box-shadow: none;
}

.file-source-chunk-body {
    padding: 0;
}

.file-source-code-container {
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.file-source-code-shell {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: stretch;
    direction: ltr;
}

.file-source-line-numbers {
    min-width: 4.5rem;
    padding: 20px 10px 20px 14px;
    border-right: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
        rgba(8, 12, 20, 0.45);
    color: var(--text-muted);
    font-family: var(--font-code);
    font-size: 0.8rem;
    text-align: right;
    user-select: none;
}

.file-source-line-numbers span {
    display: block;
    line-height: 1.9;
    counter-increment: file-line;
}

.file-source-line-numbers span::before {
    content: counter(file-line);
}

.file-source-code-container .code-block {
    margin: 0;
}

.file-source-code-container pre {
    padding: 20px 22px;
    overflow: auto;
    white-space: pre;
    word-wrap: normal;
    line-height: 1.9;
}

.file-source-code-container code {
    display: block;
    white-space: pre;
    word-break: normal;
    line-height: inherit;
}

.file-source-chunk .file-chunk-placeholder {
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 1.2rem;
}

@media (max-width: 760px) {
    .file-source-line-numbers {
        min-width: 3.5rem;
        padding: 18px 8px 18px 10px;
        font-size: 0.74rem;
    }

    .file-source-code-container pre {
        padding: 18px 14px;
        font-size: 0.8rem;
    }
}

.file-lines-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.file-lines-table th,
.file-lines-table td {
    border-top: 1px solid var(--border-color);
    padding: 0.7rem 0.8rem;
    vertical-align: top;
}

.file-line-number {
    width: 72px;
    text-align: center;
    direction: ltr;
    color: var(--text-muted);
    font-family: var(--font-code);
}

.file-line-code {
    width: 44%;
    direction: ltr;
    text-align: left;
    overflow-wrap: anywhere;
}

.file-line-code code {
    display: block;
    white-space: pre-wrap;
    font-family: var(--font-code);
}

.file-line-comment {
    overflow-wrap: anywhere;
}

/* ===== تنسيقات الصفحة الرئيسية الجديدة ===== */

.home-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.home-library-stack {
    display: grid;
    gap: 30px;
}

.home-library-shell {
    padding: 26px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top left, rgba(88, 166, 255, 0.10), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
        var(--card-bg);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.10);
}

.home-library-shell .stats-grid {
    margin-bottom: 24px;
}

.home-library-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.home-library-copy {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.home-library-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.home-library-copy h2 {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.home-library-copy p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.9;
}

.home-library-note {
    color: var(--text-color) !important;
}

.home-library-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.home-library-actions .quick-btn {
    min-width: 190px;
}

.vulkan-ready-examples-section {
    margin-top: 18px;
}

.vulkan-ready-examples-intro {
    margin-bottom: 16px;
}

.vulkan-ready-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
    gap: 14px;
}

.vulkan-ready-example-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent),
        var(--card-bg);
}

.vulkan-ready-example-card-plain {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.vulkan-ready-example-card-plain .vulkan-ready-example-overview-card p,
.vulkan-ready-example-card-plain .vulkan-ready-example-support-card p {
    max-width: none;
}

.vulkan-ready-example-card h3,
.vulkan-ready-example-card h4 {
    margin: 0;
    padding: 0;
    border: 0;
}

.vulkan-ready-example-card h3 {
    font-size: 1.08rem;
    line-height: 1.35;
}

.vulkan-ready-example-card h4 {
    font-size: 0.95rem;
}

.vulkan-ready-example-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(320px, 34vw, 390px);
    align-items: stretch;
    gap: 18px;
}

.vulkan-ready-example-overview-card {
    min-width: 0;
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
        var(--card-bg);
    display: grid;
    align-content: start;
    gap: 10px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

.vulkan-ready-example-overview-card h4 {
    font-size: 1rem;
    color: var(--text-color);
}

.vulkan-ready-example-overview-card p {
    margin: 0;
    line-height: 1.72;
    max-width: 60ch;
}

.vulkan-ready-example-shot {
    width: 100%;
    max-width: 390px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    justify-self: center;
}

.vulkan-ready-example-shot svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}

.vulkan-ready-example-shot figcaption {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vulkan-ready-example-support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.vulkan-ready-example-support-card {
    min-width: 0;
    padding: 16px 18px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent),
        rgba(255, 255, 255, 0.016);
}

.vulkan-ready-example-support-card h4 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.vulkan-ready-example-support-card .best-practices-list {
    margin: 0;
}

.vulkan-ready-example-related-card .see-also-links {
    align-items: flex-start;
}

.vulkan-ready-example-support-grid > .vulkan-ready-example-related-card {
    grid-column: 1 / -1;
}

.vulkan-ready-example-related-card .glsl-ready-example-links {
    width: 100%;
    margin: 0;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent),
        rgba(255, 255, 255, 0.016);
    gap: 10px;
    align-items: flex-start;
}

.vulkan-ready-example-related-card .glsl-ready-example-links .related-link,
.vulkan-ready-example-related-card .glsl-ready-example-links .related-link-static {
    justify-content: flex-start;
    text-align: right;
    max-width: 100%;
}

.vulkan-ready-example-code-wrap .code-toolbar-title {
    font-weight: 700;
}

.vulkan-example-visual-guide {
    margin-top: -4px;
}

.vulkan-example-visual-guide h5 {
    margin: 0;
    font-size: 0.95rem;
}

.vulkan-example-visual-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 14px 0;
}

.vulkan-example-visual-guide-card {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
        rgba(255, 255, 255, 0.015);
}

.vulkan-example-visual-guide-card p {
    margin: 8px 0 0;
}

@media (max-width: 1180px) {
    .vulkan-ready-examples-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .vulkan-example-hero {
        grid-template-columns: 1fr;
    }

    .example-explanation-summary-strip {
        grid-template-columns: 1fr;
    }

    .vulkan-example-page-header {
        padding: 16px 18px 14px;
    }

    .vulkan-ready-example-overview-card {
        padding: 14px 16px;
    }

    .vulkan-ready-example-body {
        grid-template-columns: 1fr;
    }

    .vulkan-example-cluster-summary {
        flex-direction: column;
    }

    .vulkan-example-cluster-note {
        max-width: none;
    }

    .vulkan-ready-example-shot {
        width: 100%;
        max-width: 390px;
        margin: 4px auto 0;
    }
}

.home-library-empty-card {
    margin: 0;
}

.home-section {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
        var(--card-bg);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.10);
}

.home-section h2 {
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(233, 69, 96, 0.45);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.quick-btn {
    padding: 13px 18px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-color);
    font-family: var(--font-arabic);
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s ease;
}

.quick-btn:hover {
    background: rgba(233, 69, 96, 0.18);
    border-color: rgba(233, 69, 96, 0.45);
    color: white;
    transform: translateY(-2px);
}

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

.quick-btn.primary:hover {
    background: #ff6b6b;
}

/* العناصر الحديثة */
.recent-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 0;
}

.recent-item:hover {
    background: rgba(233, 69, 96, 0.16);
    border-color: rgba(233, 69, 96, 0.35);
    color: white;
}

.recent-item .item-icon {
    font-size: 1.2rem;
}

.recent-item .item-name {
    font-family: var(--font-code);
    font-size: 0.9rem;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* روابط مفيدة */
.useful-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.useful-links li {
    padding: 0;
}

.useful-links a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-color);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.useful-links a:hover {
    color: var(--accent-color);
    border-color: rgba(233, 69, 96, 0.35);
    background: rgba(233, 69, 96, 0.10);
}

/* بطاقات الإحصائيات قابلة للنقر */
.stat-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 36px rgba(233, 69, 96, 0.14);
}

/* بطاقات الدروس */
.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tutorial-card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.08);
}

.tutorial-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-3px);
}

.tutorial-num {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
    margin-bottom: 15px;
}

.tutorial-card h3 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.tutorial-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* شبكة العناصر */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.item-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
        var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.08);
}

.item-card:hover {
    border-color: var(--accent-color);
    background:
        radial-gradient(circle at top right, rgba(233, 69, 96, 0.12), transparent 35%),
        var(--hover-bg);
    transform: translateY(-2px);
}

.item-card .item-icon {
    font-size: 1.5rem;
}

.item-card .item-name {
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--text-color);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    width: 100%;
}

.item-card .item-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--hover-bg);
    padding: 3px 8px;
    border-radius: 4px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

.deferred-structure-section {
    position: relative;
}

.deferred-structure-placeholder {
    position: relative;
    overflow: hidden;
    min-height: 120px;
    border: 1px dashed rgba(88, 166, 255, 0.18);
    background:
        radial-gradient(circle at top left, rgba(88, 166, 255, 0.08), transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent),
        var(--card-bg);
}

.deferred-structure-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
    animation: deferredPlaceholderSweep 1.8s ease-in-out infinite;
}

.deferred-structure-placeholder p {
    position: relative;
    z-index: 1;
    color: var(--text-muted);
}

.deferred-structure-autoload-note {
    font-size: 0.84rem;
    color: var(--text-muted);
    opacity: 0.92;
}

.deferred-structure-load-btn {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    border: 1px solid rgba(88, 166, 255, 0.25);
    background: rgba(88, 166, 255, 0.10);
    color: var(--text-color);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: var(--font-arabic);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.deferred-structure-load-btn:hover {
    background: rgba(88, 166, 255, 0.18);
    border-color: rgba(88, 166, 255, 0.38);
    transform: translateY(-1px);
}

.deferred-structure-load-btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.file-index-group {
    display: grid;
    gap: 16px;
    margin-bottom: 26px;
}

.file-index-group .content-card {
    margin-bottom: 0;
}

.file-index-group .related-chip {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    margin-top: 8px;
}

.file-index-details {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent),
        rgba(255, 255, 255, 0.01);
    overflow: hidden;
}

.file-index-details summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 18px;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.file-index-details summary::-webkit-details-marker {
    display: none;
}

.file-index-details summary::after {
    content: "▾";
    color: var(--text-muted);
    transition: transform 0.18s ease, color 0.18s ease;
}

.file-index-details[open] summary::after {
    transform: rotate(180deg);
    color: var(--accent-color);
}

.file-index-details summary:hover {
    background: rgba(255, 255, 255, 0.03);
}

.file-index-details .items-grid {
    padding: 0 16px 16px;
}

.file-index-details .item-card {
    min-height: 178px;
    border-radius: 14px;
    background:
        radial-gradient(circle at top right, rgba(233, 69, 96, 0.08), transparent 38%),
        var(--card-bg);
}

.file-index-details .item-card p {
    color: var(--text-muted);
    font-size: 0.84rem;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.95fr);
    gap: 18px;
    margin-bottom: 28px;
}

.home-hero-main,
.home-hero-panel {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.12);
}

.home-hero-main {
    padding: 28px;
    background:
        radial-gradient(circle at top right, rgba(233, 69, 96, 0.16), transparent 32%),
        radial-gradient(circle at center left, rgba(88, 166, 255, 0.12), transparent 28%),
        linear-gradient(135deg, rgba(16, 22, 35, 0.96), rgba(20, 28, 44, 0.96));
}

.home-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin-bottom: 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #ffd1d9;
    font-size: 0.82rem;
    font-weight: 700;
}

.home-hero-main h1 {
    font-size: clamp(2rem, 3.2vw, 3.2rem);
    line-height: 1.18;
    margin-bottom: 12px;
}

.home-hero-lead {
    max-width: 58rem;
    color: rgba(234, 234, 234, 0.88);
    font-size: 1rem;
    margin-bottom: 18px;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.home-highlight-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.home-highlight-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.82rem;
}

.home-hero-panel {
    padding: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
        rgba(18, 24, 38, 0.92);
    display: grid;
    gap: 16px;
}

.home-hero-panel-head {
    display: grid;
    gap: 4px;
}

.home-hero-panel-kicker {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.hero-stat {
    padding: 14px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    text-align: center;
}

.hero-stat-value {
    display: block;
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
}

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

.home-hero-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.9;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(88, 166, 255, 0.07);
    border: 1px solid rgba(88, 166, 255, 0.12);
}

.stat-card-rich {
    min-height: 168px;
}

.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.stat-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.stat-card-body {
    display: grid;
    gap: 6px;
}

.stat-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-color);
}

@keyframes deferredPlaceholderSweep {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

@media (max-width: 900px) {
    .main-content {
        padding-top: 74px;
    }

    .home-hero {
        grid-template-columns: 1fr;
    }

    .home-library-header {
        flex-direction: column;
    }

    .home-library-actions {
        justify-content: flex-start;
    }

    .tutorial-video-card {
        max-width: 720px;
    }

    .tutorial-video-layout {
        grid-template-columns: 1fr;
    }

    .tutorial-video-overlay-btn {
        min-width: 156px;
        min-height: 50px;
        padding: 11px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 640px) {
    .page-header {
        padding: 20px 18px 16px;
        border-radius: 18px;
    }

    .page-header h1 {
        font-size: 1.5rem;
        gap: 10px;
    }

    .stats-grid,
    .quick-links-grid,
    .tutorials-grid,
    .items-grid,
    .hero-stats-grid {
        grid-template-columns: 1fr;
    }

    .home-hero-main,
    .home-hero-panel,
    .home-section,
    .home-library-shell {
        padding: 18px;
        border-radius: 18px;
    }

    .home-library-actions .quick-btn {
        width: 100%;
        min-width: 0;
    }

    .tutorial-video-overlay-btn {
        min-width: 0;
        min-height: 44px;
        padding: 10px 12px;
        font-size: 0.82rem;
    }

    .tutorial-video-overlay-btn-play,
    .tutorial-video-overlay-btn-youtube {
        bottom: 12px;
        width: calc(50% - 18px);
    }

    .tutorial-video-overlay-btn-play {
        right: 12px;
    }

    .tutorial-video-overlay-btn-youtube {
        left: 12px;
    }
}
