:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --light-bg: #f8f9fa;
    --light-text: #212529;
    --light-card: #ffffff;
    --light-border: #e9ecef;
    --dark-bg: #121826;
    --dark-text: #f8f9fa;
    --dark-card: #1e293b;
    --dark-border: #334155;
    --transition: all 0.3s ease;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 10px;
}

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

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

body.dark-theme {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    padding: 20px 0;
    border-bottom: 1px solid var(--light-border);
    background-color: var(--light-card);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body.dark-theme header {
    background-color: var(--dark-card);
    border-bottom: 1px solid var(--dark-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon {
    font-size: 28px;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    color: var(--light-text);
    transition: var(--transition);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-theme .theme-toggle {
    color: var(--dark-text);
}

.theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

body.dark-theme .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Main content */
main {
    display: flex;
    gap: 30px;
    padding: 40px 0;
    min-height: calc(100vh - 100px);
}

/* Sidebar navigation */
.sidebar {
    flex: 0 0 280px;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.nav-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    margin-bottom: 15px;
    padding-left: 10px;
}

body.dark-theme .nav-title {
    color: #94a3b8;
}

.nav-menu {
    list-style: none;
    background-color: var(--light-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

body.dark-theme .nav-menu {
    background-color: var(--dark-card);
}

.nav-item {
    margin-bottom: 8px;
}

.nav-item:last-child {
    margin-bottom: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--light-text);
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
}

body.dark-theme .nav-link {
    color: var(--dark-text);
}

.nav-link:hover {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}

body.dark-theme .nav-link:hover {
    background-color: rgba(67, 97, 238, 0.2);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.nav-link i {
    font-size: 18px;
    width: 24px;
}

/* Content area */
.content {
    flex: 1;
}

.content-section {
    display: none;
    background-color: var(--light-card);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

body.dark-theme .content-section {
    background-color: var(--dark-card);
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-subtitle {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 25px;
    font-weight: 400;
}

body.dark-theme .section-subtitle {
    color: #94a3b8;
}

.instruction-step {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--light-border);
}

body.dark-theme .instruction-step {
    border-bottom: 1px solid var(--dark-border);
}

.instruction-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--secondary-color);
}

body.dark-theme .step-title {
    color: #7c3aed;
}

.step-content {
    line-height: 1.7;
    color: var(--light-text);
}

body.dark-theme .step-content {
    color: #cbd5e1;
}

.step-content p {
    margin-bottom: 10px;
}

.step-content ul, .step-content ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.step-content li {
    margin-bottom: 8px;
}

.code-block {
    background-color: #f1f5f9;
    padding: 16px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    margin: 15px 0;
    overflow-x: auto;
    border-left: 4px solid var(--primary-color);
}

body.dark-theme .code-block {
    background-color: #0f172a;
    color: #e2e8f0;
}

.note {
    background-color: #e0f2fe;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #0284c7;
    margin: 15px 0;
}

body.dark-theme .note {
    background-color: rgba(2, 132, 199, 0.2);
}

.warning {
    background-color: #fef3c7;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #d97706;
    margin: 15px 0;
}

body.dark-theme .warning {
    background-color: rgba(217, 119, 6, 0.2);
}

.success {
    background-color: #d1fae5;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #059669;
    margin: 15px 0;
}

body.dark-theme .success {
    background-color: rgba(5, 150, 105, 0.2);
}

.tip {
    background-color: #f3e8ff;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #7c3aed;
    margin: 15px 0;
}

body.dark-theme .tip {
    background-color: rgba(124, 58, 237, 0.2);
}

.command {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    display: inline-block;
    margin: 5px 0;
}

body.dark-theme .command {
    background-color: #0f172a;
}

.important {
    font-weight: 600;
    color: var(--primary-color);
}

body.dark-theme .important {
    color: #60a5fa;
}

.model-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.model-item {
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

body.dark-theme .model-item {
    background-color: rgba(67, 97, 238, 0.1);
}

.gallery-placeholder {
    background-color: #e9ecef;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
    border: 2px dashed #adb5bd;
}

body.dark-theme .gallery-placeholder {
    background-color: #2d3748;
    border-color: #4a5568;
}

.gallery-placeholder i {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 15px;
}

body.dark-theme .gallery-placeholder i {
    color: #94a3b8;
}

.download-link {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    margin: 10px 5px;
    transition: var(--transition);
}

.download-link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Footer */
footer {
    text-align: center;
    padding: 25px 0;
    border-top: 1px solid var(--light-border);
    color: #6c757d;
    font-size: 14px;
    background-color: var(--light-card);
}

body.dark-theme footer {
    border-top: 1px solid var(--dark-border);
    color: #94a3b8;
    background-color: var(--dark-card);
}

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

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 992px) {
    main {
        flex-direction: column;
    }
    
    .sidebar {
        flex: 0 0 auto;
        width: 100%;
        position: static;
    }
    
    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .nav-item {
        flex: 1;
        min-width: 200px;
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-item {
        min-width: 100%;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .model-list {
        grid-template-columns: 1fr;
    }
}