/* Modern Dark Theme - Weber Documentation */

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

:root {
    /* Modern Dark Theme Colors */
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent-color: #06b6d4;
    --accent-light: #22d3ee;
    
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    /* Dark Background Palette */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-elevated: #1e293b;
    
    /* Sidebar Colors */
    --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --sidebar-border: #1e293b;
    --sidebar-hover: #1e293b;
    --sidebar-active: #334155;
    
    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --text-muted: #64748b;
    
    /* Border & Divider */
    --border-color: #334155;
    --border-light: #475569;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    
    /* Glow Effects */
    --glow-primary: 0 0 20px rgba(99, 102, 241, 0.4);
    --glow-accent: 0 0 20px rgba(6, 182, 212, 0.4);
    
    /* Glass Morphism */
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(148, 163, 184, 0.1);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    display: flex;
    min-height: 100vh;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background-color: var(--primary-color);
    color: var(--text-primary);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 0;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.sidebar .logo-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.sidebar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(99, 102, 241, 0.05);
    transition: all var(--transition-base);
}

.sidebar .logo-link:hover .logo {
    background: rgba(99, 102, 241, 0.1);
}

.sidebar .logo .logo-icon {
    width: 42px;
    height: 42px;
    filter: drop-shadow(var(--glow-primary));
    transition: all var(--transition-base);
}

.sidebar .logo-link:hover .logo-icon {
    transform: rotate(360deg) scale(1.15);
    filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.8));
}

.sidebar .logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all var(--transition-base);
}

.sidebar .logo-link:hover h2 {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateX(5px);
}

.sidebar .nav-menu {
    list-style: none;
    padding: 1.5rem 1rem;
}

.sidebar .nav-menu li {
    margin-bottom: 0.5rem;
}

.sidebar .nav-menu a {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.sidebar .nav-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform var(--transition-base);
}

.sidebar .nav-menu a:hover {
    background: var(--sidebar-hover);
    color: var(--text-primary);
    transform: translateX(4px);
}

.sidebar .nav-menu a:hover::before {
    transform: scaleY(1);
}

.sidebar .nav-menu a.active {
    background: var(--sidebar-active);
    color: var(--primary-light);
    box-shadow: var(--glow-primary);
}

.sidebar .nav-menu a.active::before {
    transform: scaleY(1);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    background: var(--bg-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Page Header */
.page-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.page-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ============================================
   GUIDE SECTIONS
   ============================================ */
.guide-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow);
}

.guide-section:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.guide-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.guide-section h2::before {
    content: '';
    width: 4px;
    height: 28px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 2px;
}

.guide-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.guide-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.guide-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.guide-section ul,
.guide-section ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.guide-section li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.guide-section li strong {
    color: var(--text-primary);
}

.guide-section a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
    border-bottom: 1px solid transparent;
}

.guide-section a:hover {
    color: var(--accent-light);
    border-bottom-color: var(--accent-light);
}

/* ============================================
   CODE BLOCKS
   ============================================ */
.code-block {
    margin: 1.5rem 0;
}

.code-block pre {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    overflow-x: auto;
    font-family: 'Fira Code', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    box-shadow: var(--shadow-sm);
}

.code-block code {
    color: var(--text-primary);
    font-family: inherit;
}

/* Inline code */
code {
    background: var(--bg-tertiary);
    color: var(--accent-light);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.9em;
    font-family: 'Fira Code', 'Monaco', 'Courier New', monospace;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ============================================
   FEATURE LISTS & INFO BOXES
   ============================================ */
.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all var(--transition-base);
}

.feature-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--glow-primary);
    transform: translateY(-4px);
}

.feature-item h4 {
    color: var(--primary-light);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.info-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--info-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    backdrop-filter: blur(10px);
}

.warning-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--warning-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    backdrop-filter: blur(10px);
}

.success-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--success-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    backdrop-filter: blur(10px);
}

/* ============================================
   TABLES
   ============================================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

thead {
    background: var(--bg-tertiary);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

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

tr:hover {
    background: var(--bg-tertiary);
}

/* ============================================
   BUTTONS & LINKS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-primary);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary), var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--border-light);
    transform: translateY(-2px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.footer-section p {
    color: var(--text-tertiary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--primary-light);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
    }
    
    .content {
        margin-left: 260px;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-base);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0;
    }
    
    .container {
        padding: 2rem 1rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-description {
        font-size: 1.125rem;
    }
    
    .guide-section {
        padding: 1.5rem;
    }
    
    .guide-section h2 {
        font-size: 1.75rem;
    }
    
    .feature-list {
        grid-template-columns: 1fr;
    }

    /* Prevent horizontal scrolling on small screens */
    html, body {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    /* Ensure content fits horizontally while scaling */
    .content, .container {
        max-width: 100vw;
        box-sizing: border-box;
    }

    /* Avoid oversized elements causing overflow */
    img, .feature-card, .doc-card, pre {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.75rem;
    }
    
    .guide-section h2 {
        font-size: 1.5rem;
    }
    
    .code-block pre {
        padding: 1rem;
        font-size: 0.85rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.gradient-text {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}
