:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --success: #48bb78;
    --dark: #1a202c;
    --light: #f7fafc;
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-300: #e2e8f0;
    --gray-600: #718096;
    --gray-800: #2d3748;
    --sidebar-width: 280px;
    --toc-width: 220px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: var(--light);
}

/* Top Navigation */
.top-nav {
    background: white;
    border-bottom: 1px solid var(--gray-300);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.top-nav .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo {
    height: 32px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* Docs Container */
.docs-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--gray-300);
    height: calc(100vh - 65px);
    position: sticky;
    top: 65px;
    overflow-y: auto;
}

.sidebar-content {
    padding: 2rem 1rem;
}

.search-box {
    position: relative;
    margin-bottom: 2rem;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-600);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
    margin-bottom: 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    color: var(--gray-800);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}

.nav-link i {
    width: 20px;
    text-align: center;
    color: var(--gray-600);
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.nav-link:hover i {
    color: var(--primary);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
}

.nav-link.active i {
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    min-height: calc(100vh - 65px);
}

.content-wrapper {
    flex: 1;
    padding: 3rem;
    max-width: 900px;
}

/* Hero */
.hero {
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-background-clip: text;
    -moz-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
}

/* Quick Links */
.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.quick-link {
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
}

.quick-link:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.quick-link-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.quick-link-icon i {
    font-size: 1.5rem;
    color: white;
}

.quick-link h3 {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.quick-link p {
    font-size: 0.9rem;
    color: var(--gray-600);
}

/* Doc Sections */
.doc-section {
    margin-bottom: 3rem;
}

.doc-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
}

.doc-section p {
    color: var(--gray-800);
    margin-bottom: 1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-card {
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: 10px;
}

.feature-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--gray-600);
}

/* Code Examples */
.code-example {
    background: var(--gray-800);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--gray-900);
    border-bottom: 1px solid #4a5568;
}

.code-header span {
    color: var(--gray-300);
    font-size: 0.85rem;
    font-weight: 600;
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--gray-600);
    color: var(--gray-300);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

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

.code-example pre {
    margin: 0;
    padding: 1.25rem;
    overflow-x: auto;
}

.code-example code {
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Doc Footer */
.doc-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-300);
}

.footer-nav {
    display: flex;
    justify-content: space-between;
}

.footer-nav-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    padding: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    transition: all 0.2s;
}

.footer-nav-link:hover {
    border-color: var(--primary);
    background: var(--gray-100);
}

.footer-nav-link span {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.footer-nav-link strong {
    color: var(--dark);
}

.footer-nav-link.next {
    margin-left: auto;
    text-align: right;
}

/* Table of Contents */
.toc {
    width: var(--toc-width);
    padding: 3rem 1.5rem;
    position: sticky;
    top: 65px;
    height: calc(100vh - 65px);
    overflow-y: auto;
}

.toc h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-600);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toc nav a {
    display: block;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    border-left: 2px solid transparent;
    padding-left: 1rem;
    transition: all 0.2s;
}

.toc nav a:hover,
.toc nav a.active {
    color: var(--primary);
    border-left-color: var(--primary);
}

/* Workflow Diagram */
.workflow-diagram {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 2rem;
    background: var(--gray-100);
    border-radius: 12px;
    overflow-x: auto;
}

.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 150px;
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.step-content h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.step-content p {
    font-size: 0.85rem;
    color: var(--gray-600);
    text-align: center;
}

.workflow-arrow {
    font-size: 2rem;
    color: var(--gray-400);
    margin: 0 1rem;
}

/* Step Lists */
.step-list {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
}

.step-list li {
    counter-increment: step-counter;
    margin-bottom: 2rem;
    position: relative;
    padding-left: 4rem;
}

.step-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.step-list li strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.step-list li p {
    color: var(--gray-600);
    margin: 0;
}

/* Requirements List */
.requirements-list {
    list-style: none;
    padding: 0;
}

.requirements-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.requirements-list li i {
    color: var(--success);
    margin-right: 0.75rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.alert i {
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.alert-info {
    background: #ebf8ff;
    border-left: 4px solid #4299e1;
    color: #2c5282;
}

.alert-success {
    background: #f0fff4;
    border-left: 4px solid #48bb78;
    color: #22543d;
}

.alert-warning {
    background: #fffaf0;
    border-left: 4px solid #ed8936;
    color: #7c2d12;
}

.alert strong {
    display: block;
    margin-bottom: 0.25rem;
}

.alert a {
    color: inherit;
    text-decoration: underline;
}

/* Practice Items */
.practice-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: 10px;
}

.practice-item h3 {
    color: var(--success);
    margin-bottom: 1rem;
}

.practice-item h3 i {
    margin-right: 0.5rem;
}

.practice-item ul {
    margin-top: 1rem;
}

/* Troubleshooting Items */
.troubleshooting-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fff5f5;
    border-left: 4px solid #fc8181;
    border-radius: 8px;
}

.troubleshooting-item strong {
    display: block;
    color: #c53030;
    margin-bottom: 0.75rem;
}

.troubleshooting-item ul {
    margin-top: 0.75rem;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--gray-600);
    text-decoration: none;
}

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

.breadcrumb span {
    color: var(--dark);
}

/* Lead Text */
.lead {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

/* Command Cards */
.command-card {
    background: var(--gray-100);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.command-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.command-card h3 code {
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.command-card p {
    margin-bottom: 1rem;
    color: var(--gray-600);
}

.command-card .code-example {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .workflow-diagram {
        flex-direction: column;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .toc {
        display: none;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .content-wrapper {
        padding: 2rem 1rem;
    }
    
    .quick-links,
    .features-grid {
        grid-template-columns: 1fr;
    }
}