/* --- Documentation Styles --- */

/* Doc Layout Specifics */
body.doc-page {
    overflow: hidden;
    /* Prevent body scroll, layout manages scrolling */
}

.doc-layout {
    display: flex;
    height: calc(100vh - 81px);
    /* 81px approx header height */
    margin-top: 81px;
}

/* Sidebar */
.doc-sidebar {
    width: 300px;
    background: rgba(5, 5, 7, 0.95);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 20px;
    flex-shrink: 0;
}

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

.sidebar-toggle {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-toggle::after {
    content: '›';
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.sidebar-toggle.active {
    color: var(--accent);
}

.sidebar-toggle.active::after {
    transform: rotate(90deg);
}

.sidebar-content {
    display: none;
    padding-left: 15px;
    margin-top: 5px;
}

.sidebar-content.open {
    display: block;
}

.sidebar-content a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 10px;
    font-size: 0.9rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
}

.sidebar-content a:hover,
.sidebar-content a.active {
    color: var(--text-primary);
    border-left-color: var(--accent);
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.1) 0%, transparent 100%);
}

/* Main Content */
.doc-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px 60px;
}

.doc-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.doc-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Scrollbar styling */
.doc-sidebar::-webkit-scrollbar,
.doc-content::-webkit-scrollbar {
    width: 6px;
}

.doc-sidebar::-webkit-scrollbar-thumb,
.doc-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

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

    .doc-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

:root {
    --bg-main: #050507;
    --bg-card: rgba(30, 34, 40, 0.6);
    --accent: #ff6b35;
    --accent-glow: rgba(255, 107, 53, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #a0aab5;
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(255, 107, 53, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(41, 98, 255, 0.05) 0%, transparent 40%);
    overflow-x: hidden;
}

/* --- Header & Nav --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 5, 7, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.logo span {
    color: var(--accent);
}

.badge {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--text-secondary);
    font-weight: 600;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s;
    position: relative;
}

nav a:hover,
nav a.active {
    color: var(--text-primary);
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -28px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 -2px 10px var(--accent);
}

/* --- Hero Section --- */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 160px 20px 100px;
    position: relative;
}

.hero h1 {
    font-size: 5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ffffff 30%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    max-width: 900px;
}

.hero h1 span {
    display: block;
    background: linear-gradient(to right, var(--accent), #ff9f76);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

p.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 0px;
    line-height: 1.6;
}

/* --- Features Cards --- */
.features-container {
    padding: 40px 50px 100px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border);
    text-align: left;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 107, 53, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card:hover::before {
    opacity: 1;
}

.icon-box {
    width: 50px;
    height: 50px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--accent);
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}

/* --- Gallery & Lightbox --- */
.gallery-item img {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: zoom-in;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(255, 107, 53, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active img {
    transform: scale(1);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    background: #020203;
}

/* Responsive */
@media (max-width: 1024px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 20px;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 3rem;
    }

    nav ul {
        gap: 20px;
    }
}

/* --- API Documentation Specifics --- */
.api-endpoint {
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.api-endpoint:last-child {
    border-bottom: none;
}

.api-endpoint h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    margin-top: 30px;
}

.endpoint-description {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.endpoint-card {
    background: rgba(30, 34, 40, 0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    margin-top: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 1.1rem;
}

.method {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.method.post {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.method.get {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.method.delete {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.method.put {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.url {
    color: var(--text-primary);
    word-break: break-all;
}

.code-block {
    margin-top: 20px;
    background: #0d1117;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.code-title {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

pre {
    padding: 15px;
    overflow-x: auto;
    margin: 0;
}

code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
    color: #e6edf3;
    line-height: 1.5;
}

.response-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.response-success .code-block {
    border-color: rgba(16, 185, 129, 0.3);
}

.response-success .code-title {
    color: #34d399;
}

.response-error .code-block {
    border-color: rgba(239, 68, 68, 0.3);
}

.response-error .code-title {
    color: #f87171;
}

@media (max-width: 900px) {
    .response-grid {
        grid-template-columns: 1fr;
    }
}

.method.delete {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Documentation Images Lightbox Trigger */
.doc-image {
    max-width: 600px;
    width: 100%;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: border-color 0.3s ease;
    cursor: zoom-in;
}

.doc-image:hover {
    border-color: var(--accent);
}

.doc-image-small {
    max-width: 400px !important;
}
