:root {
    /* ===== Header ===== */
    --header-height: 3.5rem;
    --header-padding: 0 1rem;
    --header-gradient: linear-gradient(30deg, var(--color-violet) 0%, var(--color-black) 35%, var(--color-black) 65%, var(--color-aqua) 100%);

    /* ===== Sidebar ===== */
    --sidebar-ol-bg: var(--color-black-30);
    --sidebar-ol-blur: blur(10px);
    --sidebar-bg: var(--color-black);
    --sidebar-color: var(--color-white);
    --sidebar-border: 1px solid var(--color-white-30);
    --sidebar-shadow: 0 5px 20px var(--color-white-20);
    --sidebar-width: 90%;
    --sidebar-max-width: 17rem;
    --sidebar-zindex: 1200;

    /* ===== Timeline ===== */
    --viewer-timeline-height: 4rem;
}

/* Viewer ========================================== */
.viewer-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

body[data-app-mode="viewer"] .editor-only {
    display: none !important;
}

body[data-app-mode="editor"] .viewer-only {
    display: none !important;
}

.viewer-section {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: calc(100% - var(--viewer-timeline-height));
    background-color: var(--color-black);
}

#viewer {
    position: relative;
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.viewer-sidebar,
.editor-sidebar {
    display: flex;
    flex-direction: column;
    width: 16rem;
    max-width: 16rem;
    max-height: 100%;
    background-color: var(--color-black);
    border-right: 1px solid var(--color-grey);
    color: var(--color-white);
}

.viewer-sidebar-header,
.editor-sidebar-header {
    display: flex;
    flex-direction: column;
    gap: calc(var(--general-gap) * 0.5);
    padding: var(--general-padding);
}

.parts-container {
    display: flex;
    flex-direction: column;
    gap: var(--general-gap);
    width: 100%;
    height: fit-content;
    padding: var(--general-padding);
    padding-top: 0;
    border-radius: var(--general-radius);
    overflow-y: auto;
}

.parts {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: fit-content;
    background-color: var(--color-white-20);
    border: 1px solid var(--color-white-30);
    border-radius: var(--general-radius);
    box-shadow: 0 0 0.75rem var(--color-white-40);
}

.parts:hover {
    cursor: pointer;
    transition: var(--transition-btn);
    border: 1px solid var(--color-orange);
    box-shadow: 0 0 0.75rem var(--color-orange-50);
}

.parts-info {
    display: flex;
    flex-direction: column;
    gap: calc(var(--general-gap) * 0.25);
    padding: calc(var(--general-padding) * 0.75);
}

.parts img {
    width: 100%;
    max-width: 100%;
    border-radius: var(--general-radius);
    object-fit: cover;
}

.editor-actions {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: var(--general-gap);
    padding: var(--general-padding);
    overflow-y: auto;
}

/* Three.js */
canvas {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

/* Stepper */
.stepper-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: var(--viewer-timeline-height);
    max-width: 100%;
    background-color: var(--color-black);
    border-top: 1px solid var(--color-grey);
    color: var(--color-white);
    padding: 0 1rem;
}

.stepper {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
    width: 100%;
    padding: var(--general-padding);
    margin: auto 0;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 0.2rem;
    background: var(--color-grey);
    z-index: 0;
}

.stepper .progress {
    position: absolute;
    top: 50%;
    left: 0;
    height: 0.2rem;
    background: var(--color-orange);
    transition: all 1s ease;
    z-index: 1;
    box-shadow: 0 0 0.75rem var(--color-orange-50);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: fit-content;
    z-index: 2;
}

.step-circle {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--color-grey);
    border: 0.2rem solid var(--color-grey);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    padding-bottom: 2px;
    color: var(--color-white);
    transition: all 1s ease;
    cursor: pointer;
}

.step.active .step-circle {
    border-color: var(--color-orange);
    background: var(--color-grey);
    color: white;
    box-shadow: 0 0 0.75rem var(--color-orange-50);
}

.step.completed .step-circle {
    border-color: var(--color-orange);
    background: var(--color-orange);
    color: var(--color-black);
    box-shadow: 0 0 0.75rem var(--color-orange-50);
}

.step-label {
    margin-top: 0.75rem;
    font-size: 14px;
    color: var(--color-white);
    text-align: center;
    transition: color 0.3s ease;
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--color-orange);
    font-weight: 600;
}