/* General Box Styling */
.solution, .activity, .definition, .theorem, .example, .exercise, .generality, .property, .remark, .hint {
    margin: 1.5em 0;
    padding: 1em;
    border-left: 5px solid;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Specific Environment Colors from main.tex */
.solution {
    background-color: #fdf2f9; /* magenta!12!white equivalent */
    border-color: #e2007a;    /* magenta */
}

.activity {
    background-color: #e8f5e9; /* green!22!white */
    border-color: #4caf50;    /* green */
}

.definition {
    background-color: #e3f2fd; /* blue!12!white */
    border-color: #2196f3;    /* blue */
}

.theorem {
    background-color: #f3e5f5; /* violet!12!white */
    border-color: #8e24aa;    /* violet */
    font-style: italic;
}

.example {
    background-color: #fce4ec; /* magenta!12!white */
    border-color: #d81b60;    /* magenta */
}

.exercise {
    background-color: #ffffff; 
    border-color: #f44336;    /* red */
}

.remark, .hint {
    background-color: #fffde7; /* yellow!25!white */
    border-color: #3f51b5;    /* blue title color */
}

/* Titles for the boxes */
.solution::before { content: "Solution"; font-weight: bold; display: block; margin-bottom: 0.5em; }
.activity::before { content: "Activity"; font-weight: bold; display: block; margin-bottom: 0.5em; }
.definition::before { content: "Definition"; font-weight: bold; display: block; margin-bottom: 0.5em; }
.theorem::before { content: "Theorem"; font-weight: bold; display: block; margin-bottom: 0.5em; }
.example::before { content: "Example"; font-weight: bold; display: block; margin-bottom: 0.5em; }
.exercise::before { content: "Exercise"; font-weight: bold; display: block; margin-bottom: 0.5em; }
.remark::before { content: "Remark"; font-weight: bold; display: block; margin-bottom: 0.5em; }
.hint::before { content: "Hint"; font-weight: bold; display: block; margin-bottom: 0.5em; }

/* mdbook table styling to mimic your LaTeX tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

th {
    background-color: #f2f2f2; /* Mimicking gray9 or header colors */
    border-bottom: 2px solid #ccc;
}

tr:nth-child(even) {
    background-color: #fafafa; /* Zebra striping */
}