@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* Color Variables & Styling Tokens */
:root {
    --primary: #6366f1;
    --primary-light: #e0e7ff;
    --primary-dark: #4338ca;
    
    --success: #10b981;
    --success-light: #d1fae5;
    --success-dark: #065f46;
    
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-dark: #92400e;
    
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --danger-dark: #991b1b;
    
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-code: #0b0f19;
    --border-color: #f1f5f9;
    --border-dark: #e2e8f0;
    
    --text-main: #1e293b;
    --text-muted: #475569;
    --text-light: #64748b;
    
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --sidebar-width: 320px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.04), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 2rem 1.5rem;
    box-shadow: 4px 0 25px rgba(15, 23, 42, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-icon {
    font-size: 2.5rem;
    color: var(--success);
    font-weight: bold;
    background: linear-gradient(135deg, #34d399, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.nav-title {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #475569;
    letter-spacing: 0.08em;
    margin: 1.75rem 0 0.5rem 0.75rem;
}

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--sidebar-text-active);
    background-color: var(--sidebar-hover);
}

.nav-link.active {
    color: var(--sidebar-text-active);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-link .material-symbols-outlined {
    font-size: 1.25rem;
}

/* Content Area Styling */
.content-wrapper {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    min-width: 0;
    padding: 4rem 6rem;
    max-width: 1300px;
}

.doc-section {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 3.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

/* Decorative Card Gradients */
.doc-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--success));
}

/* Typography Redesign */
h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    color: var(--sidebar-bg);
    line-height: 1.15;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 850;
    color: var(--sidebar-bg);
    margin-bottom: 1.75rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--sidebar-bg);
    margin-top: 2.25rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
}

a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1.5px dashed var(--primary-light);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
    text-decoration: none;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary { background-color: var(--primary-light); color: var(--primary-dark); }
.badge-success { background-color: var(--success-light); color: var(--success-dark); }
.badge-warning { background-color: var(--warning-light); color: var(--warning-dark); }
.badge-danger { background-color: var(--danger-light); color: var(--danger-dark); }

/* Feature Cards Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.75rem;
    background-color: var(--bg-main);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
    background-color: var(--bg-surface);
}

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

.feature-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 0.5rem;
    font-size: 1.35rem;
}

.feature-card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 750;
    color: var(--sidebar-bg);
}

.feature-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Step Items */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.75rem;
    transition: var(--transition);
}

.step-item:hover {
    border-color: var(--border-dark);
    background-color: var(--bg-surface);
    box-shadow: var(--shadow-md);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    border-radius: 9999px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
    flex-shrink: 0;
}

.step-details {
    flex-grow: 1;
}

.step-details h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 750;
    color: var(--sidebar-bg);
    margin-bottom: 0.5rem;
}

.step-details p:last-child {
    margin-bottom: 0;
}

/* Bullet Lists & Number Lists */
ul, ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Alert/Info Panels */
.alert {
    padding: 1.25rem 1.75rem;
    border-left: 5px solid;
    border-radius: 0.75rem;
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
}

.alert-icon {
    font-size: 1.5rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.alert-content {
    flex-grow: 1;
}

.alert-content p:last-child {
    margin-bottom: 0;
}

.alert-info {
    background-color: #f0f9ff;
    border-color: #0284c7;
    color: #0369a1;
}
.alert-info .alert-icon { color: #0284c7; }

.alert-warning {
    background-color: #fffbeb;
    border-color: #d97706;
    color: #92400e;
}
.alert-warning .alert-icon { color: #d97706; }

.alert-danger {
    background-color: #fef2f2;
    border-color: #dc2626;
    color: #991b1b;
}
.alert-danger .alert-icon { color: #dc2626; }

.alert-success {
    background-color: #f0fdf4;
    border-color: #16a34a;
    color: #166534;
}
.alert-success .alert-icon { color: #16a34a; }

/* Responsive Table Design */
.table-responsive {
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--border-dark);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-surface);
}

th, td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--bg-main);
    font-family: var(--font-heading);
    font-weight: 750;
    color: var(--sidebar-bg);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

tbody tr:hover {
    background-color: #f8fafc;
}

/* Premium Code Blocks with macOS Window Controls */
code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background-color: #f1f5f9;
    color: #be123c;
    padding: 0.2rem 0.4rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

pre {
    background-color: var(--bg-code);
    color: #cbd5e1;
    padding: 1.75rem 2rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    border: none;
    font-size: 0.875rem;
    line-height: 1.6;
    font-weight: 400;
}

/* macOS Window Control simulation */
.code-window-header {
    background-color: #181d28;
    padding: 0.75rem 1.25rem;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: -1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 10;
}

.mac-controls {
    display: flex;
    gap: 0.35rem;
}

.mac-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.mac-dot.close { background-color: #ff5f56; }
.mac-dot.minimize { background-color: #ffbd2e; }
.mac-dot.zoom { background-color: #27c93f; }

.window-title {
    color: #64748b;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
}

.code-window-header + pre {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Print Styling */
@media print {
    .sidebar { display: none; }
    .content-wrapper { margin-left: 0; padding: 0; }
    .doc-section { border: none; box-shadow: none; padding: 0; margin-bottom: 3rem; }
}

/* Responsive Media Queries */
@media (max-width: 1200px) {
    .content-wrapper {
        padding: 3rem 4rem;
    }
}

@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: sticky;
        top: 0;
        bottom: auto;
        left: auto;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 1.25rem 1.5rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }
    
    .brand {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .nav-title {
        display: none;
    }
    
    .nav-menu {
        flex-direction: row !important;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        gap: 0.5rem;
        padding-bottom: 0.5rem;
        margin-bottom: -0.25rem;
    }
    
    .nav-menu::-webkit-scrollbar {
        height: 4px;
    }
    
    .nav-menu::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 99px;
    }
    
    .nav-link {
        flex-shrink: 0;
        padding: 0.5rem 0.85rem;
        font-size: 0.85rem;
    }
    
    .content-wrapper {
        margin-left: 0;
        padding: 3rem 2.5rem;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 2rem 1.5rem;
    }
    
    .doc-section {
        padding: 2rem 1.5rem;
        border-radius: 1rem;
    }
    
    .step-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .step-number {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.15rem;
    }
    
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.65rem;
        margin-bottom: 1.25rem;
    }
    
    h3 {
        margin-top: 1.75rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

@media (max-width: 480px) {
    .sidebar {
        padding: 1rem 1rem 0.75rem 1rem;
    }
    
    .brand {
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .brand-icon {
        font-size: 2rem;
    }
    
    .brand-text {
        font-size: 1.15rem;
    }
    
    .content-wrapper {
        padding: 1.5rem 1rem;
    }
    
    .doc-section {
        padding: 1.5rem 1rem;
        border-radius: 0.75rem;
        margin-bottom: 2rem;
    }
    
    h1 {
        font-size: 1.85rem;
    }
    
    h2 {
        font-size: 1.4rem;
        flex-wrap: wrap;
    }
    
    pre {
        padding: 1rem 1.25rem;
        margin: 1rem 0 1.5rem 0;
        border-radius: 0.5rem;
    }
    
    pre code {
        font-size: 0.8rem;
    }
    
    .code-window-header {
        border-top-left-radius: 0.5rem;
        border-top-right-radius: 0.5rem;
        padding: 0.6rem 1rem;
    }
    
    th, td {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
    
    code {
        word-break: break-all;
    }
}

