/* Global Styles */
:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6c757d;
    --accent-color: #ff6b6b;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --border-color: #e9ecef;
    --sidebar-width: 280px;
    --header-height: 70px;
    --font-primary: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-code: 'Consolas', 'Monaco', 'Andale Mono', monospace;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fa;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #3a57e8;
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
}

h4 {
    font-size: 1.25rem;
    margin-top: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

code, pre {
    font-family: var(--font-code);
    background-color: #f1f3f5;
    border-radius: 4px;
}

code {
    padding: 0.2rem 0.4rem;
    font-size: 0.9em;
    color: #e83e8c;
}

pre {
    padding: 1rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    line-height: 1.45;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
}

pre code {
    padding: 0;
    font-size: 0.9em;
    color: inherit;
    background-color: transparent;
    border-radius: 0;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
}

/* Layout */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: #fff;
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.logo h1 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    list-style: none;
    margin: 0.25rem 0;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-item a i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-item a:hover, .nav-item.active a {
    background-color: rgba(74, 108, 247, 0.1);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--secondary-color);
    text-align: center;
}

/* Content */
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding-top: var(--header-height);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: var(--header-height);
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 99;
    box-shadow: var(--shadow);
}

.search-container {
    display: flex;
    align-items: center;
    width: 400px;
}

.search-container input {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    font-size: 0.9rem;
}

.search-container button {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--dark-color);
    font-size: 1.2rem;
    cursor: pointer;
}

.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3a57e8;
    border-color: #3a57e8;
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #5a6268;
    color: white;
}

/* Sections */
.section {
    padding: 2rem;
    display: none;
}

.section.active {
    display: block;
}

.breadcrumbs {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.breadcrumbs a {
    color: var(--secondary-color);
}

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

/* Hero Section */
.hero {
    background-color: #fff;
    padding: 3rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.hero p {
    font-size: 1.2rem;
    color: var(--secondary-color);
    max-width: 700px;
    margin: 0 auto;
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

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

.card-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 0.75rem;
}

.card p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.card .btn {
    margin-top: auto;
}

/* Content Blocks */
.content-block {
    background-color: #fff;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

/* Tables */
.requirements-table {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

thead {
    background-color: #f8f9fa;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid var(--border-color);
}

th {
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Steps */
.steps {
    margin-bottom: 1.5rem;
}

.step {
    display: flex;
    margin-bottom: 1.5rem;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

/* Notes */
.note {
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
}

/* Code Blocks */
.code-block {
    margin: 1rem 0;
}

/* Video container */
.video-container {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-container video {
    display: block;
    width: 100%;
    background-color: #000;
}

/* Checklists */
.checklist {
    list-style: none;
    padding-left: 0;
}

.checklist li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Accordion */
.accordion {
    margin-bottom: 1.5rem;
}

.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.accordion-header {
    background-color: #f8f9fa;
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.accordion-icon {
    transition: var(--transition);
}

.accordion-content {
    padding: 1rem;
    display: none;
}

.accordion-item.active .accordion-content {
    display: block;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

/* Responsive Design */
@media (max-width: 992px) {
    :root {
        --sidebar-width: 240px;
    }
    
    .search-container {
        width: 300px;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: var(--transition);
    }
    
    .sidebar.active {
        transform: translateX(0);
        width: 280px;
    }
    
    .content {
        margin-left: 0;
    }
    
    .header {
        left: 0;
    }
    
    .search-container {
        width: 200px;
    }
    
    .cards {
        grid-template-columns: 1fr;
    }
}

/* Dark Mode */
body.dark-mode {
    background-color: #1a1d21;
    color: #e9ecef;
}

body.dark-mode .sidebar,
body.dark-mode .header,
body.dark-mode .content-block,
body.dark-mode .hero,
body.dark-mode .card {
    background-color: #2a2d35;
    border-color: #3a3f48;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #e9ecef;
}

body.dark-mode .nav-item a {
    color: #e9ecef;
}

body.dark-mode .nav-item a:hover,
body.dark-mode .nav-item.active a {
    background-color: rgba(74, 108, 247, 0.2);
}

body.dark-mode pre,
body.dark-mode code {
    background-color: #3a3f48;
    border-color: #4a4f58;
}

body.dark-mode code {
    color: #ff8a8a;
}

body.dark-mode table th,
body.dark-mode table td {
    border-color: #3a3f48;
}

body.dark-mode thead,
body.dark-mode tr:nth-child(even) {
    background-color: #3a3f48;
}

body.dark-mode .note {
    background-color: #3a3f48;
}

body.dark-mode .accordion-header {
    background-color: #3a3f48;
}

body.dark-mode .theme-toggle {
    color: #e9ecef;
}

body.dark-mode .search-container input {
    background-color: #3a3f48;
    border-color: #4a4f58;
    color: #e9ecef;
}

/* Print Styles */
@media print {
    .sidebar, .header {
        display: none;
    }
    
    .content {
        margin-left: 0;
        padding-top: 0;
    }
    
    .section {
        display: block !important;
        page-break-after: always;
    }
    
    a {
        text-decoration: underline;
    }
    
    .btn {
        display: none;
    }
}