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

body {
    background: #10151d;
    color: #e7edf5;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    overflow: hidden;
}

.topbar {
    height: 65px;
    background: #171f2a;
    border-bottom: 1px solid #293544;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 2px;
}

.logo span {
    color: #64b5c5;
}

.header-info {
    font-size: 11px;
    color: #8292a5;
    letter-spacing: 2px;
}

.workspace {
    display: flex;
    height: calc(100vh - 65px);
}

.sidebar {
    width: 245px;
    background: #171f2a;
    border-right: 1px solid #293544;
    padding: 30px 18px;
    position: relative;
    flex-shrink: 0;
}

.sidebar h2 {
    font-size: 17px;
    margin-bottom: 28px;
}

.menu-item {
    padding: 14px;
    margin-bottom: 8px;
    color: #9baabd;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
}

.menu-item:hover,
.menu-item.active {
    background: #253746;
    color: #79c9d7;
}

.sidebar-bottom {
    position: absolute;
    bottom: 30px;
    font-size: 12px;
    color: #8292a5;
    line-height: 1.8;
}

.sidebar-bottom p {
    color: #64b5c5;
    font-weight: bold;
}

.main-area {
    flex: 1;
    padding: 30px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.section-heading h1 {
    font-size: 25px;
    margin-bottom: 7px;
}

.section-heading p {
    font-size: 13px;
    color: #8292a5;
}

.status {
    color: #79c9d7;
    border: 1px solid #355b67;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 11px;
}

.viewer {
    flex: 1;
    min-height: 300px;
    background: radial-gradient(circle at center, #263747, #151d28 70%);
    border: 1px solid #2c3c4c;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

#brain-container {
    position: absolute;
    inset: 0;
}

#brain-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.viewer-label {
    position: absolute;
    z-index: 2;
    top: 20px;
    left: 22px;
    right: 22px;
    display: flex;
    justify-content: space-between;
    color: #8196a9;
    font-size: 10px;
    letter-spacing: 1px;
    pointer-events: none;
}

.viewer-controls {
    position: absolute;
    z-index: 3;
    right: 20px;
    bottom: 22px;
}

button {
    background: #263d4d;
    border: 1px solid #456779;
    color: #c9e8ef;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
}

button:hover {
    background: #35566a;
}

.viewer-help {
    position: absolute;
    z-index: 2;
    bottom: 22px;
    left: 22px;
    font-size: 11px;
    line-height: 1.8;
    color: #8da0b2;
    pointer-events: none;
}

.bottom-info {
    display: flex;
    gap: 50px;
    padding: 22px 5px;
}

.bottom-info div {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.bottom-info span {
    color: #8292a5;
    font-size: 10px;
}

.bottom-info strong {
    font-size: 12px;
    font-weight: normal;

}
 
@media (max-width: 700px) {
    .sidebar {
        width: 170px;
    }

    .main-area {
        padding: 15px;
    }

    .bottom-info {
        gap: 15px;
        flex-wrap: wrap;
    }

    .header-info {
        display: none;
    }

    .content-layout {
        flex-direction: column;
    }

    .anatomy-panel {
        width: 100%;
        max-height: 250px;
    }
}
   .content-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 20px;
}

.viewer {
    flex: 1;
    min-width: 0;
    min-height: 0;
}

.anatomy-panel {
    width: 320px;
    flex-shrink: 0;
    background: #171f2a;
    border: 1px solid #293544;
    border-radius: 12px;
    padding: 22px;
    overflow-y: auto;
}

#brain-container {
    width: 100%;
    height: 100%;
}

/* АНАТОМИЧЕСКИЙ КАТАЛОГ */

.structure-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.structure-button {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;

    padding: 12px;

    background: #1d2b38;
    border: 1px solid #304454;
    border-radius: 7px;

    color: #e7edf5;
    text-align: left;
    cursor: pointer;
    transition: 0.2s;
}

.structure-button:hover {
    background: #263d4d;
    border-color: #64b5c5;
}

.structure-button.active {
    background: #254653;
    border-color: #64b5c5;
    color: #79c9d7;
}

.structure-button small {
    color: #91a1b2;
    font-size: 11px;
    font-weight: normal;
}

/* АНАТОМИЧЕСКИЕ ГРУППЫ */

.anatomy-catalog {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.anatomy-group {
    background: #1d2b38;
    border: 1px solid #304454;
    border-radius: 8px;
    overflow: hidden;
}

.anatomy-group summary {
    padding: 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    list-style: none;
}

.anatomy-group summary::-webkit-details-marker {
    display: none;
}

.anatomy-group summary::after {
    content: "+";
    float: right;
    color: #64b5c5;
    margin-top: -30px;
    align-self: flex-end;
}

.anatomy-group[open] summary::after {
    content: "−";
}

.anatomy-group summary span {
    color: #e7edf5;
    font-size: 13px;
    font-weight: bold;
}

.anatomy-group summary small {
    color: #91a1b2;
    font-size: 11px;
}

.anatomy-group summary:hover {
    background: #263d4d;
}

.anatomy-group .structure-list {
    padding: 0 10px 10px;
    margin-top: 0;
}

.catalog-empty {
    padding: 0 14px 14px;
    color: #8292a5;
    font-size: 12px;
}

/* ИНФОРМАЦИОННАЯ КАРТОЧКА */
.anatomy-info {
    margin-top: 18px;
}

.info-heading {
    margin-top: 16px;
    margin-bottom: 18px;
}

.info-heading h3 {
    color: #e7edf5;
    font-size: 19px;
    margin: 0 0 5px;
}

.info-heading span {
    color: #91a1b2;
    font-size: 12px;
    font-style: italic;
}

.info-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
}

.info-levels button {
    background: #1d2b38;
    border: 1px solid #304454;
    color: #91a1b2;
    padding: 7px 9px;
    border-radius: 5px;
    font-size: 11px;
    cursor: pointer;
}

.info-levels button:hover,
.info-levels button.active {
    background: #263d4d;
    border-color: #64b5c5;
    color: #64b5c5;
}

#anatomy-info-content h4 {
    color: #64b5c5;
    font-size: 13px;
    margin: 18px 0 8px;
}

#anatomy-info-content p,
#anatomy-info-content li {
    color: #c0cbd8;
    font-size: 12px;
    line-height: 1.6;
}

#anatomy-info-content ul {
    padding-left: 18px;
    margin: 7px 0;
}

#anatomy-info-content li {
    margin-bottom: 6px;
}