        body {
            font-family: 'Nunito', sans-serif;
            background-color: #2D1B4E; /* Deep magical purple */
            color: #F3E8FF;
            overflow-x: hidden;
        }
        
        h1, h2, h3, .magic-font {
            font-family: 'Caveat', cursive;
        }

        .potion {
            cursor: grab;
            transition: transform 0.2s, filter 0.2s;
            display: flex;
            align-items: flex-end; /* Ensures bottles sit flat on the shelf */
            justify-content: center;
        }
        
        .potion:active {
            cursor: grabbing;
            transform: scale(1.1);
        }

        .potion.sorted-top {
            transform: scale(1.1);
            filter: drop-shadow(0 0 10px #FCD34D); /* Glow effect */
        }

        .potion.sorted-bottom {
            transform: scale(0.9);
            filter: drop-shadow(0 0 10px #FCD34D);
        }

        .shelf {
            border: 8px solid #5C3A21; /* Rustic wood */
            background-color: #8B5A2B;
            box-shadow: inset 0 -10px 20px rgba(0,0,0,0.5);
            position: relative;
        }
        
        .shelf::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.2) 100%);
            pointer-events: none;
        }

        .drop-zone {
            transition: background-color 0.3s;
        }
        
        .drop-zone.hover {
            background-color: rgba(253, 224, 71, 0.2);
        }

        .spellbook {
            background: #FFFBF0;
            color: #333;
            box-shadow: 0 10px 25px rgba(0,0,0,0.5);
            border-radius: 10px 30px 30px 10px;
            position: relative;
        }
        
        .spellbook::before {
            content: '';
            position: absolute;
            left: 20px; top: 0; bottom: 0; width: 2px;
            background: #E5E7EB;
        }

        .maze-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            grid-template-rows: repeat(3, 1fr);
            gap: 4px;
            background: #5B21B6;
            padding: 4px;
            border-radius: 12px;
            border: 4px solid #A78BFA;
        }

        .maze-cell {
            background: #4C1D95;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            cursor: pointer;
            transition: background-color 0.2s;
            min-height: 80px;
        }

        .maze-cell:hover:not(.obstacle) {
            background: #6D28D9;
        }

        .maze-cell.path {
            background: #0284C7; /* Magical Cyan/Blue for contrast with Yellow Snail */
            box-shadow: 0 0 15px #38BDF8;
        }
        
        .maze-cell.obstacle {
            background: #374151;
            cursor: not-allowed;
        }

        .code-block {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #4C1D95;
            border: 2px solid #A78BFA;
            padding: 8px 16px;
            border-radius: 8px;
            margin: 0 4px;
            font-size: 1.5rem;
            font-weight: bold;
            color: #FCD34D;
            width: 50px;
            height: 50px;
        }
        
        #connections-canvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 10;
        }

        /* Speaker Button Styles */
        .speaker-btn {
            transition: transform 0.2s ease-in-out, color 0.2s;
            cursor: pointer;
        }
        .speaker-btn:hover {
            transform: scale(1.15);
        }
        .speaker-btn:active {
            transform: scale(0.95);
        }
        /* Class added via JS to show it's playing */
        .speaker-playing {
            color: #4ADE80 !important; /* Bright Green */
            transform: scale(1.1);
        }
    