/* MeshCore + BitChat Setup Guide - Stylesheet */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --accent: #f59e0b;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --bg-dark: #111827;
    --border: #e5e7eb;
    --code-bg: #1e293b;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1e3a5f 100%);
    color: white;
    padding: 60px 0 40px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 2.5rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.tagline {
    color: #94a3b8;
    font-size: 1.1rem;
    margin-top: 8px;
}

/* Navigation */
nav {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 8px;
    padding: 12px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

nav ul li a {
    display: block;
    padding: 8px 16px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius);
    white-space: nowrap;
    transition: all 0.2s;
}

nav ul li a:hover {
    background: var(--bg-alt);
    color: var(--primary);
}

/* Sections */
.section {
    padding: 60px 0;
}

.alt-bg {
    background: var(--bg-alt);
}

.section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text);
}

/* Overview Diagram */
.overview-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 40px 0;
    padding: 30px;
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
}

.diagram-box {
    text-align: center;
    padding: 20px 30px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 140px;
}

.diagram-box .icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.diagram-box .label {
    font-weight: 600;
    font-size: 0.95rem;
}

.diagram-box .sublabel {
    font-size: 0.8rem;
    color: var(--text-light);
}

.diagram-box.bridge {
    border: 2px solid var(--primary);
}

.diagram-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
}

.diagram-arrow::before {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
}

.diagram-arrow span {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.card code {
    background: var(--bg-alt);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

/* Hardware Grid */
.hardware-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.hardware-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
}

.hardware-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.hardware-item h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.hardware-role {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.hardware-item ul {
    list-style: none;
    text-align: left;
    margin: 15px 0;
}

.hardware-item ul li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-light);
    font-size: 0.9rem;
}

.hardware-item ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--secondary);
    border-radius: 50%;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-small:hover {
    background: var(--border);
}

/* Downloads */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.download-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
}

.download-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.download-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.download-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.download-meta {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.chip {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-alt);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin: 20px 0;
    font-size: 0.9rem;
}

.alert strong {
    display: block;
    margin-bottom: 4px;
}

.alert-info {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

.alert-warning {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.alert ul {
    margin-top: 10px;
    margin-left: 20px;
}

.alert a {
    color: inherit;
}

/* Steps */
.step-intro {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.step {
    display: flex;
    gap: 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.alt-bg .step {
    background: var(--bg);
}

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

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.step-content p {
    color: var(--text-light);
    margin-bottom: 10px;
}

.step-content ol,
.step-content ul {
    margin-left: 20px;
    color: var(--text-light);
}

.step-content li {
    margin: 6px 0;
}

.step-image {
    margin-top: 15px;
}

.placeholder-image {
    background: var(--bg-alt);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Code Blocks */
.code-block {
    background: var(--code-bg);
    border-radius: var(--radius);
    padding: 16px 20px;
    overflow-x: auto;
    margin: 15px 0;
}

.code-block a {
    color: #60a5fa;
    word-break: break-all;
}

.code-block pre {
    margin: 0;
}

.code-block code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
    line-height: 1.7;
}

/* CLI Alternative */
.cli-alternative {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.cli-alternative h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-light);
}

/* Config Tabs */
.config-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.tab-btn {
    padding: 10px 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.alt-bg .tab-btn {
    background: white;
}

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

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

.tab-content {
    display: none;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.alt-bg .tab-content {
    background: var(--bg);
}

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

.tab-content h3 {
    margin-bottom: 10px;
}

.tab-content h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* Frequency Reference Table */
.frequency-reference {
    margin-top: 40px;
}

.frequency-reference h3 {
    margin-bottom: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.alt-bg table {
    background: var(--bg);
}

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

th {
    background: var(--bg-alt);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alt-bg th {
    background: var(--bg);
}

td {
    font-size: 0.9rem;
}

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

/* Test Checklist */
.test-checklist {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
}

.alt-bg .test-checklist {
    background: var(--bg);
}

.test-checklist h3 {
    margin-bottom: 20px;
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.check-item:hover {
    background: var(--bg-alt);
}

.check-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--secondary);
}

.check-item span {
    font-size: 0.95rem;
}

/* Test Commands */
.test-commands {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
}

.alt-bg .test-commands {
    background: var(--bg);
}

.test-commands h3 {
    margin-bottom: 20px;
}

.test-commands h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Troubleshooting */
.troubleshooting {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
}

.alt-bg .troubleshooting {
    background: var(--bg);
}

.troubleshooting h3 {
    margin-bottom: 20px;
}

details {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
}

details:last-child {
    margin-bottom: 0;
}

summary {
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    background: var(--bg-alt);
    border-radius: var(--radius);
    transition: background 0.2s;
}

.alt-bg summary {
    background: white;
}

details[open] summary {
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
}

summary:hover {
    background: var(--border);
}

details ul {
    padding: 16px 20px 16px 36px;
    color: var(--text-light);
    font-size: 0.9rem;
}

details li {
    margin: 6px 0;
}

/* Resources */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.resource-card {
    display: block;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.resource-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.resource-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.resource-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.resource-card p {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Footer */
footer {
    background: var(--bg-dark);
    color: #94a3b8;
    padding: 40px 0;
    text-align: center;
}

footer p {
    font-size: 0.9rem;
    margin: 5px 0;
}

.footer-links a {
    color: #60a5fa;
    text-decoration: none;
}

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

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 40px 0 30px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section h2 {
        font-size: 1.5rem;
    }
    
    .overview-diagram {
        flex-direction: column;
        padding: 20px;
    }
    
    .diagram-arrow {
        transform: rotate(90deg);
        padding: 10px 0;
    }
    
    .step {
        flex-direction: column;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .config-tabs {
        flex-direction: column;
    }
    
    nav ul {
        gap: 4px;
    }
    
    nav ul li a {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Print styles */
@media print {
    nav, footer {
        display: none;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    .btn {
        display: none;
    }
}
