body {
    font-family: 'Fredoka', sans-serif;
    background: linear-gradient(135deg, #2e1065, #4c1d95, #581c87);
    color: white;
    overflow-x: hidden;
    min-height: 100vh;
    padding-top: 80px;
    /* Space for fixed header */
}

/* Magic Particles */
.magic-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #d8b4fe;
    border-radius: 50%;
    pointer-events: none;
    animation: float-up 3s linear infinite;
    opacity: 0;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-10vh) scale(1.5);
        opacity: 0;
    }
}

/* Rune Styles */
.rune-slot {
    width: 60px;
    height: 80px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.rune-slot.active {
    border-color: #fca5a5;
    background: rgba(252, 165, 165, 0.1);
    animation: pulse 1.5s infinite;
}

.rune-slot.filled {
    border-style: solid;
    border-color: #a855f7;
    background: #581c87;
    text-shadow: 0 0 10px #d8b4fe;
}

.rune-option {
    width: 60px;
    height: 70px;
    background: linear-gradient(to bottom, #7e22ce, #581c87);
    border: 2px solid #a855f7;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 0 #4c1d95;
    transition: all 0.2s;
    -webkit-user-select: none;
    user-select: none;
}

.rune-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #4c1d95;
    filter: brightness(1.1);
}

.rune-option:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 #4c1d95;
}

.rune-option.dragging {
    opacity: 0.5;
    transform: scale(1.1);
}

/* Column Grid */
.sum-grid {
    display: grid;
    grid-template-columns: repeat(5, 60px);
    /* 4 digits + operator */
    gap: 8px;
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
}

.operator {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
}

.separator {
    grid-column: 1 / -1;
    height: 4px;
    background: #fbbf24;
    border-radius: 2px;
    margin: 5px 0;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(252, 165, 165, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(252, 165, 165, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(252, 165, 165, 0);
    }
}

@keyframes spellCast {
    0% {
        transform: scale(1);
        filter: hue-rotate(0deg);
    }

    50% {
        transform: scale(1.05);
        filter: hue-rotate(90deg) brightness(1.5);
    }

    100% {
        transform: scale(1);
        filter: hue-rotate(0deg);
    }
}

.spell-cast-anim {
    animation: spellCast 0.5s ease-out;
}

/* High-quality claymation background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('clay_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -1;
}