:root {
    /* Colors */
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --bg-color: #ffffff;
    --bg-alt: #f8f9fa;
    --text-color: #333333;
    --text-muted: #6c757d;
    --card-bg: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    
    /* Layout */
    --container-width: 1100px;
    --border-radius: 12px;
    
    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-alt);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Breadcrumb */
.header {
    background-color: #fff;
    box-shadow: var(--shadow);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-back {
    background: #000;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-api {
    background: var(--primary-color);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Side API Panel for Navigator */
.api-panel {
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    width: 420px;
    background: #fff;
    box-shadow: -4px 0 12px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform .3s;
    z-index: 2000;
}
.api-panel[aria-hidden="false"] { transform: translateX(0); }
.api-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
}
.api-panel__controls {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}
.api-panel__controls input, .api-panel__controls select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.api-panel__body {
    position: relative;
    padding: 16px;
    height: calc(100% - 116px);
    overflow: auto;
}
.api-panel__table { width: 100%; border-collapse: collapse; }
.api-panel__table th, .api-panel__table td {
    text-align: left; padding: 10px; border-bottom: 1px solid #eee; color: #212529;
}
.api-panel__fade {
    pointer-events: none; position: absolute; right: 0; top: 0; height: 100%; width: 24px;
    background: linear-gradient(to left, #fff, rgba(255,255,255,0));
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-accent {
    color: var(--primary-color);
}

.breadcrumb ol {
    display: flex;
    list-style: none;
    gap: 10px;
    font-size: 0.9rem;
}

.breadcrumb li a {
    text-decoration: none;
    color: var(--primary-color);
}

.breadcrumb li.active {
    color: var(--text-muted);
}

/* Page Titles */
.page-title {
    text-align: center;
    margin: 40px 0;
    font-size: 2rem;
    color: var(--text-color);
}

/* Block Grid & Cards */
.block-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.block-card {
    background: var(--card-bg);
    padding: 35px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
}

.block-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.block-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.block-card h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.block-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Block View Content Styles */
.hidden {
    display: none;
}

.block-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 32px;
    align-items: start;
}

.block-header {
    background: #fff;
    padding: 40px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.block-header h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.theory-box {
    background: #fff;
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    border-left: 5px solid var(--primary-color);
    box-shadow: var(--shadow);
}

.theory-box h2 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.example-section {
    margin-bottom: 40px;
}

.example-card {
    background: #fff;
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.example-card h3 {
    margin-bottom: 15px;
    font-size: 1.25rem;
}

.example-card p {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.qa-section {
    background: #e9ecef;
    padding: 35px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.qa-section h2 {
    margin-bottom: 20px;
}

.qa-list {
    list-style: none;
}

.qa-item {
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid #adb5bd;
}

.task-box {
    background: #d4edda;
    color: #155724;
    padding: 35px;
    border-radius: var(--border-radius);
    margin-bottom: 60px;
    border: 1px solid #c3e6cb;
}

.task-box h2 {
    margin-bottom: 15px;
}

.criteria-list {
    margin-top: 20px;
    padding-left: 20px;
}

.side-panel {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    position: sticky;
    top: 90px;
}

.side-panel h3 {
    margin-bottom: 15px;
}

.side-list {
    list-style: none;
    display: block;
    padding: 0;
}
.side-list li {
    margin-bottom: 16px;
}
.side-list a {
    color: #212529;
    text-decoration: none;
    display: block;
    width: 100%;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.side-list a:hover {
    text-decoration: underline;
}

.side-list .quick-card {
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border-radius: 6px;
    padding: 16px 20px;
    display: block;
    width: 100%;
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.side-list .quick-card:hover {
    background: #f1f3f5;
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}


/* Prism Overrides */
pre[class*="language-"] {
    border-radius: 8px !important;
    margin: 15px 0 !important;
}

code[class*="language-"] {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

/* Breadcrumb Animation */
#current-breadcrumb {
    transition: opacity 0.3s ease;
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
    .header .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .page-title {
        font-size: 1.6rem;
    }
    
    .block-header h1 {
        font-size: 1.8rem;
    }

    .block-layout {
        grid-template-columns: 1fr;
    }
    .side-panel {
        position: static;
    }
}
