/* Docs Layout & Components */
.docs-layout {
display: flex;
min-height: calc(100vh - 72px);
max-width: 1540px;
margin: 0 auto;
}

/* Sidebar Navigation */
.docs-sidebar {
width: 290px;
flex-shrink: 0;
border-right: 1px solid var(--border-subtle);
background: rgba(9, 12, 16, 0.95);
position: sticky;
top: 72px;
height: calc(100vh - 72px);
overflow-y: auto;
padding: 24px 16px 40px;
}

.docs-search-box {
margin-bottom: 24px;
}

.docs-search-input {
width: 100%;
background: var(--bg-input);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-md);
padding: 10px 14px;
color: #fff;
font-size: 0.88rem;
outline: none;
transition: all 0.15s ease;
}

.docs-search-input:focus {
border-color: var(--primary);
box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.sidebar-group {
margin-bottom: 28px;
}

.sidebar-group-title {
font-size: 0.78rem;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-dim);
font-weight: 700;
margin-bottom: 12px;
padding-left: 12px;
}

.sidebar-menu {
list-style: none;
}

.sidebar-menu li {
margin-bottom: 2px;
}

.sidebar-link {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 12px;
color: var(--text-muted);
text-decoration: none;
border-radius: var(--radius-sm);
font-size: 0.88rem;
font-weight: 500;
transition: all 0.15s ease;
}

.sidebar-link:hover {
background: rgba(255, 255, 255, 0.04);
color: #fff;
}

.sidebar-link.active {
background: rgba(99, 102, 241, 0.12);
color: #818cf8;
font-weight: 600;
}

.sidebar-badge {
font-size: 0.7rem;
padding: 1px 6px;
border-radius: 4px;
font-weight: 600;
}

/* Main Documentation Content */
.docs-main {
flex: 1;
min-width: 0;
padding: 40px 60px 100px;
line-height: 1.7;
}

.docs-breadcrumb {
display: flex;
align-items: center;
gap: 8px;
color: var(--text-dim);
font-size: 0.85rem;
margin-bottom: 20px;
}

.docs-breadcrumb a {
color: var(--text-muted);
text-decoration: none;
}

.docs-breadcrumb a:hover {
color: #fff;
}

.docs-section {
margin-bottom: 80px;
scroll-margin-top: 90px;
}

.docs-section h1 {
font-size: 2.6rem;
margin-bottom: 16px;
letter-spacing: -0.02em;
}

.docs-section h2 {
font-size: 1.85rem;
margin: 44px 0 18px;
letter-spacing: -0.01em;
padding-bottom: 12px;
border-bottom: 1px solid var(--border-subtle);
}

.docs-section h3 {
font-size: 1.35rem;
margin: 32px 0 14px;
color: #e5e7eb;
}

.docs-section p {
color: #d1d5db;
font-size: 1.02rem;
margin-bottom: 20px;
}

.docs-section ul, .docs-section ol {
color: #d1d5db;
margin-bottom: 24px;
padding-left: 24px;
}

.docs-section ul.ability-lines {
list-style: none;
margin: 8px 0 28px;
padding: 0;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 8px 24px;
}

.docs-section ul.ability-lines li {
margin: 0;
}

.docs-section li {
margin-bottom: 8px;
}

.docs-callout {
background: rgba(99, 102, 241, 0.08);
border-left: 4px solid var(--primary);
border-radius: 0 var(--radius-md) var(--radius-md) 0;
padding: 18px 22px;
margin: 24px 0;
}

.docs-callout-warning {
background: rgba(245, 158, 11, 0.08);
border-left-color: #f59e0b;
}

.docs-callout-title {
font-weight: 700;
color: #fff;
margin-bottom: 6px;
font-size: 0.95rem;
display: flex;
align-items: center;
gap: 8px;
}

.docs-callout p {
margin-bottom: 0;
font-size: 0.92rem;
color: #cbd5e1;
}

/* Code Blocks in Docs */
.docs-code-card {
background: var(--bg-code);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-md);
margin: 22px 0;
overflow: hidden;
}

.docs-code-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 16px;
background: rgba(17, 22, 34, 0.9);
border-bottom: 1px solid var(--border-subtle);
}

.docs-code-lang {
font-family: var(--font-mono);
font-size: 0.78rem;
color: #818cf8;
font-weight: 600;
text-transform: uppercase;
}

.docs-code-card pre {
padding: 20px;
font-family: var(--font-mono);
font-size: 0.88rem;
color: #f3f4f6;
overflow-x: auto;
line-height: 1.6;
}

/* Ability Reference Cards */
.ability-ref-card {
background: var(--bg-card);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-lg);
padding: 24px;
margin: 24px 0;
}

.ability-ref-top {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12px;
flex-wrap: wrap;
gap: 10px;
}

.ability-ref-name {
font-family: var(--font-mono);
font-size: 1.1rem;
font-weight: 700;
color: #c7d2fe;
}

.ability-param-table {
width: 100%;
border-collapse: collapse;
margin-top: 16px;
font-size: 0.88rem;
}

.ability-param-table th {
text-align: left;
padding: 8px 12px;
border-bottom: 1px solid var(--border-subtle);
color: var(--text-dim);
font-size: 0.78rem;
text-transform: uppercase;
}

.ability-param-table td {
padding: 10px 12px;
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.param-name {
font-family: var(--font-mono);
color: #e5e7eb;
font-weight: 600;
}

.param-type {
font-family: var(--font-mono);
color: #06b6d4;
font-size: 0.8rem;
}

.param-req {
color: #f43f5e;
font-size: 0.75rem;
font-weight: 600;
}

.param-opt {
color: var(--text-dim);
font-size: 0.75rem;
}

/* Right Table of Contents */
.docs-toc {
width: 240px;
flex-shrink: 0;
position: sticky;
top: 72px;
height: calc(100vh - 72px);
overflow-y: auto;
padding: 40px 16px;
border-left: 1px solid var(--border-subtle);
}

.toc-title {
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-dim);
font-weight: 700;
margin-bottom: 14px;
}

.toc-menu {
list-style: none;
}

.toc-menu li {
margin-bottom: 8px;
}

.toc-link {
color: var(--text-muted);
text-decoration: none;
font-size: 0.84rem;
display: block;
line-height: 1.4;
transition: color 0.15s ease;
}

.toc-link:hover {
color: #fff;
}

.toc-link.active {
color: var(--primary);
font-weight: 600;
}

@media (max-width: 1200px) {
.docs-toc { display: none; }
}

@media (max-width: 900px) {
.docs-layout { flex-direction: column; }
.docs-sidebar {
width: 100%;
height: auto;
position: static;
border-right: none;
border-bottom: 1px solid var(--border-subtle);
}
.docs-main { padding: 30px 20px; }
}

/* ==========================================================================
Documentation Screenshot Visual Frame & Lightbox
========================================================================== */

.docs-screenshot-card {
background: var(--bg-card-solid);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-lg);
margin: 22px 0 30px;
overflow: hidden;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
position: relative;
}

.docs-screenshot-card:hover {
border-color: rgba(99, 102, 241, 0.35);
box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(99, 102, 241, 0.12);
transform: translateY(-2px);
}

.docs-screenshot-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 16px;
background: rgba(14, 18, 28, 0.95);
border-bottom: 1px solid var(--border-subtle);
}

.docs-screenshot-dots {
display: flex;
align-items: center;
gap: 7px;
}

.docs-screenshot-dot {
width: 10px;
height: 10px;
border-radius: 50%;
display: inline-block;
}

.docs-screenshot-dot.dot-red { background: #ef4444; }
.docs-screenshot-dot.dot-yellow { background: #f59e0b; }
.docs-screenshot-dot.dot-green { background: #10b981; }

.docs-screenshot-title {
font-family: var(--font-mono);
font-size: 0.78rem;
color: #94a3b8;
display: flex;
align-items: center;
gap: 6px;
}

.docs-screenshot-badge {
font-size: 0.68rem;
padding: 2px 7px;
background: rgba(99, 102, 241, 0.15);
border: 1px solid rgba(99, 102, 241, 0.3);
color: #a5b4fc;
border-radius: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.04em;
}

.docs-screenshot-action {
font-size: 0.76rem;
color: var(--text-dim);
display: flex;
align-items: center;
gap: 5px;
cursor: pointer;
background: transparent;
border: none;
transition: color 0.15s ease;
}

.docs-screenshot-action:hover {
color: #818cf8;
}

.docs-screenshot-wrapper {
position: relative;
background: #080b11;
cursor: zoom-in;
overflow: hidden;
}

.docs-screenshot-img {
width: 100%;
height: auto;
display: block;
transition: transform 0.35s ease;
}

.docs-screenshot-card:hover .docs-screenshot-img {
transform: scale(1.008);
}

.docs-screenshot-zoom-hint {
position: absolute;
top: 12px;
right: 12px;
background: rgba(9, 12, 16, 0.8);
backdrop-filter: blur(6px);
border: 1px solid rgba(255, 255, 255, 0.15);
color: #e2e8f0;
padding: 5px 10px;
border-radius: var(--radius-sm);
font-size: 0.74rem;
display: flex;
align-items: center;
gap: 6px;
opacity: 0;
transform: translateY(-4px);
transition: all 0.2s ease;
pointer-events: none;
}

.docs-screenshot-wrapper:hover .docs-screenshot-zoom-hint {
opacity: 1;
transform: translateY(0);
}

.docs-screenshot-caption {
padding: 12px 18px;
background: rgba(13, 17, 26, 0.85);
border-top: 1px solid var(--border-subtle);
font-size: 0.86rem;
color: #94a3b8;
display: flex;
align-items: flex-start;
gap: 9px;
line-height: 1.5;
}

.docs-screenshot-caption svg {
flex-shrink: 0;
margin-top: 2px;
color: #818cf8;
}

.docs-screenshot-caption strong {
color: #e2e8f0;
}

/* Lightbox Modal */
.docs-lightbox-modal {
position: fixed;
inset: 0;
z-index: 9999;
background: rgba(5, 7, 12, 0.88);
backdrop-filter: blur(10px);
display: none;
opacity: 0;
transition: opacity 0.25s ease;
align-items: center;
justify-content: center;
padding: 24px;
}

.docs-lightbox-modal.is-open {
display: flex;
opacity: 1;
}

.docs-lightbox-container {
max-width: 95vw;
max-height: 92vh;
display: flex;
flex-direction: column;
background: #111622;
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: var(--radius-lg);
box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(99, 102, 241, 0.2);
overflow: hidden;
animation: docsZoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes docsZoomIn {
from {
transform: scale(0.94);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}
}

.docs-lightbox-bar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 20px;
background: #0d121c;
border-bottom: 1px solid var(--border-subtle);
}

.docs-lightbox-bar-title {
color: #f1f5f9;
font-size: 0.9rem;
font-weight: 600;
display: flex;
align-items: center;
gap: 8px;
}

.docs-lightbox-close {
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.1);
color: #fff;
border-radius: 6px;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.15s ease;
}

.docs-lightbox-close:hover {
background: rgba(239, 68, 68, 0.2);
border-color: #ef4444;
color: #f87171;
}

.docs-lightbox-body {
overflow: auto;
padding: 12px;
background: #090c10;
display: flex;
align-items: center;
justify-content: center;
}

.docs-lightbox-img {
max-width: 100%;
max-height: calc(90vh - 120px);
object-fit: contain;
border-radius: 6px;
}

.docs-lightbox-footer {
padding: 10px 20px;
background: #0d121c;
border-top: 1px solid var(--border-subtle);
color: #94a3b8;
font-size: 0.85rem;
}
