/* File path: docs/docs-assets/style.css */
:root {
    --bg: #060b14;
    --panel: rgba(13, 20, 34, 0.78);
    --panel-strong: rgba(16, 25, 42, 0.92);
    --panel-soft: rgba(10, 18, 32, 0.64);
    --line: rgba(70, 142, 255, 0.22);
    --line-strong: rgba(58, 170, 255, 0.72);
    --cyan: #00e5ff;
    --blue: #2f8cff;
    --green: #5cff75;
    --purple: #a66cff;
    --pink: #ff4fc7;
    --orange: #ffae34;
    --red: #ff4d7a;
    --text: #eaf6ff;
    --muted: #8ba4bd;
    --dim: #5f7187;
    --sidebar-width: 260px;
}

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

html, body {
    height: 100%;
    width: 100%;
    background-color: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    overflow: hidden;
}

/* Lưới nền mờ ảo Grid lines */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 85%);
    z-index: 1;
}

/* Radial Gradients Phát sáng ảo diệu */
body {
    background:
        radial-gradient(circle at 10% 0%, rgba(0, 229, 255, 0.1), transparent 30%),
        radial-gradient(circle at 90% 15%, rgba(166, 108, 255, 0.12), transparent 35%),
        linear-gradient(180deg, #071522 0%, var(--bg) 55%, #050914 100%);
    display: flex;
}

/* --- Layout chính --- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(8, 14, 26, 0.85);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    z-index: 10;
    backdrop-filter: blur(16px);
}

.logo-section {
    padding: 24px;
    border-bottom: 1px solid rgba(0, 229, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 28px;
    height: 28px;
    fill: var(--cyan);
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.5));
}

.logo-text {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    background: linear-gradient(90deg, #fff, var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu-toggle {
    display: none;
}

.menu-list {
    list-style: none;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow-y: auto;
}

.menu-item {
    display: block;
    flex-shrink: 0;
}

.menu-item button {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.menu-item button:hover {
    color: var(--cyan);
    background: rgba(0, 229, 255, 0.05);
    border-color: rgba(0, 229, 255, 0.1);
}

.menu-item.active button {
    color: #fff;
    background: rgba(47, 140, 255, 0.15);
    border-color: rgba(47, 140, 255, 0.35);
    box-shadow: 0 0 16px rgba(47, 140, 255, 0.15);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.github-link:hover {
    color: #fff;
    border-color: var(--cyan);
    background: rgba(0, 229, 255, 0.05);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

/* --- Vùng Nội dung chính --- */
.content-container {
    flex: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 5;
    overflow: hidden;
}

.app-header {
    padding: 16px 32px;
    border-bottom: 1px solid var(--line);
    background: rgba(6, 11, 20, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title h1 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.header-widgets {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-bar {
    position: relative;
}

.search-bar input {
    background: rgba(8, 14, 26, 0.6);
    border: 1px solid var(--line);
    padding: 8px 14px 8px 32px;
    border-radius: 20px;
    color: #fff;
    width: 220px;
    font-size: 12px;
    outline: none;
    transition: all 0.25s ease;
}

.search-bar input:focus {
    width: 280px;
    border-color: var(--cyan);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
    background: rgba(8, 14, 26, 0.95);
}

.search-bar svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    fill: var(--muted);
    pointer-events: none;
}


/* --- Tabs --- */
.tab-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    display: none;
    animation: fadeIn 0.25s ease-out;
}

.tab-content.active {
    display: block;
}

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

/* --- Trang Tổng Quan (Overview) --- */
.welcome-card {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.welcome-card h2 {
    color: #fff;
    margin-bottom: 10px;
}

.diagram-container {
    background: var(--panel-soft);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 32px;
}

.diagram-container svg {
    max-width: 100%;
    height: auto;
}

/* --- Trang Hướng Dẫn Workflow (Workflows) --- */
.flow-tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
}

.flow-tab-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.flow-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.flow-tab-btn.active {
    color: var(--cyan);
    background: rgba(0, 229, 255, 0.08);
}

.flow-steps-timeline {
    position: relative;
    padding-left: 32px;
    margin-top: 20px;
}

.flow-steps-timeline::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: rgba(70, 142, 255, 0.15);
}

.timeline-step {
    position: relative;
    margin-bottom: 32px;
}

.step-number {
    position: absolute;
    left: -32px;
    top: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--blue);
    color: var(--cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    box-shadow: 0 0 10px rgba(47, 140, 255, 0.3);
}

.timeline-step.active .step-number {
    border-color: var(--cyan);
    background: var(--cyan);
    color: var(--bg);
    box-shadow: 0 0 14px var(--cyan);
}

.step-card-detail {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(8px);
}

.step-card-detail h3 {
    color: #fff;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.step-card-detail p {
    color: var(--muted);
    margin-bottom: 12px;
}

/* --- Code Blocks --- */
.code-wrapper {
    position: relative;
    background: #02060c;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
}

.code-header-bar {
    background: rgba(255,255,255,0.02);
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-lang {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--dim);
}

.copy-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    color: #fff;
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.3);
}

pre {
    padding: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    color: #a5d6ff;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

pre::-webkit-scrollbar {
    height: 4px;
    width: 4px;
}

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

pre::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.2);
    border-radius: 2px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: var(--cyan);
}

/* --- Thư Mục Skills (Catalog) --- */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.filter-btn {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 14px;
    border-radius: 20px;
    color: var(--muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
}

.filter-btn.active {
    color: #fff;
    background: rgba(47, 140, 255, 0.2);
    border-color: var(--blue);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.skill-card {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 229, 255, 0.5);
    box-shadow: 0 8px 24px rgba(0, 229, 255, 0.15);
}

.skill-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.skill-badge {
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.25);
    color: var(--cyan);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
}

.skill-card h3 {
    font-size: 15px;
    color: #fff;
    margin-bottom: 8px;
}

.skill-desc {
    color: var(--muted);
    font-size: 12px;
    flex: 1;
    margin-bottom: 14px;
}

.skill-metadata {
    font-size: 11px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
}

.meta-label {
    color: var(--dim);
}

.meta-value {
    color: var(--text);
    font-weight: 500;
}

/* --- Vận hành Runtime --- */
.runtime-section {
    margin-bottom: 32px;
}

.runtime-section h2 {
    color: #fff;
    margin-bottom: 12px;
    font-size: 16px;
    border-left: 3px solid var(--blue);
    padding-left: 10px;
}

.runtime-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.runtime-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(8px);
}

.runtime-card h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 14px;
}

.runtime-card p {
    color: var(--muted);
    margin-bottom: 12px;
}

/* --- Giả Lập Simulator --- */
.simulator-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    height: calc(100vh - 180px);
}

.simulator-controls {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.simulator-controls h2 {
    color: #fff;
    font-size: 15px;
}

.sim-select-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sim-select-group label {
    font-weight: 600;
    color: var(--muted);
}

.sim-select-group select {
    background: #02060c;
    border: 1px solid var(--line);
    padding: 10px;
    border-radius: 6px;
    color: #fff;
    outline: none;
    cursor: pointer;
}

.sim-btn-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.sim-btn {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.sim-btn-primary {
    background: var(--cyan);
    color: var(--bg);
}

.sim-btn-primary:hover {
    box-shadow: 0 0 14px var(--cyan);
    transform: translateY(-2px);
}

.sim-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sim-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.simulator-terminal {
    background: #02060c;
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 10px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 8px 32px rgba(0, 229, 255, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.terminal-header {
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.term-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.term-dot-red { background: var(--red); }
.term-dot-yellow { background: var(--orange); }
.term-dot-green { background: var(--green); }

.term-title {
    font-family: ui-monospace, monospace;
    font-size: 11px;
    color: var(--dim);
    margin-left: 8px;
}

.terminal-body {
    flex: 1;
    padding: 20px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    color: #eaf6ff;
    overflow-y: auto;
    white-space: pre-wrap;
}

.terminal-prompt {
    color: var(--cyan);
}

.terminal-cmd {
    color: #fff;
    font-weight: 700;
}

.terminal-output {
    color: var(--muted);
    margin-top: 4px;
    margin-bottom: 12px;
}

.terminal-success {
    color: var(--green);
}

.terminal-warn {
    color: var(--orange);
}

.terminal-error {
    color: var(--red);
}

/* Tùy chỉnh Neon Scrollbar toàn cục giống bên Extension */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.25);
    border-radius: 3px;
}

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

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

/* Tablet & Smaller Screens (max-width: 992px) */
@media (max-width: 992px) {
    .simulator-layout {
        display: flex;
        flex-direction: column;
        height: auto;
        gap: 20px;
    }
    
    .simulator-terminal {
        order: 1;
        max-height: 400px;
        height: 400px;
    }
    
    .simulator-controls {
        order: 2;
        height: auto;
    }
}

/* Mobile Screens (max-width: 768px) */
@media (max-width: 768px) {
    html, body {
        overflow: auto !important;
        height: auto !important;
    }
    
    .sidebar {
        width: 100%;
        height: 53px;
        border-right: none;
        border-bottom: 1px solid var(--line);
        position: fixed;
        top: 0;
        left: 0;
        background: rgba(8, 14, 26, 0.95);
        z-index: 100;
        overflow: visible;
    }
    
    .logo-section {
        padding: 12px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .menu-toggle {
        display: block;
        background: transparent;
        border: none;
        color: #fff;
        font-size: 20px;
        cursor: pointer;
        padding: 4px 8px;
        outline: none;
        transition: color 0.2s ease;
    }
    
    .menu-toggle:hover {
        color: var(--cyan);
    }
    
    .menu-list {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(8, 14, 26, 0.98);
        border-bottom: 1px solid var(--line);
        padding: 12px;
        gap: 6px;
        position: absolute;
        top: 53px;
        left: 0;
        z-index: 99;
        box-shadow: 0 8px 16px rgba(0,0,0,0.5);
    }
    
    .menu-list.show {
        display: flex;
    }
    
    .menu-item button {
        padding: 10px 14px;
        width: 100%;
        white-space: nowrap;
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .content-container {
        width: 100%;
        height: auto !important;
        overflow: visible !important;
        padding-top: 53px;
    }
    
    .app-header {
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .header-widgets {
        width: 100%;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .search-bar input {
        width: 100%;
    }
    
    .search-bar input:focus {
        width: 100%;
    }
    
    .tab-content {
        padding: 20px 16px;
        overflow: visible !important;
        height: auto !important;
    }
    
    .welcome-card {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .diagram-container {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .flow-tabs-nav {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        border-bottom: none !important;
        padding-bottom: 0 !important;
        overflow: visible !important;
        width: 100%;
    }
    
    .flow-tabs-nav::-webkit-scrollbar {
        display: none;
    }
    
    .flow-tab-btn {
        flex: 1 1 calc(50% - 8px) !important;
        white-space: normal !important;
        font-size: 11px !important;
        padding: 6px 10px !important;
        text-align: center;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .runtime-card-grid {
        grid-template-columns: 1fr;
    }
}
