:root {
    --primary: #0078d4;
    --primary-light: #2b88d8;
    --primary-dark: #005a9e;
    --primary-glow: rgba(0, 120, 212, 0.25);
    --secondary: #6366f1;
    --accent: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Dark Mode (Default for modern tech look) */
    --bg-main: #0b0f19;
    --bg-surface: #131b2e;
    --bg-surface-elevated: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 120, 212, 0.4);
    
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;

    --sidebar-width: 280px;
    --header-height: 70px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 35px -5px var(--primary-glow);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.9);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 120, 212, 0.4);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #334155;
    --shadow-subtle: 0 10px 30px -5px rgba(0, 0, 0, 0.07);
    --shadow-glow: 0 10px 30px -5px rgba(0, 120, 212, 0.15);
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background aesthetic mesh */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 15% 15%, rgba(0, 120, 212, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

/* Header & Navigation */
.main-header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 100;
    transition: var(--transition);
}

[data-theme="light"] .main-header {
    background: rgba(255, 255, 255, 0.85);
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
}

.brand-icon {
    width: 32px;
    height: 32px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
}

.brand-icon span {
    background: linear-gradient(135deg, #0078d4, #00c853);
    border-radius: 2px;
}
.brand-icon span:nth-child(1) { background: #0078d4; }
.brand-icon span:nth-child(2) { background: #00a4ef; }
.brand-icon span:nth-child(3) { background: #2886de; }
.brand-icon span:nth-child(4) { background: #0078d4; }

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #ffffff, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .brand-title {
    background: linear-gradient(to right, #005a9e, #0284c7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.btn-icon {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.badge-romero {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Progress bar reading */
.progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--accent), #10b981);
    transition: width 0.1s ease-out;
}

/* Layout */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 2.5rem;
    padding: 2rem;
    width: 100%;
}

/* Sidebar Navigation */
.guide-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
    height: calc(100vh - var(--header-height) - 3rem);
    overflow-y: auto;
    padding-right: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: var(--bg-surface-elevated);
    color: var(--text-main);
}

.nav-link.active {
    background: rgba(0, 120, 212, 0.15);
    color: #38bdf8;
    border-left-color: var(--primary);
    font-weight: 600;
}

.nav-step-num {
    background: var(--bg-surface-elevated);
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-light);
}

.nav-link.active .nav-step-num {
    background: var(--primary);
    color: #ffffff;
}

/* Main Content */
.guide-content {
    flex: 1;
    min-width: 0;
    max-width: 900px;
}

/* Hero Section */
.hero-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-subtle), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .hero-card {
    background: linear-gradient(135deg, #ffffff, #f0f7ff);
    border: 1px solid rgba(0, 120, 212, 0.15);
}

.hero-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.hero-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    background: rgba(0, 120, 212, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.hero-pill.success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.2);
}

.hero-pill.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.2);
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

.hero-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.hero-meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-meta-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    font-size: 1.1rem;
}

.hero-meta-text strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-main);
}

.hero-meta-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Sections */
.guide-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    margin-bottom: 2.5rem;
    scroll-margin-top: calc(var(--header-height) + 1.5rem);
    transition: border-color 0.2s ease;
}

.guide-section:hover {
    border-color: var(--border-hover);
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
}

.step-indicator {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
    line-height: 1.3;
}

.section-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Callouts / Alerts */
.callout {
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    font-size: 0.95rem;
    line-height: 1.6;
}

.callout-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.callout.info {
    background: rgba(0, 120, 212, 0.08);
    border: 1px solid rgba(0, 120, 212, 0.25);
    color: var(--text-light);
}
.callout.info .callout-icon { color: var(--accent); }

.callout.warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--text-light);
}
.callout.warning .callout-icon { color: var(--warning); }

.callout.tip {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--text-light);
}
.callout.tip .callout-icon { color: var(--success); }

/* Download Cards Grid */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.download-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.download-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px -5px rgba(0, 120, 212, 0.25);
}

.download-card.featured {
    border-color: var(--primary);
    background: linear-gradient(145deg, var(--bg-surface-elevated), rgba(0, 120, 212, 0.08));
}

.download-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--primary);
    color: #ffffff;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
}

.download-card-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.download-card-icon {
    font-size: 1.75rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 120, 212, 0.12);
    border-radius: var(--radius-sm);
    color: var(--primary-light);
}

.download-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.download-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 120, 212, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 120, 212, 0.45);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(0, 120, 212, 0.1);
    color: var(--primary-light);
}

/* Screenshot Step Showcase */
.step-container {
    margin: 2rem 0;
    padding: 1.75rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.step-num-pill {
    background: var(--primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
}

.step-heading {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
}

.step-body-text {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

.screenshot-wrapper {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #000;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: var(--transition);
}

.screenshot-wrapper:hover {
    border-color: var(--primary);
    transform: scale(1.01);
}

.screenshot-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.screenshot-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: #ffffff;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.zoom-hint {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Interactive Checklist */
.checklist-container {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.checklist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.checklist-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checklist-counter {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-radius: 9999px;
}

.checklist-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.checklist-item:hover {
    background: rgba(0, 120, 212, 0.08);
}

.checklist-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checklist-text strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-main);
}

.checklist-text span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.checklist-item.checked .checklist-text strong {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Boot Keys Interactive Table */
.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.custom-table th {
    background: var(--bg-surface-elevated);
    padding: 0.9rem 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 0.85rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
}

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

.custom-table tr:hover td {
    background: rgba(0, 120, 212, 0.05);
}

.key-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: var(--bg-surface-elevated);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 0 rgba(0,0,0,0.4);
    font-family: monospace;
    font-weight: 700;
    font-size: 0.85rem;
    color: #38bdf8;
}

[data-theme="light"] .key-badge {
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 0 rgba(0,0,0,0.1);
    color: var(--primary-dark);
}

/* Code Snippet & Command Box */
.code-box {
    background: #090d16;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #38bdf8;
}

.copy-btn {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--primary);
    color: #ffffff;
}

/* Accordion FAQ */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.accordion-item {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.accordion-header {
    width: 100%;
    padding: 1.1rem 1.25rem;
    background: transparent;
    border: none;
    text-align: left;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.accordion-header:hover {
    color: var(--primary-light);
}

.accordion-icon {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

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

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1.25rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.accordion-item.active .accordion-content {
    padding-bottom: 1.25rem;
}

/* Image Modal / Lightbox */
.modal-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: 2rem;
}

.modal-lightbox.active {
    display: flex;
    opacity: 1;
}

.modal-content-img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--radius-md);
    box-shadow: 0 15px 50px rgba(0,0,0,0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    object-fit: contain;
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background: var(--danger);
    transform: scale(1.1);
}

/* Footer */
.main-footer {
    margin-top: auto;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Print Styles */
@media print {
    .main-header, .guide-sidebar, .btn, .copy-btn, .btn-icon, .bg-mesh {
        display: none !important;
    }
    .app-container {
        padding: 0;
        max-width: 100%;
    }
    .guide-content {
        max-width: 100%;
    }
    .guide-section, .hero-card {
        border: 1px solid #ccc;
        box-shadow: none;
        page-break-inside: avoid;
    }
    body {
        background: #fff;
        color: #000;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .guide-sidebar {
        display: none;
    }
    .app-container {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 1.6rem;
    }
    .hero-card, .guide-section {
        padding: 1.5rem 1rem;
    }
    .main-header {
        padding: 0 1rem;
    }
}
