#federpendel-static-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(145deg, #ffffff 0%, #e8f0fe 50%, #d6e4f7 100%);
    border-radius: 16px;
    min-height: 640px;
    max-width: 1400px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

#steuerung,
#steuerung-fortsetzung {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

#steuerung-fortsetzung .steuerung-gruppe:last-child {
    grid-column: 1 / -1;
}

.steuerung-gruppe {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.steuerung-gruppe:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gewicht-buttons {
    flex-wrap: wrap;
}

.gewicht-btn {
    min-width: 85px;
    padding: 0.5rem 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.gewicht-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.gewicht-btn:active::before {
    width: 300px;
    height: 300px;
}

.gewicht-btn.active {
    background: linear-gradient(135deg, #0e4194 0%, #1e5bb8 100%);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(14, 65, 148, 0.3);
    border-color: #0e4194;
}

.gewicht-btn:not(.active) {
    background: linear-gradient(135deg, #6c757d 0%, #8a949e 100%);
    border-color: #6c757d;
}

.gewicht-btn:not(.active):hover {
    background: linear-gradient(135deg, #5a6268 0%, #6c757d 100%);
    transform: scale(1.02);
}

#pendel-bereich {
    position: relative;
    width: 100%;
    height: 600px;
    background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(14, 65, 148, 0.1);
}

#halterung {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 30px;
    z-index: 2;
    transition: width 0.3s ease;
}

.halterung-balken {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #666 0%, #444 100%);
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Halterung breiter für Parallelschaltung */
#pendel-bereich-static:has(#feder-system.modus-parallel) #halterung {
    width: 250px;
}

#feder-container {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(var(--feder-offset, 0px));
    width: 40px;
    height: var(--feder-laenge, 220px);
}

#feder-svg {
    width: 100%;
    height: var(--feder-height, 200px);
    overflow: visible;
    display: block;
}

#gewicht {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    top: calc(30px + var(--feder-height, 180px) - 5px);
    transition: top 0.05s linear;
}

/* Reihenschaltung: Gewicht nach beiden Federn */
#pendel-bereich-static:has(#feder-system.modus-reihe) #gewicht {
    top: calc(30px + var(--feder-height, 180px) * 2 - 25px);
}

.gewicht-koerper {
    width: 80px;
    height: 80px;
    background: var(--gewicht-farbe, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.25),
        inset 0 -3px 6px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    position: relative;
    background-size: 100% 100%;
}

@keyframes subtle-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.gewicht-haken {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 12px;
    background: linear-gradient(180deg, #666 0%, #444 100%);
    border-radius: 3px 3px 0 0;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

#gewicht-anzeige {
    color: white;
    font-weight: bold;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

#ruhelage-marker {
    position: absolute;
    top: 220px;
    left: 28%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #dc3545;
    font-weight: bold;
    font-size: 0.85rem;
    z-index: 3;
    opacity: 0.9;
}

#ruhelage-marker::before {
    content: '';
    display: block;
    width: 180px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(220, 53, 69, 0.6), rgba(220, 53, 69, 0.6), transparent);
    border-radius: 2px;
}

#ruhelage-marker span {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#massband {
    position: absolute;
    top: 60px;
    left: calc(50% - 140px);
    width: 75px;
    height: 440px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.95) 100%);
    border-radius: 8px;
    border: 2px solid #e9ecef;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.08),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    gap: 1.5rem;
    z-index: 2;
}

.skala {
    position: relative;
    width: 100%;
    height: 100%;
}

.skalen-marke {
    position: absolute;
    left: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
    transition: color 0.2s ease;
}

.skalen-marke::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 0.6rem;
    width: 14px;
    height: 2px;
    background: linear-gradient(90deg, #495057, #6c757d);
    border-radius: 1px;
}

.skalen-marke::after {
    content: '';
    position: absolute;
    left: -15px;
    top: 0.55rem;
    width: 3px;
    height: 3px;
    background: #495057;
    border-radius: 50%;
}

.skalen-marke[data-value="0"] { top: 160px; }
.skalen-marke[data-value="2"] { top: 220px; }
.skalen-marke[data-value="4"] { top: 280px; }
.skalen-marke[data-value="6"] { top: 340px; }
.skalen-marke[data-value="8"] { top: 400px; }
.skalen-marke[data-value="10"] { top: 460px; }
.skalen-marke[data-value="12"] { top: 520px; }
.skalen-marke[data-value="14"] { top: 580px; }

#messlineal-marker {
    position: absolute;
    left: 100%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.marker-kopf {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0e4194 0%, #1e5bb8 100%);
    box-shadow:
        0 0 12px rgba(14, 65, 148, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 12px rgba(14, 65, 148, 0.6), 0 2px 4px rgba(0, 0, 0, 0.2); }
    50% { box-shadow: 0 0 20px rgba(14, 65, 148, 0.8), 0 2px 4px rgba(0, 0, 0, 0.2); }
}

.marker-kopf::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
}

.marker-wert {
    background: linear-gradient(135deg, rgba(14, 65, 148, 0.08) 0%, rgba(30, 91, 184, 0.12) 100%);
    border: 2px solid rgba(14, 65, 148, 0.3);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-weight: bold;
    color: #0e4194;
    min-width: 105px;
    box-shadow: 0 2px 6px rgba(14, 65, 148, 0.15);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.marker-wert:hover {
    background: linear-gradient(135deg, rgba(14, 65, 148, 0.12) 0%, rgba(30, 91, 184, 0.18) 100%);
    box-shadow: 0 3px 8px rgba(14, 65, 148, 0.2);
}

.ergebnisse-box {
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    border: 2px solid rgba(14, 65, 148, 0.3);
    box-shadow: 0 4px 12px rgba(14, 65, 148, 0.1);
    position: relative;
    overflow: hidden;
}

.ergebnisse-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0e4194, #1e5bb8, #0e4194);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.ergebnis-zeile {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(14, 65, 148, 0.1);
    transition: background-color 0.2s ease;
}

.ergebnis-zeile:hover {
    background-color: rgba(14, 65, 148, 0.02);
}

.ergebnis-zeile:last-child {
    border-bottom: none;
}

.ergebnis-zeile span:first-child {
    color: #495057;
}

.ergebnis-zeile span:last-child {
    font-weight: bold;
    color: #0e4194;
    font-size: 0.95rem;
    text-shadow: 0 1px 2px rgba(14, 65, 148, 0.1);
}

.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
    border: none;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #8a949e 100%);
    border: none;
    box-shadow: 0 4px 10px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, #0e4194 0%, #1e5bb8 100%);
    border: none;
    box-shadow: 0 4px 10px rgba(14, 65, 148, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(14, 65, 148, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#messfehler-select {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

#messfehler-select:hover {
    border-color: #0e4194;
    box-shadow: 0 2px 6px rgba(14, 65, 148, 0.15);
}

#messfehler-select:focus {
    outline: none;
    border-color: #0e4194;
    box-shadow: 0 0 0 3px rgba(14, 65, 148, 0.1);
}

@media (max-width: 768px) {
    #federpendel-container {
        padding: 1rem;
    }

    #pendel-bereich {
        height: 540px;
    }

    .gewicht-koerper {
        width: 60px;
        height: 60px;
    }

    #gewicht-anzeige {
        font-size: 14px;
    }

    #steuerung,
    #steuerung-fortsetzung {
        grid-template-columns: 1fr;
    }

    #massband {
        left: 8%;
        height: 380px;
    }
}

.gap-small { gap: 0.5rem; }
.gap-middle { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.alignitems-centeryaxis { align-items: center; }

/* Additional styles for static spring pendulum */
#pendel-bereich-static {
    position: relative;
    width: 100%;
    min-height: 640px;
    padding-bottom: 3rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: visible;
}

#feder-system {
    position: absolute;
    left: 50%;
    top: 30px;
    transform: translateX(-50%);
    min-width: 60px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#feder-system.modus-parallel {
    min-width: 150px;
}

#feder-system.modus-reihe {
    min-width: 60px;
}

#lineal {
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 35px;
    width: 70px;
    background: linear-gradient(90deg, #fffdf5 0%, #f6ecd2 50%, #fffdf5 100%);
    border: 2px solid #c8b897;
    border-radius: 10px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: stretch;
    justify-content: center;
    z-index: 1;
    pointer-events: none;
}

.lineal-body {
    position: relative;
    width: 100%;
    height: 100%;
}

#lineal-skala {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 0;
}

.skala-strich {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    color: #5a4a3a;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.skala-strich::before {
    content: '';
    display: block;
    height: 1px;
    border-radius: 1px;
    background: currentColor;
    opacity: 0.7;
    margin-left: 10px;
    margin-right: 6px;
}

.skala-strich.main::before {
    width: 26px;
    height: 2px;
    opacity: 0.9;
}

.skala-strich.minor::before {
    width: 16px;
}

.skala-label {
    margin-left: auto;
    margin-right: 8px;
}

#lineal-marker {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: #e53e3e;
    border-radius: 4px;
    box-shadow: 0 0 6px rgba(229, 62, 62, 0.5);
    transform: translateY(-50%);
}

#messwert-anzeige.auslenkung-label {
    position: absolute;
    padding: 0.35rem 0.7rem;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e53e3e;
    border-radius: 8px;
    color: #e53e3e;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%);
    pointer-events: none;
    min-width: 72px;
    text-align: center;
    z-index: 5;
}

.status-text {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

/* Gewicht Auswahl rechts vom Pendel */
#gewicht-auswahl-rechts {
    position: absolute;
    top: 50px;
    right: 30px;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
}

.gewicht-buttons-vertikal {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1 1 auto;
    width: 100%;
    overflow-y: auto;
    padding-right: 4px;
}

.gewicht-buttons-vertikal::-webkit-scrollbar {
    width: 6px;
}

.gewicht-buttons-vertikal::-webkit-scrollbar-thumb {
    background: rgba(14, 65, 148, 0.35);
    border-radius: 3px;
}

.gewicht-buttons-vertikal .gewicht-btn {
    width: 100%;
    min-width: 80px;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
}

/* Kompakte Steuerung */
#federpendel-steuerung {
    width: 100%;
}

#federpendel-steuerung .messdaten-row {
    width: 100%;
    flex-wrap: wrap;
    gap: 1.5rem;
    row-gap: 0.75rem;
}

#federpendel-steuerung .messdaten-row #messung-uebernehmen-btn {
    flex-shrink: 0;
    margin-left: auto;
}

.justify-content-startandend {
    justify-content: space-between;
}

.gap-large {
    gap: 1.5rem;
}

/* Lineal Nullpunkt */
#lineal-nullpunkt {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: #0e4194;
    border-radius: 3px;
    transform: translateY(-50%);
    display: none;
    pointer-events: none;
    opacity: 0.7;
}

#lineal-nullpunkt.visible {
    display: block;
}

.button-gruppe {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.anleitung-liste {
    margin-left: 20px;
    line-height: 1.8;
}

.anleitung-liste li {
    margin-bottom: 8px;
}

/* Schaltungs-Auswahl Buttons */
.schaltungs-btn {
    min-width: 140px;
    padding: 0.6rem 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.schaltungs-btn.active {
    background: linear-gradient(135deg, #0e4194 0%, #1e5bb8 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(14, 65, 148, 0.3);
    border-color: #0e4194;
}

.schaltungs-btn:not(.active) {
    background: linear-gradient(135deg, #6c757d 0%, #8a949e 100%);
    border-color: #6c757d;
}

.schaltungs-btn:not(.active):hover {
    background: linear-gradient(135deg, #5a6268 0%, #6c757d 100%);
    transform: scale(1.02);
}

/* Formel-Box */
.formel-box {
    background: linear-gradient(145deg, #f8fbff 0%, #ffffff 100%);
    border: 2px solid rgba(14, 65, 148, 0.25);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 12px rgba(14, 65, 148, 0.1);
    position: relative;
    overflow: hidden;
}

.formel-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0e4194, #1e5bb8, #0e4194);
}

.formel-titel {
    font-size: 1.1rem;
    color: #0e4194;
    margin-bottom: 0.5rem;
}

.formel-text {
    font-size: 1rem;
    color: #495057;
    line-height: 1.6;
}

/* Federn Container - verschiedene Modi */
#federn-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* Einzelfeder Modus */
#feder-system.modus-einzeln #federn-container {
    flex-direction: column;
    align-items: center;
}

#feder-system.modus-einzeln .feder-wrapper {
    width: 60px;
}

/* Parallelschaltung Modus */
#feder-system.modus-parallel #federn-container {
    flex-direction: row;
    align-items: flex-start;
    gap: 30px;
}

#feder-system.modus-parallel .feder-wrapper {
    width: 60px;
    flex: 0 0 auto;
}

/* Reihenschaltung Modus */
#feder-system.modus-reihe #federn-container {
    flex-direction: column;
    align-items: center;
    gap: -10px;
}

#feder-system.modus-reihe .feder-wrapper {
    width: 60px;
}

#feder-system.modus-reihe .feder-wrapper[data-feder="2"] {
    margin-top: -10px;
}

/* Feder Wrapper */
.feder-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feder-svg {
    width: 100%;
    height: var(--feder-height, 200px);
    overflow: visible;
    display: block;
}

/* Verbindungs-Element für Reihenschaltung */
#feder-system.modus-reihe .feder-wrapper[data-feder="1"]::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 12px;
    background: linear-gradient(180deg, #666 0%, #444 100%);
    border-radius: 3px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Verbindungs-Stab für Parallelschaltung - oben */
#feder-system.modus-parallel::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 8px;
    background: linear-gradient(180deg, #666 0%, #444 100%);
    border-radius: 4px;
    z-index: 4;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Verbindungs-Balken für Parallelschaltung - unten (über Gewicht) */
#feder-system.modus-parallel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(calc(var(--feder-height, 180px) - 180px + 5px));
    width: 160px;
    height: 14px;
    background: linear-gradient(180deg, #555 0%, #333 100%);
    border-radius: 6px;
    z-index: 6;
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    border: 1px solid #222;
}


/* Responsive für Schaltungs-Auswahl */
@media (max-width: 768px) {
    .schaltungs-btn {
        min-width: 110px;
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }

    .formel-box {
        padding: 0.75rem 1rem;
    }

    .formel-titel {
        font-size: 1rem;
    }

    .formel-text {
        font-size: 0.9rem;
    }

    #feder-system.modus-parallel #federn-container {
        gap: 20px;
    }
}
