body {
    padding-bottom: 60px;
    padding-top: 240px;
    background: linear-gradient(to bottom, #d4c5a9 0%, #b8a88a 100%);
    font-family: 'Garamond', 'Georgia', serif;
    color: #2c1810;
}

header {
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, #3d2817 0%, #2c1810 100%);
    z-index: 100;
    padding: 10px 0;
    border-bottom: 3px solid #8b6f47;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

header h1 {
    margin: 20px 0 10px;
    color: #d4af37;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    font-family: 'Garamond', serif;
    letter-spacing: 2px;
}

header p {
    margin: 0 0 20px;
    color: #c9b896;
    font-style: italic;
}

nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    max-width: 600px;
    margin: 20px auto;
}

nav a {
    padding: 10px;
    text-align: center;
    text-decoration: none;
    background: linear-gradient(to bottom, #5c4a3a 0%, #3d2817 100%);
    color: #d4af37;
    border-radius: 5px;
    border: 2px solid #8b6f47;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-weight: bold;
}

nav a:hover {
    background: linear-gradient(to bottom, #6d5a4a 0%, #4d3827 100%);
    box-shadow: 0 3px 6px rgba(0,0,0,0.5);
}

nav a.active {
    background: linear-gradient(to bottom, #d4af37 0%, #b8941f 100%);
    color: #2c1810;
}

.spell-selectors {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 0;
    padding: 10px 20px;
    position: fixed;
    top: 180px;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, #3d2817 0%, #2c1810 100%);
    z-index: 100;
    border-bottom: 3px solid #8b6f47;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.spell-selectors label {
    color: #c9b896;
}

.spell-selectors select,
.spell-selectors input[type="checkbox"] {
    background: #5c4a3a;
    color: #d4af37;
    border: 1px solid #8b6f47;
}

.spell-selectors div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spell-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.spell-info {
    padding: 15px;
    background: rgba(228, 218, 196, 0.9);
    border-radius: 5px;
    border: 2px solid #8b6f47;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.spell-display {
    padding: 15px;
    background: rgba(218, 208, 186, 0.9);
    border-radius: 5px;
    position: relative;
    min-height: 400px;
    border: 2px solid #8b6f47;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.spell-display-container {
    position: relative;
    width: 100%;
    height: 400px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
}

.spell-display-container canvas {
    display: block;
    width: 100%;
    height: 100%;
    grid-column: 1;
    grid-row: 1;
}

.placeholder-display {
    background: #2a2a2a;
    border: 1px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-display h3 {
    color: #fff;
    margin: 0;
}

.spell-display-container img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
}

.loading-pulse {
    text-align: center;
    padding: 40px;
    background: rgba(61, 40, 23, 0.95);
    border-radius: 10px;
    margin: 50px auto;
    max-width: 500px;
    border: 3px solid #8b6f47;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.loading-pulse .pulse-text {
    animation: pulse 1.5s ease-in-out infinite;
    font-size: 24px;
    color: #d4af37;
    display: block;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.loading-pulse .static-text {
    font-size: 16px;
    color: #c9b896;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, #2c1810 0%, #3d2817 100%);
    text-align: center;
    padding: 10px 0;
    z-index: 100;
    border-top: 3px solid #8b6f47;
    box-shadow: 0 -4px 8px rgba(0,0,0,0.5);
    color: #c9b896;
    font-style: italic;
}

body {
    padding-bottom: 60px;
    padding-top: 240px;
    background: linear-gradient(to bottom, #d4c5a9 0%, #b8a88a 100%);
    font-family: 'Garamond', 'Georgia', serif;
    color: #2c1810;
}
