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

body {
background: #0f0f1a;
color: #e0e0e0;
font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
overflow: hidden;
height: 100vh;
width: 100vw;
display: flex;
flex-direction: column;
}

/* ── Toolbar ─────────────────────────────────────── */
#toolbar {
display: flex;
background: #1a1a2e;
border-bottom: 1px solid #2a2a4a;
z-index: 10;
}

.toolbar-rows {
display: flex;
flex-direction: column;
flex: 1;
}

.toolbar-row {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
padding: 6px 12px;
}

.toolbar-row:first-child {
border-bottom: 1px solid #222244;
}

#toolbar-logo {
display: flex;
align-items: center;
padding: 4px 10px;
order: -1;
border-right: 1px solid #2a2a4a;
}

#toolbar-logo img {
height: 58px;
opacity: 0.7;
}

.btn-group {
display: flex;
gap: 3px;
align-items: center;
}

.group-label {
font-size: 11px;
color: #666;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-right: 4px;
white-space: nowrap;
}

.separator {
width: 1px;
height: 28px;
background: #2a2a4a;
margin: 0 6px;
}

button {
background: #252545;
color: #ccc;
border: 1px solid #3a3a5a;
border-radius: 4px;
padding: 6px 12px;
font-size: 13px;
cursor: pointer;
transition: all 0.15s;
white-space: nowrap;
}

button:hover {
background: #353565;
color: #fff;
}

button.active {
background: #4a4aff;
color: #fff;
border-color: #6a6aff;
}

button.active-mode {
background: #00883a;
color: #fff;
border-color: #00aa4a;
}

button.active-option {
background: #8a5a2a;
color: #fff;
border-color: #aa7a4a;
}

/* Farbkodierung der Molekülgruppen */
.group-23 button.active {
background: #3355aa;
border-color: #5577cc;
}
.group-12 button.active {
background: #aa5533;
border-color: #cc7755;
}
.group-13 button.active {
background: #00883a;
border-color: #00aa4a;
}

/* Newman-Buttons: empfohlen vs. ausgegraut */
button.newman-dim {
opacity: 0.4;
}

button.newman-rec {
border-bottom: 2px solid #6a6aff;
}

/* Tastatur-Hints in Buttons */
.key-hint {
font-size: 10px;
color: #888;
margin-left: 4px;
background: #1a1a2e;
padding: 1px 4px;
border-radius: 2px;
}

button.active .key-hint,
button.active-mode .key-hint,
button.active-option .key-hint {
background: rgba(0, 0, 0, 0.3);
color: #ccc;
}

/* ── Viewer-Container ────────────────────────────── */
#viewer-area {
flex: 1;
display: flex;
overflow: hidden;
}

#zoom-bar {
width: 44px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 12px 4px;
background: #151528;
border-right: 1px solid #2a2a4a;
gap: 6px;
}

#zoom-bar label {
font-size: 10px;
color: #666;
writing-mode: vertical-lr;
transform: rotate(180deg);
letter-spacing: 1px;
}

#zoom-slider {
writing-mode: vertical-lr;
direction: rtl;
height: 200px;
accent-color: #6a6aff;
cursor: pointer;
}

#zoom-buttons {
display: flex;
flex-direction: column;
gap: 2px;
}

#zoom-buttons button {
width: 32px;
height: 28px;
background: #1e1e3a;
color: #ccc;
border: 1px solid #3a3a5a;
border-radius: 4px;
font-size: 16px;
font-weight: bold;
cursor: pointer;
line-height: 1;
padding: 0;
}

#zoom-buttons button:hover {
background: #2a2a5a;
color: #fff;
}

#zoom-value {
font-size: 11px;
color: #999;
font-variant-numeric: tabular-nums;
}

#viewer-container {
flex: 1;
position: relative;
overflow: hidden;
}

#jmol-container {
width: 100%;
height: 100%;
position: relative;
z-index: 1;
}

/* ── Overlays ────────────────────────────────────── */
#mol-info {
position: absolute;
top: 16px;
left: 16px;
z-index: 5;
pointer-events: none;
}

#mol-name {
font-size: 28px;
font-weight: 700;
color: #fff;
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

#mol-detail {
font-size: 16px;
color: #aaa;
margin-top: 4px;
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

#seal-overlay {
position: absolute;
bottom: 12px;
right: 16px;
z-index: 25;
height: 640px;
opacity: 0.06;
pointer-events: none;
}

#help-overlay {
position: absolute;
bottom: 12px;
left: 16px;
z-index: 25;
font-size: 12px;
color: #555;
text-align: left;
line-height: 1.6;
pointer-events: none;
}

/* ── Willkommensscreen ───────────────────────────── */
#welcome {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 20;
background: #0f0f1a;
transition: opacity 0.4s;
}

#welcome.hidden {
opacity: 0;
pointer-events: none;
}

#welcome h1 {
font-size: 36px;
font-weight: 300;
color: #ccc;
margin-bottom: 8px;
}

#welcome h2 {
font-size: 18px;
font-weight: 400;
color: #666;
margin-bottom: 18px;
}

.welcome-groups {
display: flex;
gap: 24px;
margin-bottom: 10px;
align-items: flex-start;
}

.welcome-group {
text-align: center;
}

.welcome-group h3 {
font-size: 15px;
color: #999;
margin-bottom: 6px;
}

.welcome-mols {
display: flex;
gap: 2px;
justify-content: center;
}

.welcome-mol-card {
display: flex;
flex-direction: column;
align-items: center;
padding: 16px 14px 10px;
border-radius: 8px;
cursor: pointer;
border: 1px solid transparent;
transition: all 0.15s;
text-decoration: none;
}

.welcome-mol-card:hover {
background: rgba(255, 255, 255, 0.06);
}

.c23-card:hover {
border-color: #3355aa;
}
.c12-card:hover {
border-color: #aa5533;
}
.c13-card:hover {
border-color: #00883a;
}

.config-label {
font-size: 13px;
color: #ccc;
white-space: nowrap;
}

.sawhorse-svg {
width: 120px;
height: auto;
display: block;
overflow: visible;
}

.sawhorse-svg line {
stroke-width: 10;
stroke-linecap: round;
}

.mol-subtext {
font-size: 10px;
color: #555;
margin-top: 0;
}

.welcome-separator {
width: 1px;
background: #2a2a4a;
align-self: stretch;
margin: 10px 4px;
}

.welcome-hint {
font-size: 14px;
color: #444;
margin-top: 10px;
}

.welcome-group h3.c23 {
color: #5577cc;
}
.welcome-group h3.c12 {
color: #cc7755;
}
.welcome-group h3.c13 {
color: #00aa4a;
}

/* ── Konformations-Sidebar (rechts) ─────────────── */
#dihedral-bar {
width: fit-content;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 12px 4px;
background: #151528;
border-left: 1px solid #2a2a4a;
gap: 6px;
}

#dihedral-bar label {
font-size: 10px;
color: #666;
writing-mode: vertical-lr;
transform: rotate(180deg);
letter-spacing: 1px;
}

#dihedral-slider {
writing-mode: vertical-lr;
direction: rtl;
height: 200px;
accent-color: #6a6aff;
cursor: pointer;
}

#dihedral-value {
font-size: 11px;
color: #999;
font-variant-numeric: tabular-nums;
}

.dihedral-presets {
display: flex;
flex-direction: column;
gap: 3px;
}

.dihedral-presets button {
padding: 4px 4px 3px;
font-size: 8px;
line-height: 1.2;
text-align: center;
}

.dihedral-presets button .deg {
display: block;
font-size: 13px;
font-weight: 700;
color: #ddd;
}

#btn-c1flip:disabled {
opacity: 0.3;
cursor: default;
}