<style>
.spellbook-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 90%;
    margin: auto;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.375rem;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.spellbook-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.spellbook-card-header {
    padding: 0.75rem 1rem;
    margin-bottom: 0;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.spellbook-card-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
}

.spellbook-card-body {
    flex: 1 1 auto;
    padding: 1rem;
}

.spellbook-card-footer {
    padding: 0.75rem 1rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

.spellbook-shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.spellbook-shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}
</style>
<div class="spellbook-card {% if kwargs.class %}spellbook-{{ kwargs.class }}{% endif %}">
    {% if title %}
        <div class="spellbook-card-header">
            <h5 class="spellbook-card-title">{{ title }}</h5>
        </div>
    {% endif %}
    <div class="spellbook-card-body">{{ content|safe }}</div>
    {% if footer %}<div class="spellbook-card-footer">{{ footer }}</div>{% endif %}
</div>
