:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #f093fb;
    --success: #4facfe;
    --background: #f8f9fa;
    --text-dark: #2d3748;
    --text-light: #718096;
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(240, 147, 251, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-rows: auto 1fr auto;
    min-height: 90vh;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 40px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

header::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -5%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

header h1 {
    font-size: 2.8em;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.15em;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

.sidebar {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 30px 20px;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(102, 126, 234, 0.1) 50%,
        transparent 100%
    );
}

.sidebar h3 {
    color: var(--text-dark);
    margin-bottom: 24px;
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.7;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 8px;
}

.nav-btn {
    width: 100%;
    padding: 14px 16px;
    background: white;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.95em;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-light);
    font-weight: 600;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-btn:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(240, 147, 251, 0.05));
    border-color: rgba(102, 126, 234, 0.2);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    color: var(--text-dark);
}

.nav-btn:hover::before {
    transform: scaleY(1);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-color: transparent;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.nav-btn.active::before {
    transform: scaleY(1);
    background: rgba(255, 255, 255, 0.3);
    width: 100%;
}

.content {
    padding: 40px;
    overflow-y: auto;
}

.section {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.section h2 {
    color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    font-size: 2.2em;
    margin-bottom: 24px;
    padding-bottom: 16px;
    font-weight: 800;
    letter-spacing: -0.5px;
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.section h3 {
    color: var(--text-dark);
    font-size: 1.5em;
    margin-top: 36px;
    margin-bottom: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section h3::before {
    content: '▸';
    color: var(--primary);
    font-size: 0.8em;
}

.section p {
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 16px;
    font-size: 1.05em;
}

.section ul {
    margin-left: 30px;
    margin-bottom: 24px;
}

.section li {
    margin-bottom: 12px;
    line-height: 1.7;
    color: var(--text-dark);
    position: relative;
    padding-left: 8px;
}

.section li::marker {
    color: var(--primary);
}

.code-block {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: #e2e8f0;
    padding: 24px;
    border-radius: var(--radius-md);
    margin: 24px 0;
    overflow-x: auto;
    position: relative;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 12px 0 0 12px;
}

.code-block pre {
    margin: 0;
    font-family: 'SF Mono', 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.92em;
    line-height: 1.7;
}

.code-label {
    position: absolute;
    top: 8px;
    right: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75em;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.interactive-example {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03), rgba(240, 147, 251, 0.03));
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 28px 0;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.interactive-example::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-md);
    z-index: -1;
}

.interactive-example h4 {
    color: var(--primary);
    margin-bottom: 16px;
    font-size: 1.2em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.interactive-example h4::before {
    content: '▶';
    font-size: 0.7em;
}

.try-it-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1em;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.try-it-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.try-it-btn:hover::before {
    width: 300px;
    height: 300px;
}

.try-it-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
}

.try-it-btn:active {
    transform: translateY(-1px);
}

.output {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 16px;
    min-height: 60px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.95em;
    line-height: 1.6;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
}

.highlight-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(240, 147, 251, 0.08));
    border-left: 4px solid var(--primary);
    padding: 18px 24px;
    margin: 24px 0;
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.highlight-box::before {
    content: '💡';
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 1.5em;
    opacity: 0.3;
}

.highlight-box strong {
    color: var(--primary);
    font-weight: 700;
}

.progress-bar {
    grid-column: 1 / -1;
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 24px 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.comparison-table th,
.comparison-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.comparison-table th {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.comparison-table tr:nth-child(even) {
    background: rgba(102, 126, 234, 0.03);
}

.comparison-table tr:hover {
    background: rgba(102, 126, 234, 0.08);
    transition: background 0.2s ease;
}

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

/* Smooth scrolling */
.content {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
.content::-webkit-scrollbar {
    width: 10px;
}

.content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 5px;
}

.content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary), var(--accent));
}

/* Add subtle entrance animation to list items */
.section li {
    animation: slideInLeft 0.4s ease-out backwards;
}

.section li:nth-child(1) { animation-delay: 0.1s; }
.section li:nth-child(2) { animation-delay: 0.15s; }
.section li:nth-child(3) { animation-delay: 0.2s; }
.section li:nth-child(4) { animation-delay: 0.25s; }
.section li:nth-child(5) { animation-delay: 0.3s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr auto;
    }

    .sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        padding: 20px;
    }

    .nav-btn:hover {
        transform: translateX(2px);
    }

    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .subtitle {
        font-size: 1em;
    }

    .content {
        padding: 24px;
    }

    .section h2 {
        font-size: 1.8em;
    }

    .section h3 {
        font-size: 1.3em;
    }
}
