/* Styles */
:root {
    --primary-color: #514DEC;
    --secondary-color: #2a5eff;
    --success-color: #00a317;
    --warning-color: #FA541C;
    --danger-color: #FF4842;
    --info-color: #046DFF;
    --dark-color: #1c1c1e;
    --light-color: #f2f2f7;
    --border-radius: 12px;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #1c1c1e;
    background-color: #f5f5f7;
}

/* Alert Boxes */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid;
    background-color: #fff;
    box-shadow: var(--shadow-sm);
}

.alert-info {
    border-left-color: var(--info-color);
    background-color: #e5f6fd;
}

.alert-warning {
    border-left-color: var(--warning-color);
    background-color: #fff4e5;
}

.alert-success {
    border-left-color: var(--success-color);
    background-color: #e8f8ec;
}

.alert-danger {
    border-left-color: var(--danger-color);
    background-color: #ffe5e5;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Code Blocks */
code {
    background-color: #f4f4f4;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: #c7254e;
}

pre {
    background-color: #1c1c1e;
    color: #f5f5f7;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1rem 0;
    position: relative;
}

pre code {
    background: none;
    padding: 0;
    color: #f5f5f7;
    display: block;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Step Cards */
.step-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 1rem;
    font-size: 1.1rem;
}

/* Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 1.5rem 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius);
}

/* Image Containers */
.img-container {
    margin: 1.5rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.img-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* Requirements Table */
.requirements-table {
    width: 100%;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin: 1.5rem 0;
}

.requirements-table tr {
    border-bottom: 1px solid #e5e5e7;
}

.requirements-table tr:last-child {
    border-bottom: none;
}

.requirements-table td {
    padding: 1rem;
}

.requirements-table td:first-child {
    font-weight: 600;
    color: var(--primary-color);
    width: 200px;
}

/* Icon Sizes Table */
.table {
    width: 100%;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e5e7;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: #f9f9f9;
}

/* Quick Navigation */
.quick-nav {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.quick-nav h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-nav-item {
    padding: 1rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    text-align: center;
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-nav-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Progress Indicator */
.progress-indicator {
    position: sticky;
    top: 20px;
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
    z-index: 100;
}

.progress-bar {
    height: 8px;
    background: #e5e5e7;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
}

/* Collapsible Sections */
.collapsible {
    background-color: var(--light-color);
    color: var(--dark-color);
    cursor: pointer;
    padding: 1rem;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collapsible:hover {
    background-color: #e0e0e5;
}

.collapsible:after {
    content: '\002B';
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.5rem;
}

.collapsible.active:after {
    content: "\2212";
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: white;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.collapsible-content-inner {
    padding: 1rem;
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    z-index: 1000;
}

#backToTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(0, 122, 255, 0.3);
}

/* Command Line Interface */
.cli-command {
    background: #1c1c1e;
    color: #00a317;
    padding: 1rem;
    border-radius: var(--border-radius);
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    margin: 1rem 0;
    position: relative;
}

.cli-command:before {
    content: "$ ";
    color: var(--primary-color);
}

.copy-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: var(--secondary-color);
}

/* Feature Lists */
ul.feature-list {
    list-style: none;
    padding-left: 0;
}

ul.feature-list li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
}

ul.feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.2em;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-required {
    background-color: #ffebee;
    color: #c62828;
}

.badge-optional {
    background-color: #e3f2fd;
    color: #1976d2;
}

.badge-recommended {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e5e5e7;
    flex-wrap: wrap;
}

.tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab:hover {
    color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Checklist */
.checklist {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin: 1.5rem 0;
}

.checklist-item {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e5e7;
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.checklist-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .video-container {
        padding-bottom: 75%;
    }

    .quick-nav-grid {
        grid-template-columns: 1fr;
    }

    .requirements-table td:first-child {
        width: auto;
    }

    .step-number {
        min-width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Documentation sidebar (overrides legacy theme rules in style.css) */
.doc-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 300px;
    background: linear-gradient(165deg, #f8fafc 0%, #eef2f7 52%, #f1f5f9 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.45);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.25rem 0 1.5rem;
    box-shadow: none;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.doc-sidebar::-webkit-scrollbar {
    width: 6px;
}

.doc-sidebar::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.35);
    border-radius: 999px;
}

.doc-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.doc-sidebar .navbar-primary {
    padding: 0 1.25rem 1rem;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.doc-sidebar .navbar-primary img {
    max-width: 136px;
}

.doc-sidebar-body {
    padding: 1.25rem 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.doc-sidebar-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0 0 0.5rem 0.35rem;
}

.doc-sidebar-group {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 12px;
    padding: 0.35rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.doc-sidebar-group--toc {
    max-height: min(58vh, 420px);
    overflow-y: auto;
    padding: 0.25rem;
}

.doc-sidebar-group--toc::-webkit-scrollbar {
    width: 5px;
}

.doc-sidebar-group--toc::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.35);
    border-radius: 999px;
}

.doc-sidebar-page-link {
    display: block;
    padding: 0.55rem 0.7rem;
    margin-bottom: 2px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.doc-sidebar-page-link:last-child {
    margin-bottom: 0;
}

.doc-sidebar-page-link:hover {
    background: rgba(81, 77, 236, 0.08);
    color: var(--primary-color);
}

.doc-sidebar-page-link--active {
    font-weight: 600;
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(81, 77, 236, 0.14), rgba(42, 94, 255, 0.1));
    box-shadow: inset 3px 0 0 var(--primary-color);
}

.doc-sidebar-toc {
    padding: 0;
}

.doc-sidebar-toc .doc-sidebar-group {
    padding: 0.25rem;
}

.doc-sidebar .doc-sidebar-toc .navbar-aside .nav-link::before,
.doc-sidebar .doc-sidebar-toc .navbar-aside .submenu-nav .nav-link::before {
    content: none !important;
    display: none !important;
}

.doc-sidebar .doc-sidebar-toc .navbar-aside {
    margin-bottom: 0;
}

.doc-sidebar .doc-sidebar-toc .navbar {
    padding: 0;
}

.doc-sidebar .doc-sidebar-toc .nav-link {
    padding: 0.45rem 0.65rem 0.45rem 0.75rem;
    color: #475569;
    font-size: 0.8125rem;
    border-radius: 8px;
    margin-bottom: 2px;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.doc-sidebar .doc-sidebar-toc .nav-link:hover {
    background: rgba(81, 77, 236, 0.07);
    color: var(--primary-color);
    transform: none;
}

.doc-sidebar .doc-sidebar-toc .nav-link.active {
    background: linear-gradient(90deg, rgba(81, 77, 236, 0.16), rgba(81, 77, 236, 0.02));
    color: #3730a3;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--primary-color);
}

.doc-sidebar .doc-sidebar-toc .submenu-nav {
    margin-top: 0;
    padding-left: 0.65rem;
    margin-left: 0.35rem;
    border-left: 2px solid rgba(148, 163, 184, 0.45);
}

.doc-sidebar .doc-sidebar-toc .submenu-nav .nav-link {
    font-size: 0.8125rem;
    padding: 0.4rem 0.55rem 0.4rem 0.65rem;
}

.doc-sidebar .navbar {
    padding: 0 1rem;
}

.doc-sidebar .navbar-aside {
    margin-bottom: 1.5rem;
}

.doc-sidebar .nav-link {
    padding: 0.75rem 1rem;
    color: #4b5563;
    font-size: 0.95rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
}

.doc-sidebar .nav-link:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
    transform: translateX(4px);
}

.doc-sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 600;
}

.doc-sidebar .submenu-nav {
    margin-top: 0.5rem;
    padding-left: 1rem;
}

.doc-sidebar .submenu-nav .nav-link {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Topbar Styles */
.doc-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    display: none;
}

.doc-topbar .topbar-content {
    height: 100%;
    padding: 0 1.5rem;
}

.btn-toggle-sidenav {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cancel global `main { padding-left: 265px }` in style.css — .doc-content-wrapper supplies offset */
main {
    padding-left: 0;
}

/* Main Content Area */
.doc-content-wrapper {
    margin-left: 300px;
    padding: 2rem;
    max-width: 1200px;
}

/* Sidebar Overlay for Mobile */
.doc-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.doc-sidebar-overlay.active,
.doc-sidebar-overlay.show-overlay {
    display: block;
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .doc-topbar {
        display: block;
    }

    .doc-sidebar {
        transform: translateX(-100%);
    }

    .doc-sidebar.active,
    .doc-sidebar.show-sidenav {
        transform: translateX(0);
    }

    .doc-content-wrapper {
        margin-left: 0;
        padding: 1.5rem;
        margin-top: 70px;
    }
}

@media (max-width: 768px) {
    .video-container {
        padding-bottom: 75%;
    }

    .quick-nav-grid {
        grid-template-columns: 1fr;
    }

    .requirements-table td:first-child {
        width: auto;
    }

    .screenshot-item h5 {
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .doc-sidebar,
    .doc-topbar,
    #backToTop,
    .copy-btn,
    .video-container {
        display: none;
    }

    .doc-content-wrapper {
        margin-left: 0;
    }
}
