/* ============================================================
   LicenTra Documentation - Premium Aurora Theme
   ============================================================ */

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

:root {
    --aurora-bg: #0c0804;
    --aurora-surface: rgba(18, 14, 10, 0.65);
    --aurora-border: rgba(249, 115, 22, 0.15);
    --aurora-border-hover: rgba(249, 115, 22, 0.35);
    --aurora-primary: #f97316;
    --aurora-primary-light: #fb923c;
    --aurora-secondary: #f59e0b;
    --aurora-text: #fef3c7;
    --aurora-text-muted: #a8a29e;
    --aurora-gradient: linear-gradient(135deg, #f97316, #f59e0b);
    --aurora-radius: 20px;
    --aurora-radius-sm: 14px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--aurora-bg);
    color: var(--aurora-text);
    line-height: 1.6;
}

/* ---------- Sidebar ---------- */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 320px;
    height: 100vh;
    background: linear-gradient(180deg, rgba(18, 14, 8, 0.98) 0%, rgba(10, 8, 4, 0.98) 100%);
    padding: 0;
    overflow-y: auto;
    z-index: 1000;
    border-right: 1px solid var(--aurora-border);
    backdrop-filter: blur(20px);
}

.sidebar-header {
    padding: 30px 25px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.12) 0%, rgba(245, 158, 11, 0.08) 100%);
    border-bottom: 1px solid var(--aurora-border);
}

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

.sidebar-logo i {
    font-size: 32px;
    color: var(--aurora-primary-light);
}

.sidebar-logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

.sidebar-logo h1 b {
    color: var(--aurora-primary-light);
}

.sidebar-logo span {
    display: block;
    font-size: 11px;
    color: var(--aurora-secondary);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.sidebar-nav {
    padding: 22px 0;
}

.nav-section {
    margin-bottom: 10px;
}

.nav-section-title {
    padding: 10px 25px;
    font-size: 11px;
    font-weight: 600;
    color: var(--aurora-primary-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 28px;
    color: var(--aurora-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    white-space: normal;
    overflow-wrap: anywhere;
}

.nav-link:hover {
    background: rgba(249, 115, 22, 0.1);
    color: var(--aurora-text);
    border-left-color: var(--aurora-primary-light);
}

.nav-link.active {
    background: rgba(249, 115, 22, 0.15);
    color: white;
    border-left-color: var(--aurora-primary-light);
}

.nav-link i {
    width: 20px;
    font-size: 16px;
    color: var(--aurora-primary-light);
}

/* ---------- Main content ---------- */

.main-content {
    margin-left: 320px;
    padding: 40px 60px;
    min-height: 100vh;
    overflow-x: clip;
}

.content-header {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.18) 0%, rgba(245, 158, 11, 0.12) 100%);
    margin: -40px -60px 40px -60px;
    padding: 60px;
    color: white;
    border-bottom: 1px solid var(--aurora-border);
}

.content-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.content-header h1 b {
    color: var(--aurora-primary-light);
}

.content-header p {
    font-size: 18px;
    opacity: 0.9;
    color: var(--aurora-text-muted);
    max-width: 800px;
}

.breadcrumb {
    display: flex;
    gap: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--aurora-primary-light);
}

/* ---------- Sections ---------- */

.section {
    background: var(--aurora-surface);
    backdrop-filter: blur(20px);
    border-radius: var(--aurora-radius);
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid var(--aurora-border);
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--aurora-text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--aurora-border);
    padding-bottom: 15px;
}

.section-title i {
    color: var(--aurora-primary-light);
}

.section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--aurora-text);
    margin: 25px 0 15px 0;
}

.section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--aurora-text);
    margin: 20px 0 10px 0;
}

.section p {
    color: var(--aurora-text-muted);
    margin-bottom: 15px;
}

.section ul,
.section ol {
    color: var(--aurora-text-muted);
    margin-bottom: 15px;
    padding-left: 20px;
}

.section li {
    margin-bottom: 10px;
}

.section li b {
    color: var(--aurora-text);
}

.section li code,
.section p code,
.section td code,
.section h3 code,
.section h4 code {
    background: rgba(249, 115, 22, 0.12);
    color: var(--aurora-primary-light);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Fira Code', 'Consolas', monospace;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.section a {
    color: var(--aurora-primary-light);
    text-decoration: none;
    border-bottom: 1px dashed rgba(249, 115, 22, 0.4);
    transition: all 0.3s ease;
}

.section a:hover {
    color: var(--aurora-secondary);
    border-bottom-color: var(--aurora-secondary);
}

/* ---------- Cards grid ---------- */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.card {
    background: rgba(249, 115, 22, 0.06);
    border: 1px solid var(--aurora-border);
    border-radius: var(--aurora-radius-sm);
    padding: 25px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--aurora-border-hover);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.12);
}

.card-icon {
    width: 50px;
    height: 50px;
    background: var(--aurora-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.card-icon i {
    font-size: 22px;
    color: white;
}

.card h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--aurora-text);
    margin-bottom: 8px;
}

.card p {
    font-size: 14px;
    color: var(--aurora-text-muted);
    margin: 0;
}

/* ---------- Requirements list ---------- */

.requirements-list {
    list-style: none;
    padding: 0 !important;
}

.requirements-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 20px;
    background: rgba(249, 115, 22, 0.04);
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid var(--aurora-primary);
}

.requirements-list li i {
    color: var(--aurora-primary-light);
    font-size: 18px;
    margin-top: 2px;
}

.requirements-list li strong {
    color: var(--aurora-primary-light);
    min-width: 120px;
    flex-shrink: 0;
}

.requirements-list li span {
    color: var(--aurora-text-muted);
}

/* ---------- Code blocks ---------- */

.code-block {
    background: rgba(6, 8, 15, 0.9);
    border: 1px solid var(--aurora-border);
    border-radius: var(--aurora-radius-sm);
    padding: 20px;
    margin: 15px 0;
    overflow-x: auto;
    position: relative;
}

.code-block::before {
    content: "PHP";
    position: absolute;
    top: 0;
    right: 0;
    background: var(--aurora-gradient);
    color: white;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 14px;
    border-radius: 0 var(--aurora-radius-sm) 0 10px;
    text-transform: uppercase;
}

.code-block pre {
    color: var(--aurora-secondary);
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
    white-space: pre;
}

.code-block .comment {
    color: var(--aurora-text-muted);
    font-style: italic;
}

.code-block .command {
    color: var(--aurora-primary-light);
}

.code-block .php-tag {
    color: #c084fc;
}

/* ---------- Steps ---------- */

.steps {
    counter-reset: step-counter;
}

.step {
    position: relative;
    padding-left: 70px;
    margin-bottom: 30px;
}

.step::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 50px;
    background: var(--aurora-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.step h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--aurora-text);
    margin-bottom: 10px;
}

.step p {
    color: var(--aurora-text-muted);
}

/* ---------- Alerts / Callouts ---------- */

.alert {
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.alert i {
    font-size: 22px;
    margin-top: 2px;
    flex-shrink: 0;
}

.alert-info {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info i {
    color: var(--aurora-secondary);
}

.alert-warning {
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.alert-warning i {
    color: #eab308;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-danger i {
    color: #ef4444;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-success i {
    color: #10b981;
}

.alert-content h5 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--aurora-text);
}

.alert-content p {
    font-size: 14px;
    margin: 0;
    color: var(--aurora-text-muted);
}

.alert-content p a {
    color: var(--aurora-primary-light);
}

/* ---------- Buttons ---------- */

.license-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--aurora-gradient);
    color: white !important;
    padding: 10px 22px;
    border-radius: var(--aurora-radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    border-bottom: none !important;
}

.license-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

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

/* ---------- Tables ---------- */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    display: block;
    overflow-x: auto;
}

td {
    white-space: normal;
    overflow-wrap: anywhere;
}

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

th {
    color: var(--aurora-primary-light);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

td {
    color: var(--aurora-text-muted);
    font-size: 14px;
}

tbody tr:hover {
    background: rgba(249, 115, 22, 0.04);
}

/* ---------- Tabs ---------- */

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    border: 1px solid var(--aurora-border);
    background: transparent;
    color: var(--aurora-text-muted);
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
}

.tab-btn:hover {
    border-color: var(--aurora-border-hover);
    color: var(--aurora-text);
}

.tab-btn.active {
    background: var(--aurora-gradient);
    border-color: transparent;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ---------- Support card ---------- */

.support-card {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2) 0%, rgba(245, 158, 11, 0.12) 100%);
    border: 1px solid var(--aurora-border);
    border-radius: var(--aurora-radius);
    padding: 40px;
    color: white;
    text-align: center;
    margin: 30px 0;
}

.support-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: white;
}

.support-card p {
    color: var(--aurora-text-muted);
    margin-bottom: 25px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.support-card a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--aurora-gradient);
    color: white;
    padding: 15px 30px;
    border-radius: var(--aurora-radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: none;
}

.support-card a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.25);
}

/* ---------- Doc links (index integration section) ---------- */

.doc-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.doc-link-card {
    background: rgba(249, 115, 22, 0.06);
    border: 1px solid var(--aurora-border);
    border-radius: var(--aurora-radius);
    padding: 30px;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    border-bottom: none !important;
}

.doc-link-card:hover {
    transform: translateY(-3px);
    border-color: var(--aurora-border-hover);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.15);
}

.doc-link-card .doc-link-icon {
    width: 60px;
    height: 60px;
    background: var(--aurora-gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.doc-link-card .doc-link-icon i {
    font-size: 26px;
    color: white;
}

.doc-link-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--aurora-text);
    margin-bottom: 10px;
}

.doc-link-card p {
    color: var(--aurora-text-muted);
    font-size: 14px;
    margin: 0;
}

/* ---------- Footer ---------- */

.footer {
    text-align: center;
    padding: 40px;
    color: var(--aurora-text-muted);
    border-top: 1px solid var(--aurora-border);
    margin-top: 40px;
    margin-bottom: -40px;
    margin-left: -60px;
    margin-right: -60px;
}

.footer p {
    margin: 5px 0;
    font-size: 14px;
}

.footer a {
    color: var(--aurora-primary-light);
    text-decoration: none;
}

/* ---------- Mobile ---------- */

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 50px;
    height: 50px;
    background: var(--aurora-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

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

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

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .content-header {
        margin: -20px -20px 30px -20px;
        padding: 40px 20px;
    }

    .content-header h1 {
        font-size: 26px;
    }

    .footer {
        margin: 30px -20px -20px -20px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .section {
        padding: 25px 20px;
    }

    .step {
        padding-left: 60px;
    }

    .step::before {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* ---------- Scrollbar ---------- */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(18, 12, 6, 0.5);
}

::-webkit-scrollbar-thumb {
    background: var(--aurora-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--aurora-primary-light);
}

/* ---------- File hierarchy block ---------- */

.hierarchy {
    max-width: 100%;
}

/* ============================================================
   Floating Navigation Widget (scroll progress)
   ============================================================ */

.floating-nav-widget {
    position: fixed;
    bottom: 20px;
    right: 14px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.nav-btn {
    width: 39px;
    height: 39px;
    border-radius: 11px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.nav-btn:hover:not(.progress-btn) {
    transform: scale(1.1);
}

.progress-btn {
    background: #3d4f5d;
}

.top-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.menu-btn {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.bottom-btn {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.docs-btn {
    background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.docs-btn:focus-visible {
    outline: 2px solid var(--aurora-primary-light);
    outline-offset: 2px;
}

.docs-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.nav-btn i {
    font-size: 13px;
    color: white;
}

.progress-text {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
}

.progress-ring {
    position: absolute;
    transform: rotate(-90deg);
}

.progress-ring-circle {
    stroke-dasharray: 81.68;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.3s;
}

.progress-ring-bar {
    stroke-dasharray: 81.68;
    stroke-dashoffset: 81.68;
    transition: stroke-dashoffset 0.3s;
}

/* ---------- Docs switcher dropdown ---------- */

.docs-btn-wrapper {
    position: relative;
}

.docs-dropdown {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    background: linear-gradient(180deg, rgba(18, 14, 8, 0.98) 0%, rgba(10, 8, 4, 0.98) 100%);
    border: 1px solid var(--aurora-border);
    border-radius: 12px;
    padding: 10px;
    min-width: 300px;
    max-width: 360px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 10000;
}

.docs-dropdown.active {
    display: block;
}

.docs-dropdown-title {
    display: block;
    padding: 6px 14px 10px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--aurora-primary-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 1px solid var(--aurora-border);
    margin-bottom: 6px;
}

.docs-dropdown a {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 8px;
    color: var(--aurora-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: none;
    white-space: normal;
    overflow-wrap: anywhere;
}

.docs-dropdown a:hover {
    background: rgba(249, 115, 22, 0.1);
    color: var(--aurora-text);
}

.docs-dropdown a.active {
    background: rgba(249, 115, 22, 0.15);
    color: white;
}

.docs-dropdown a i {
    width: 16px;
    font-size: 13px;
    color: var(--aurora-primary-light);
}
