/* ================================================
   Einheiten umwandeln - Spezifische Stile
   ================================================ */

/* ================================================
   Umrechnungsdiagramm (Conversion Strip)
   ================================================ */
.conversion-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #ebf5fb, #d4e6f1);
    border-radius: 12px;
    border: 2px solid #85c1e9;
    overflow-x: auto;
}

.unit-box {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    min-width: 70px;
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.unit-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(52, 152, 219, 0.45);
}

.unit-box.active {
    background: linear-gradient(135deg, #1e3c72, #154360);
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.5);
    transform: scale(1.08);
}

.conv-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 4px;
    gap: 4px;
}

.conv-arrow-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.factor-right {
    font-size: 0.75rem;
    color: #1e3c72;
    font-weight: 600;
    white-space: nowrap;
    background: rgba(255,255,255,0.7);
    padding: 2px 6px;
    border-radius: 4px;
}

.factor-left {
    font-size: 0.75rem;
    color: #2980b9;
    font-weight: 600;
    white-space: nowrap;
    background: rgba(255,255,255,0.7);
    padding: 2px 6px;
    border-radius: 4px;
}

.arrow-right-sym {
    font-size: 1.2rem;
    color: #1e3c72;
    line-height: 1;
}

.arrow-left-sym {
    font-size: 1.2rem;
    color: #3498db;
    line-height: 1;
}

/* ================================================
   SVG Visualisierungs-Container
   ================================================ */
.viz-container {
    background: #f8faff;
    border: 2px solid #85c1e9;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    overflow: hidden;
}

.viz-container svg {
    max-width: 100%;
    height: auto;
}

.viz-title {
    color: #1e3c72;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

/* ================================================
   Merke-Box
   ================================================ */
.merke-box {
    background: linear-gradient(135deg, #ebf5fb, #d4e6f1);
    border-left: 5px solid #3498db;
    border-radius: 0 10px 10px 0;
    padding: 20px 24px;
    margin: 25px 0;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.15);
}

.merke-box h4 {
    color: #1e3c72;
    margin-top: 0;
    margin-bottom: 12px;
    font-weight: 700;
}

.merke-box p {
    margin-bottom: 6px;
    color: #1a4a7a;
}

.merke-box ul {
    color: #1a4a7a;
    margin-bottom: 0;
}

/* ================================================
   Beispiel-Aufgaben (klappbar)
   ================================================ */
.example-accordion .accordion-button {
    background: linear-gradient(135deg, #ebf5fb, #d4e6f1);
    color: #1e3c72;
    font-weight: 600;
}

.example-accordion .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #d4e6f1, #a9cce3);
    color: #1e3c72;
    box-shadow: inset 0 -1px 0 #85c1e9;
}

.example-accordion .accordion-item {
    border: 1px solid #85c1e9;
    border-radius: 8px !important;
    margin-bottom: 10px;
    overflow: hidden;
}

.example-accordion .accordion-body {
    background: #fafcff;
}

.solution-step {
    background: white;
    border-left: 4px solid #5dade2;
    border-radius: 0 6px 6px 0;
    padding: 10px 15px;
    margin: 8px 0;
    font-size: 0.95rem;
}

.solution-result {
    background: linear-gradient(135deg, #ebf5fb, #d4e6f1);
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 12px 18px;
    margin-top: 12px;
    font-weight: 700;
    color: #1e3c72;
    font-size: 1.05rem;
    text-align: center;
}

/* ================================================
   Übungsaufgaben (uebung.php)
   ================================================ */
.level-select-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.btn-level {
    padding: 10px 24px;
    border-radius: 8px;
    border: 2px solid transparent;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s;
}

.btn-level-1 {
    background: linear-gradient(135deg, #85c1e9, #5dade2);
    color: white;
    border-color: #5dade2;
}

.btn-level-1.active,
.btn-level-1:hover {
    background: linear-gradient(135deg, #5dade2, #3498db);
    box-shadow: 0 4px 12px rgba(93, 173, 226, 0.4);
    transform: translateY(-2px);
}

.btn-level-2 {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-color: #2980b9;
}

.btn-level-2.active,
.btn-level-2:hover {
    background: linear-gradient(135deg, #2980b9, #1e6fa5);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    transform: translateY(-2px);
}

.btn-level-3 {
    background: linear-gradient(135deg, #1e3c72, #154360);
    color: white;
    border-color: #154360;
}

.btn-level-3.active,
.btn-level-3:hover {
    background: linear-gradient(135deg, #154360, #0d2b45);
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.4);
    transform: translateY(-2px);
}

.exercise-block {
    background: #f8faff;
    border: 1px solid #85c1e9;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    transition: box-shadow 0.2s;
}

.exercise-block:hover {
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.15);
}

.exercise-block.completed {
    border-color: #5dade2;
    background: linear-gradient(135deg, #f0f8ff, #e8f4fd);
}

.exercise-block h4 {
    color: #1e3c72;
    font-weight: 700;
    margin-bottom: 14px;
}

.exercise-input-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0;
}

.exercise-input-row label {
    font-size: 1rem;
    color: #1a4a7a;
}

.answer-input {
    border: 2px solid #85c1e9;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 1rem;
    width: 100px;
    text-align: center;
    transition: border-color 0.2s;
}

.answer-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.answer-input.correct {
    border-color: #5dade2;
    background: #e8f8ff;
}

.answer-input.incorrect {
    border-color: #e74c3c;
    background: #fdf0ee;
}

.btn-check-answer {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 9px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-check-answer:hover {
    background: linear-gradient(135deg, #2980b9, #1e3c72);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.feedback-box {
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 12px;
    font-weight: 500;
    display: none;
}

.feedback-box.correct {
    background: linear-gradient(135deg, #d4efff, #c0e8ff);
    border-left: 4px solid #5dade2;
    color: #1a5276;
}

.feedback-box.incorrect {
    background: linear-gradient(135deg, #fde8e4, #fcd3cb);
    border-left: 4px solid #e74c3c;
    color: #7b2d2d;
}

/* ================================================
   Fortschrittsanzeige
   ================================================ */
.progress-track {
    background: #d4e6f1;
    border-radius: 20px;
    height: 12px;
    margin: 8px 0 18px 0;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #5dade2, #3498db);
    height: 100%;
    border-radius: 20px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-label {
    font-size: 0.85rem;
    color: #2980b9;
    font-weight: 600;
    margin-bottom: 4px;
}

/* ================================================
   Viz Controls (Buttons für Animationen)
   ================================================ */
.viz-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 14px;
}

.btn-viz {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-viz:hover {
    background: linear-gradient(135deg, #2980b9, #1e3c72);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.3);
}

/* ================================================
   Highlight-Label unter SVG
   ================================================ */
.viz-label {
    display: inline-block;
    background: #1e3c72;
    color: white;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 6px 4px;
}

.viz-label-light {
    background: #5dade2;
}

.viz-label-medium {
    background: #2980b9;
}
