body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

select,
button {
    padding: 10px 15px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ccc;
    cursor: pointer;
}

button {
    background-color: #2c3e50;
    color: white;
    border: none;
    transition: background 0.3s;
}

button:hover {
    background-color: #1a252f;
}

main {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 800px;
    text-align: center;
}

#math-container {
    font-size: 2.5rem;
    /* Große, gut lesbare Formeln */
    margin-bottom: 30px;
    padding: 20px;
    background: #eef2f3;
    border-radius: 8px;
}

canvas {
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    max-width: 100%;
    height: auto;
    touch-action: manipulation;
}

#module-controls {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.eq-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #3498db;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.eq-btn:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.eq-btn:active:not(:disabled) {
    transform: translateY(0);
}

.eq-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.eq-btn.reset-btn {
    background: #7f8c8d;
}

.eq-btn.reset-btn:hover:not(:disabled) {
    background: #636e72;
}

.eq-hint {
    width: 100%;
    margin-top: 8px;
    font-size: 0.95rem;
    color: #555;
}

#feedback-container {
    margin-top: 20px;
}

#feedback-text {
    font-size: 1.2rem;
    font-weight: bold;
    min-height: 24px;
    /* Verhindert das Springen des Layouts */
    transition: color 0.3s ease;
}