:root {
    --bg: #08111f;
    --card: #101b2d;
    --card-2: #13233b;
    --border: rgba(255, 255, 255, 0.08);
    --text: #eef4ff;
    --muted: #a8b8d6;
    --accent: #58a6ff;
    --accent-2: #7ee787;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #08111f 0%, #0c1524 100%);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

.vislab-page {
    padding: 24px 0 40px;
}

.container {
    width: min(1600px, calc(100% - 32px));
    margin: 0 auto;
}

.card {
    background: linear-gradient(180deg, rgba(16, 27, 45, 0.96), rgba(13, 23, 39, 0.98));
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.vislab-hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 22px 24px;
    margin-bottom: 20px;
}

.vislab-hero h1,
.vislab-sidebar h2,
.vislab-content h2,
.sidebar-help h3 {
    margin-top: 0;
}

.muted {
    color: var(--muted);
    line-height: 1.55;
}

.small {
    font-size: 14px;
}

.hero-note {
    min-width: 260px;
    padding: 14px 16px;
    background: rgba(88, 166, 255, 0.08);
    border: 1px solid rgba(88, 166, 255, 0.18);
    border-radius: 14px;
    line-height: 1.5;
}

.hero-note span {
    display: block;
    margin-top: 4px;
    color: #ffffff;
}

.vislab-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 20px;
}

.vislab-sidebar,
.vislab-content {
    padding: 22px;
}

.vislab-nav {
    display: grid;
    gap: 12px;
    margin: 18px 0 24px;
}

.vis-link {
    display: block;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.vis-link:hover {
    transform: translateY(-1px);
    border-color: rgba(88, 166, 255, 0.45);
    background: rgba(88, 166, 255, 0.08);
}

.vis-link.active {
    border-color: rgba(126, 231, 135, 0.5);
    background: rgba(126, 231, 135, 0.08);
}

.vis-link-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    align-items: center;
}

.vis-title {
    font-weight: 700;
}

.vis-badge {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(88, 166, 255, 0.16);
    color: #dcecff;
    font-size: 12px;
    white-space: nowrap;
}

.vis-desc {
    display: block;
    color: var(--muted);
    line-height: 1.45;
    font-size: 14px;
}

.sidebar-help {
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-help p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.5;
}

.vislab-content-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 16px;
}

.open-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--accent);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.vis-frame-wrap {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #050b14;
}

.vis-frame {
    display: block;
    width: 100%;
    min-height: 78vh;
    border: 0;
    background: #02060d;
}

code {
    background: rgba(255,255,255,0.08);
    padding: 2px 6px;
    border-radius: 6px;
}

@media (max-width: 1100px) {
    .vislab-layout {
        grid-template-columns: 1fr;
    }

    .vis-frame {
        min-height: 68vh;
    }
}

@media (max-width: 700px) {
    .container {
        width: min(100%, calc(100% - 20px));
    }

    .vislab-hero,
    .vislab-content-head {
        flex-direction: column;
    }

    .hero-note {
        min-width: 0;
        width: 100%;
    }
}
