/* Tutorial Styles for MCP Learning Portal */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --code-bg: #f8fafc;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --sidebar-width: 300px;
    --header-height: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.tutorial-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.tutorial-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
}

.tutorial-header h1 {
    font-size: 1.8em;
    font-weight: 600;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.os-toggle {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.os-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.back-link:hover {
    background: var(--bg-tertiary);
}

/* Layout Styles */
.tutorial-layout {
    flex: 1;
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    height: calc(100vh - var(--header-height));
    position: sticky;
    top: var(--header-height);
    overflow-y: auto;
}

.sidebar-content {
    padding: 30px 20px;
}

/* Progress Indicator */
.progress-indicator {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

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

.progress-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Tutorial Sections */
.tutorial-sections {
    space-y: 25px;
}

.section-group {
    margin-bottom: 25px;
}

.section-group h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}

.section-group ul {
    list-style: none;
}

.section-group li {
    margin-bottom: 4px;
}

.nav-link {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

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

/* Main Content */
.tutorial-content {
    flex: 1;
    padding: 30px 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    overflow-y: auto;
    height: calc(100vh - var(--header-height));
}

.content-section {
    display: none;
    max-width: 800px;
}

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

/* Section Header */
.section-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.section-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.section-meta span {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.duration {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.difficulty {
    color: white;
    font-weight: 600;
}

.difficulty.beginner {
    background: var(--success-color);
}

.difficulty.intermediate {
    background: var(--warning-color);
}

.difficulty.advanced {
    background: var(--error-color);
}

/* Content Body */
.content-body {
    line-height: 1.8;
}

.content-body h3 {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 30px 0 15px 0;
}

.content-body h4 {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 10px 0;
}

.content-body h5 {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 15px 0 8px 0;
}

.content-body p {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

/* Intro Highlight */
.intro-highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.intro-highlight h3 {
    color: white;
    margin-bottom: 10px;
}

.intro-highlight p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
}

/* Concept Grid */
.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.concept-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.2s ease;
}

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

.concept-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.concept-card h4 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.concept-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Benefits List */
.benefit-list {
    list-style: none;
    margin: 20px 0;
}

.benefit-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.benefit-list li:last-child {
    border-bottom: none;
}

.benefit-list strong {
    color: var(--text-primary);
}

/* Use Cases */
.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.use-case {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.use-case h4 {
    color: var(--primary-color);
    margin-bottom: 8px;
}

.use-case p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Architecture Diagram */
.architecture-diagram {
    margin: 30px 0;
}

.diagram-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.component {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    text-align: center;
    min-width: 120px;
    box-shadow: var(--shadow-sm);
}

.component h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.component p {
    font-size: 12px;
    color: var(--text-secondary);
}

.arrow {
    font-size: 1.5em;
    color: var(--primary-color);
}

/* Component Details */
.component-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.detail-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.detail-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.detail-card ul {
    margin-left: 20px;
}

.detail-card li {
    margin-bottom: 5px;
    color: var(--text-secondary);
}

/* Flow Steps */
.flow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.step {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

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

.step-content h4 {
    margin-bottom: 5px;
    color: var(--text-primary);
}

.step-content p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Transport Methods */
.transport-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.transport-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.transport-card h4 {
    color: var(--primary-color);
    margin-bottom: 8px;
}

.pros-cons {
    margin-top: 10px;
}

.pros, .cons {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 4px 0;
}

.pros {
    background: #dcfce7;
    color: #166534;
}

.cons {
    background: #fef2f2;
    color: #991b1b;
}

/* OS Selector */
.os-selector {
    margin: 30px 0;
}

.os-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.os-button {
    padding: 12px 24px;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.os-button.active,
.os-button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* OS Content */
.os-content {
    display: none;
}

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

/* Installation Steps */
.step-by-step {
    margin: 30px 0;
}

.install-step {
    margin-bottom: 40px;
    padding: 25px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.install-step .step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.step-header h4 {
    color: var(--text-primary);
    font-size: 1.3em;
    margin: 0;
}

/* Requirements */
.requirement {
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.requirement h5 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.note {
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 8px;
}

/* Code Blocks */
.code-block {
    position: relative;
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 15px 0;
    overflow: hidden;
}

.code-block code {
    display: block;
    padding: 15px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    overflow-x: auto;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.code-block:hover .copy-btn {
    opacity: 1;
}

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

/* Expected Output */
.expected {
    font-size: 14px;
    color: var(--success-color);
    font-weight: 500;
    margin-top: 8px;
}

/* Download Options */
.download-options {
    margin: 20px 0;
}

.download-method {
    margin: 15px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.download-link {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    margin-top: 10px;
    transition: background 0.2s ease;
}

.download-link:hover {
    background: var(--secondary-color);
}

/* Setup Instructions */
.setup-instructions ol {
    margin-left: 20px;
}

.setup-instructions li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* Tool Installation */
.tool-installation {
    margin: 20px 0;
}

.tool {
    margin: 15px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.tool h6 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 600;
}

/* Config Sections */
.config-location,
.config-creation,
.config-template {
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Distro Tabs */
.distro-tabs {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.distro-tab {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.distro-tab.active,
.distro-tab:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.distro-content {
    display: none;
}

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

/* Client Options */
.client-options {
    margin: 20px 0;
}

.client-option {
    margin: 15px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.client-option h5 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Issue Grid */
.issue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.issue-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.issue-card h4 {
    color: var(--error-color);
    margin-bottom: 10px;
}

.issue-card strong {
    color: var(--success-color);
}

/* Next Steps */
.next-steps {
    margin: 40px 0;
    padding: 25px;
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    border-radius: 12px;
    text-align: center;
}

.next-steps h3 {
    color: white;
    margin-bottom: 15px;
}

.next-steps p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.next-button {
    padding: 12px 24px;
    background: white;
    color: var(--success-color);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.next-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Coming Soon */
.coming-soon {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px dashed var(--border-color);
    margin: 40px 0;
}

.coming-soon h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
}

.coming-soon p {
    color: var(--text-secondary);
    font-size: 1.1em;
}

/* Responsive Design */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 280px;
    }
    
    .tutorial-content {
        padding: 20px 30px;
    }
    
    .concept-grid,
    .component-details,
    .transport-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .tutorial-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .sidebar-content {
        padding: 20px;
    }
    
    .tutorial-content {
        padding: 20px;
        height: auto;
    }
    
    .header-content {
        padding: 0 15px;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .tutorial-header h1 {
        font-size: 1.4em;
    }
    
    .section-header h2 {
        font-size: 2em;
    }
    
    .diagram-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .flow-steps,
    .concept-grid,
    .component-details,
    .transport-grid,
    .issue-grid {
        grid-template-columns: 1fr;
    }
    
    .os-buttons {
        flex-direction: column;
    }
    
    .distro-tabs {
        flex-direction: column;
    }
    
    .code-block {
        font-size: 12px;
    }
    
    .copy-btn {
        position: static;
        margin-top: 10px;
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .tutorial-content {
        padding: 15px;
    }
    
    .install-step {
        padding: 15px;
    }
    
    .step-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .concept-card,
    .detail-card,
    .transport-card {
        padding: 15px;
    }
}