.os-taskbar, .taskbar-power-menu, .settings-win, .sleep-overlay {
    font-family: 'VT323', monospace;
}

.os-taskbar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 42px;
    display: flex;
    align-items: center;
    background: rgba(6, 2, 18, 0.97);
    border-top: 2px ridge #b142f5;
    box-shadow: 0 -2px 18px rgba(177, 66, 245, 0.18), 0 0 8px #b142f5;
    z-index: 9999;
    padding: 0 8px 0 0;
    user-select: none;
}

.taskbar-power-btn {
    flex-shrink: 0;
    width: 42px; height: 42px;
    background: none;
    border: none;
    border-right: 1px solid rgba(177, 66, 245, 0.3);
    color: #b142f5;
    font-size: 22px;
    cursor: none;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s, text-shadow 0.15s;
    line-height: 1; padding: 0;
}
.taskbar-power-btn:hover {
    background: rgba(177, 66, 245, 0.15);
    color: #d480ff;
    text-shadow: 0 0 8px #b142f5;
}

.taskbar-divider {
    width: 1px; height: 26px;
    background: rgba(177, 66, 245, 0.3);
    margin: 0 6px;
    flex-shrink: 0;
}

.taskbar-nav {
    display: flex; align-items: center; gap: 2px;
    flex: 1;
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none;
}
.taskbar-nav::-webkit-scrollbar { display: none; }

.taskbar-nav-btn {
    background: none;
    border: 1px solid transparent;
    color: rgba(200, 170, 255, 0.75);
    font-family: 'VT323', monospace;
    font-size: 17px;
    padding: 3px 10px 2px;
    cursor: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s, text-shadow 0.15s;
    line-height: 1;
    border-radius: 2px;
}
.taskbar-nav-btn:hover {
    background: rgba(177, 66, 245, 0.13);
    border-color: rgba(177, 66, 245, 0.4);
    color: #e0b0ff;
    text-shadow: 0 0 6px rgba(177, 66, 245, 0.7);
}
.taskbar-nav-btn.active {
    background: rgba(177, 66, 245, 0.22);
    border-color: rgba(177, 66, 245, 0.65);
    color: #d480ff;
    text-shadow: 0 0 8px #b142f5;
    box-shadow: 0 1px 0 rgba(177, 66, 245, 0.4) inset;
}

.taskbar-restore-btn {
    flex-shrink: 0;
    background: rgba(177, 66, 245, 0.18);
    border: 1px solid rgba(177, 66, 245, 0.55);
    color: #d480ff;
    font-family: 'VT323', monospace;
    font-size: 17px;
    padding: 3px 14px 2px;
    cursor: none;
    margin-left: auto;
    animation: restore-pulse 1.6s ease-in-out infinite;
    text-shadow: 0 0 6px rgba(177, 66, 245, 0.8);
    border-radius: 2px;
}
@keyframes restore-pulse {
    0%, 100% { box-shadow: 0 0 4px rgba(177, 66, 245, 0.3); }
    50%       { box-shadow: 0 0 12px rgba(177, 66, 245, 0.7); }
}

.taskbar-power-menu {
    position: fixed;
    min-width: 170px;
    background: rgba(6, 2, 18, 0.97);
    border: 2px ridge #b142f5;
    box-shadow: 0 0 24px rgba(177, 66, 245, 0.25), 0 0 8px #b142f5;
    z-index: 99999;
    padding: 4px 0;
    transform-origin: bottom left;
    transform: scaleY(0);
    opacity: 0;
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.14s ease;
    pointer-events: none;
}
.taskbar-power-menu.pmenu-visible {
    transform: scaleY(1); opacity: 1; pointer-events: auto;
}
.pmenu-item {
    display: block; width: 100%;
    background: none; border: none;
    color: rgba(210, 170, 255, 0.9);
    font-family: 'VT323', monospace; font-size: 19px;
    text-align: left; padding: 5px 18px 3px;
    cursor: none;
    transition: background 0.12s, color 0.12s, text-shadow 0.12s;
    line-height: 1.2;
}
.pmenu-item:hover { background: rgba(177,66,245,0.18); color: #e0b0ff; text-shadow: 0 0 7px rgba(177,66,245,0.8); }
.pmenu-item[data-action="shutdown"]:hover { color: #ff6680; text-shadow: 0 0 7px rgba(255,60,80,0.7); }
.pmenu-item[data-action="restart"]:hover  { color: #00e5ff; text-shadow: 0 0 7px rgba(0,229,255,0.7); }
.pmenu-item[data-action="sleep"]:hover    { color: #aaaaff; text-shadow: 0 0 7px rgba(120,120,255,0.7); }
.pmenu-sep { height: 1px; background: rgba(177,66,245,0.3); margin: 4px 10px; }

.title-bar::after { right: 44px !important; }
.title-bar {
    padding-right: 44px;
    padding-left: 50px;
    position: relative;
}

.title-bar-minimize-btn {
    position: absolute; right: 8px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 1px solid rgba(177, 66, 245, 0.4);
    color: rgba(200, 160, 255, 0.75);
    font-family: 'VT323', monospace; font-size: 18px;
    width: 26px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    cursor: none; padding: 0 0 2px; line-height: 1;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    border-radius: 2px; z-index: 2;
}
.title-bar-minimize-btn:hover {
    background: rgba(177, 66, 245, 0.2);
    border-color: rgba(177, 66, 245, 0.7);
    color: #d480ff;
    text-shadow: 0 0 6px rgba(177, 66, 245, 0.8);
}

.title-bar-resize-handle {
    position: absolute; left: 0; top: 0; bottom: 0; width: 14px;
    clip-path: polygon(0 0, 0 100%, 100% 0);
    background: rgba(177, 66, 245, 0.35);
    cursor: none; z-index: 2;
    transition: background 0.15s;
}
.title-bar-resize-handle:hover { background: rgba(177, 66, 245, 0.6); }

.title-bar-shell { max-height: calc(100vh - 44px) !important; }

@keyframes win-minimize {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to   { opacity: 0; transform: scale(0.7) translateY(40px); }
}
@keyframes win-restore {
    from { opacity: 0; transform: scale(0.7) translateY(40px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.title-bar-shell.win-minimizing {
    animation: win-minimize 0.28s ease-in forwards;
    pointer-events: none;
}
.title-bar-shell.win-restoring {
    animation: win-restore 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

.sleep-overlay {
    position: fixed; inset: 0; background: #000; opacity: 0;
    z-index: 999998; transition: opacity 0.55s ease; cursor: none;
}
.sleep-overlay.sleep-active { opacity: 1; }

#dragonKillCounter { bottom: 60px !important; }
#comboBarContainer {
    bottom: 48px !important;
    right: 20px !important;
    left: auto !important;
    transform: none !important;
    width: 200px !important;
}

.popup-drag-bar {
    display: flex; align-items: center; justify-content: space-between;
    margin: -20px -20px 16px -20px;
    padding: 6px 12px 5px 14px;
    background: rgba(177, 66, 245, 0.14);
    border-bottom: 1px solid rgba(177, 66, 245, 0.35);
    cursor: none; user-select: none;
    border-radius: 8px 8px 0 0;
}
.popup-drag-title {
    font-family: 'VT323', monospace; font-size: 19px;
    color: #d480ff;
    text-shadow: 0 0 8px rgba(177, 66, 245, 0.6);
    letter-spacing: 0.04em;
}
.popup-drag-bar .closePopup {
    background: none !important;
    border: 1px solid rgba(177, 66, 245, 0.4) !important;
    color: rgba(200, 160, 255, 0.7) !important;
    font-size: 15px !important;
    width: 24px !important; height: 20px !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    cursor: none !important; padding: 0 !important;
    position: static !important; top: auto !important; right: auto !important;
    transition: background 0.15s, color 0.15s;
    border-radius: 2px !important;
    font-family: 'VT323', monospace !important;
}
.popup-drag-bar .closePopup:hover {
    background: rgba(255, 60, 80, 0.2) !important;
    border-color: rgba(255, 60, 80, 0.6) !important;
    color: #ff6680 !important;
}

.settings-win {
    position: fixed; width: 380px;
    background: rgba(6, 2, 18, 0.98);
    border: 2px ridge #b142f5;
    box-shadow: 0 0 30px rgba(177, 66, 245, 0.25), 0 0 8px #b142f5;
    z-index: 99990;
    animation: win-restore 0.28s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}
.swin-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 10px 5px 14px;
    background: rgba(177, 66, 245, 0.14);
    border-bottom: 1px solid rgba(177, 66, 245, 0.4);
    cursor: none; user-select: none;
}
.swin-title {
    font-family: 'VT323', monospace; font-size: 20px;
    color: #d480ff;
    text-shadow: 0 0 8px rgba(177, 66, 245, 0.7);
    letter-spacing: 0.04em;
}
.swin-close {
    background: none;
    border: 1px solid rgba(177, 66, 245, 0.4);
    color: rgba(200, 160, 255, 0.7);
    font-family: 'VT323', monospace; font-size: 16px;
    width: 24px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    cursor: none; padding: 0;
    transition: background 0.15s, color 0.15s; border-radius: 2px;
}
.swin-close:hover { background: rgba(255,60,80,0.2); border-color: rgba(255,60,80,0.6); color: #ff6680; }

.swin-body { padding: 14px; display: flex; flex-direction: column; gap: 16px; }
.swin-section { display: flex; flex-direction: column; gap: 8px; }
.swin-heading {
    font-family: 'VT323', monospace; font-size: 14px;
    color: rgba(0, 229, 255, 0.7);
    text-transform: uppercase; letter-spacing: 0.12em;
    border-bottom: 1px solid rgba(0, 229, 255, 0.15); padding-bottom: 4px;
}

.swin-themes { display: flex; gap: 6px; flex-wrap: wrap; }
.swin-theme-btn {
    flex: 1; min-width: 80px;
    background: rgba(177, 66, 245, 0.08);
    border: 1px solid rgba(177, 66, 245, 0.35);
    color: rgba(200, 160, 255, 0.8);
    font-family: 'VT323', monospace; font-size: 16px;
    padding: 7px 6px 5px; cursor: none;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    border-radius: 2px; line-height: 1;
}
.swin-theme-btn:hover { background: rgba(177,66,245,0.18); border-color: rgba(177,66,245,0.6); color: #e0b0ff; }
.swin-theme-btn.active {
    background: rgba(177, 66, 245, 0.28);
    border-color: rgba(177, 66, 245, 0.85);
    color: #d480ff;
    text-shadow: 0 0 6px rgba(177, 66, 245, 0.8);
    box-shadow: 0 0 10px rgba(177, 66, 245, 0.2) inset;
}

.swin-swatch {
    width: 36px; height: 14px;
    border-radius: 2px;
    border: 1px solid rgba(255,255,255,0.12);
    display: block;
}
.swatch-arcane      { background: linear-gradient(90deg, #1a0b2e, #b142f5, #00e5ff); }
.swatch-dark-magic  { background: linear-gradient(90deg, #080810, #252535, #9090b0); }
.swatch-holy-magic  { background: linear-gradient(90deg, #f0f8ff, #ffd700, #fffef8); }
.swatch-fire-magic  { background: linear-gradient(90deg, #1a0500, #882200, #ff5500); }
.swatch-water-magic { background: linear-gradient(90deg, #000814, #004488, #00aadd); }
.swatch-earth-magic { background: linear-gradient(90deg, #080601, #3d6e20, #7ab840); }

.swin-toggle {
    display: flex; align-items: flex-start; gap: 10px;
    cursor: none; padding: 6px 8px;
    border: 1px solid transparent; border-radius: 2px;
    transition: background 0.15s, border-color 0.15s;
}
.swin-toggle:hover { background: rgba(177,66,245,0.08); border-color: rgba(177,66,245,0.2); }
.swin-toggle input[type="checkbox"] {
    margin-top: 3px; flex-shrink: 0;
    width: 14px; height: 14px; cursor: none; accent-color: #b142f5;
}
.swin-toggle-text { display: flex; flex-direction: column; gap: 2px; }
.swin-toggle-text span { font-family: 'VT323', monospace; font-size: 18px; color: rgba(210,175,255,0.9); line-height: 1; }
.swin-toggle-text small { font-family: 'VT323', monospace; font-size: 14px; color: rgba(150,120,200,0.65); line-height: 1.2; }

body.legacy-mouse, body.legacy-mouse * { cursor: url('/knights-glove.png') 4 4, auto !important; }
body.legacy-mouse:active, body.legacy-mouse *:active { cursor: url('/knights-click.png') 4 4, auto !important; }
body.legacy-scrollbars .custom-scrollbar-track,
body.legacy-scrollbars .custom-scrollbar-thumb,
body.legacy-scrollbars .custom-scrollbar-htrack,
body.legacy-scrollbars .custom-scrollbar-hthumb,
body.legacy-scrollbars [class*="scrollbar-track"],
body.legacy-scrollbars [class*="scrollbar-thumb"] { display: none !important; visibility: hidden !important; }
body.legacy-scrollbars .container { scrollbar-width: thin !important; overflow-y: scroll !important; }
body.legacy-scrollbars .container::-webkit-scrollbar { display: block !important; width: 10px; }
body.legacy-scrollbars .container::-webkit-scrollbar-track { background: rgba(10,5,25,0.8); }
body.legacy-scrollbars .container::-webkit-scrollbar-thumb { background: rgba(177,66,245,0.5); border: 1px solid rgba(177,66,245,0.7); }
body.legacy-scrollbars .container::-webkit-scrollbar-thumb:hover { background: rgba(177,66,245,0.75); }


body.theme-dark-magic { background-color: #060608 !important; }

body.theme-dark-magic .container {
    background: rgba(8, 8, 12, 0.92);
    border-color: #3a3a4a;
    box-shadow: 0 0 20px rgba(80, 80, 120, 0.3), inset 0 0 15px rgba(30, 30, 50, 0.8);
    color: #d0d0e8;
}
body.theme-dark-magic .container h1,
body.theme-dark-magic .container h2,
body.theme-dark-magic .container h3 { color: #b0b0d0; text-shadow: 2px 2px #05050a; }
body.theme-dark-magic .container a { color: #9090c0; }
body.theme-dark-magic .container a:hover { color: #d0d0f0; text-shadow: 0 0 6px rgba(100,100,160,0.5); }
body.theme-dark-magic .container nav { border-bottom-color: #3a3a4a; background: rgba(50, 50, 80, 0.1); }
body.theme-dark-magic .container hr { border-color: #3a3a4a; }
body.theme-dark-magic .container .box {
    border-color: #5a5a80;
    background: rgba(60, 60, 100, 0.06);
    box-shadow: 0 0 8px rgba(40,40,80,0.5), inset 0 0 8px rgba(60,60,100,0.1);
    animation: dm-box-pulse 4s ease-in-out infinite;
}
@keyframes dm-box-pulse {
    0%   { box-shadow: 0 0 8px rgba(40,40,80,0.4), inset 0 0 8px rgba(60,60,100,0.1); }
    50%  { box-shadow: 0 0 18px rgba(80,80,130,0.3), inset 0 0 12px rgba(80,80,120,0.15); }
    100% { box-shadow: 0 0 8px rgba(40,40,80,0.4), inset 0 0 8px rgba(60,60,100,0.1); }
}
body.theme-dark-magic .custom-scrollbar-thumb { border-color: #7070a0; }
body.theme-dark-magic .custom-scrollbar-thumb:hover,
body.theme-dark-magic .custom-scrollbar-thumb.dragging { border-color: #b0b0d0; }

body.theme-dark-magic .title-bar {
    background: linear-gradient(to right, #080808, #111118, #080808);
    border-color: #3a3a4a;
    box-shadow: 0 0 12px rgba(80, 80, 120, 0.3), inset 0 0 8px rgba(20, 20, 40, 0.9);
}
body.theme-dark-magic .title-bar-hint {
    color: #9090b0;
    animation: dm-title-flash 1.2s ease-in-out infinite alternate;
}
@keyframes dm-title-flash {
    0%   { opacity: 0.4; text-shadow: 0 0 6px #505070; }
    100% { opacity: 0.9; text-shadow: 0 0 14px #c0c0e0, 0 0 24px rgba(80,80,120,0.4); }
}
body.theme-dark-magic .title-bar::before,
body.theme-dark-magic .title-bar::after { color: #2a2a3a; text-shadow: none; }
body.theme-dark-magic .title-bar-resize-handle { background: rgba(80, 80, 120, 0.35); }
body.theme-dark-magic .title-bar-resize-handle:hover { background: rgba(100, 100, 160, 0.6); }
body.theme-dark-magic .title-bar-minimize-btn { border-color: rgba(80, 80, 120, 0.4); color: rgba(160, 160, 200, 0.75); }
body.theme-dark-magic .title-bar-minimize-btn:hover { background: rgba(80, 80, 120, 0.2); border-color: rgba(120, 120, 180, 0.7); color: #d0d0f0; text-shadow: 0 0 6px rgba(100,100,160,0.6); }

body.theme-dark-magic .os-taskbar {
    background: rgba(4, 4, 6, 0.98);
    border-top: 2px ridge #2a2a3a;
    box-shadow: 0 -2px 18px rgba(60, 60, 100, 0.14), 0 0 8px rgba(40, 40, 70, 0.35);
}
body.theme-dark-magic .taskbar-power-btn { color: #7070a0; border-right-color: rgba(60, 60, 100, 0.3); }
body.theme-dark-magic .taskbar-power-btn:hover { background: rgba(80, 80, 120, 0.15); color: #d0d0f0; text-shadow: 0 0 8px rgba(120,120,180,0.6); }
body.theme-dark-magic .taskbar-divider { background: rgba(60, 60, 100, 0.3); }
body.theme-dark-magic .taskbar-nav-btn { color: rgba(150, 150, 190, 0.7); }
body.theme-dark-magic .taskbar-nav-btn:hover { background: rgba(60, 60, 100, 0.12); border-color: rgba(80, 80, 130, 0.4); color: #d0d0f0; text-shadow: 0 0 6px rgba(100,100,160,0.5); }
body.theme-dark-magic .taskbar-nav-btn.active { background: rgba(60, 60, 100, 0.2); border-color: rgba(100, 100, 160, 0.6); color: #e0e0ff; text-shadow: 0 0 8px rgba(100,100,160,0.7); box-shadow: 0 1px 0 rgba(80, 80, 130, 0.4) inset; }
body.theme-dark-magic .taskbar-restore-btn { background: rgba(50, 50, 80, 0.2); border-color: rgba(80, 80, 130, 0.5); color: #b0b0d0; text-shadow: 0 0 6px rgba(80,80,130,0.6); animation: restore-pulse-dm 1.6s ease-in-out infinite; }
@keyframes restore-pulse-dm {
    0%, 100% { box-shadow: 0 0 4px rgba(60, 60, 100, 0.2); }
    50%       { box-shadow: 0 0 12px rgba(80, 80, 130, 0.5); }
}
body.theme-dark-magic .taskbar-power-menu { background: rgba(4, 4, 6, 0.98); border: 2px ridge #2a2a3a; box-shadow: 0 0 20px rgba(40, 40, 70, 0.3); }
body.theme-dark-magic .pmenu-item { color: rgba(160, 160, 200, 0.9); }
body.theme-dark-magic .pmenu-item:hover { background: rgba(60, 60, 100, 0.18); color: #e0e0ff; text-shadow: 0 0 7px rgba(100,100,160,0.5); }
body.theme-dark-magic .pmenu-sep { background: rgba(60, 60, 100, 0.25); }
body.theme-dark-magic .settings-win { background: rgba(5, 5, 8, 0.98); border: 2px ridge #2a2a3a; box-shadow: 0 0 24px rgba(40, 40, 70, 0.3); }
body.theme-dark-magic .swin-bar { background: rgba(50, 50, 80, 0.12); border-bottom-color: rgba(60, 60, 100, 0.35); }
body.theme-dark-magic .swin-title { color: #b0b0d0; text-shadow: 0 0 8px rgba(80,80,130,0.5); }
body.theme-dark-magic .swin-heading { color: rgba(130, 130, 170, 0.65); border-bottom-color: rgba(80, 80, 130, 0.15); }
body.theme-dark-magic .swin-toggle-text span { color: rgba(160, 160, 200, 0.9); }
body.theme-dark-magic .swin-toggle-text small { color: rgba(100, 100, 140, 0.6); }
body.theme-dark-magic .swin-theme-btn { background: rgba(50, 50, 80, 0.08); border-color: rgba(60, 60, 100, 0.3); color: rgba(140, 140, 180, 0.8); }
body.theme-dark-magic .swin-theme-btn:hover { background: rgba(60, 60, 100, 0.16); border-color: rgba(80, 80, 130, 0.5); color: #c0c0e0; }
body.theme-dark-magic .swin-theme-btn.active { background: rgba(60, 60, 100, 0.22); border-color: rgba(100, 100, 160, 0.75); color: #e0e0ff; text-shadow: 0 0 6px rgba(80,80,130,0.6); }
body.theme-dark-magic .swin-close { border-color: rgba(60, 60, 100, 0.4); color: rgba(140, 140, 180, 0.7); }
body.theme-dark-magic .swin-close:hover { background: rgba(255,60,80,0.2); border-color: rgba(255,60,80,0.6); color: #ff6680; }
body.theme-dark-magic .swin-toggle:hover { background: rgba(50, 50, 80, 0.08); border-color: rgba(60, 60, 100, 0.2); }
body.theme-dark-magic .popup { background: rgba(6, 6, 10, 0.97); border-color: rgba(60, 60, 100, 0.55); box-shadow: 0 0 20px rgba(30,30,60,0.4); color: #d0d0e8; }
body.theme-dark-magic .popup h2 { color: #c0c0e0; text-shadow: 0 0 8px rgba(80,80,130,0.4); }
body.theme-dark-magic .popup h3 { color: #9090b0; text-shadow: none; }
body.theme-dark-magic .popup-drag-bar { background: rgba(50, 50, 80, 0.12); border-bottom-color: rgba(60, 60, 100, 0.3); }
body.theme-dark-magic .popup-drag-title { color: #b0b0d0; text-shadow: 0 0 8px rgba(80,80,130,0.4); }
body.theme-dark-magic .popup-drag-bar .closePopup { border-color: rgba(60, 60, 100, 0.4) !important; color: rgba(140, 140, 180, 0.7) !important; }
body.theme-dark-magic #dragonKillCounter {
    border-color: #2a2a3a; border-style: solid;
    box-shadow: 0 0 12px rgba(60,60,100,0.4), inset 0 0 8px rgba(10,10,20,0.8);
    color: #c0c0e0; text-shadow: 0 0 8px rgba(80,80,130,0.5), 2px 2px #050508;
    background: rgba(4, 4, 8, 0.85);
}
body.theme-dark-magic #comboBarFill { background: linear-gradient(90deg, #3a3a5a, #a0a0d0); }
body.theme-dark-magic #comboBarContainer { border-color: rgba(60,60,100,0.4); background: rgba(4,4,8,0.7); }
body.theme-dark-magic #secretMenu.visible { border-color: #2a2a3a; box-shadow: 0 0 12px rgba(50,50,90,0.4), inset 0 0 8px rgba(10,10,20,0.8); }
body.theme-dark-magic .shop-item { box-shadow: 0 0 10px rgba(30,30,60,0.35); border-color: rgba(60,60,100,0.35); background: #0a0a10; }
body.theme-dark-magic .shop-item h3 { color: #c0c0e0; }
body.theme-dark-magic .shop-item .cost { color: #8080a8; }
body.theme-dark-magic .achievement { box-shadow: 0 0 10px rgba(20,20,50,0.35); border-color: rgba(60,60,100,0.3); background: #0a0a10; color: #d0d0e8; }
body.theme-dark-magic .achievement h3 { color: #9090b8; }
body.theme-dark-magic button { background: #1a1a28; border-color: #5a5a80; color: #c0c0e0; text-shadow: none; }
body.theme-dark-magic button:active { background: #0e0e1a; }
body.theme-dark-magic #prestigeStar { background: radial-gradient(circle at 30% 0%, #f0f0ff, #9090b0 40%, #303048 100%); box-shadow: 0 0 12px #8080a0, 0 0 24px rgba(40,40,80,0.5); color: #e8e8ff; }
body.theme-dark-magic .closePopup { background: #1a1a28; border-color: #5a5a80; color: #c0c0e0; }
body.theme-dark-magic .closePopup:hover { background: #2a2a40; }


body.theme-holy-magic { background-color: #f5f8ff !important; }

body.theme-holy-magic .container {
    background: rgba(255, 255, 255, 0.55);
    border-color: #c8a000;
    box-shadow: 0 0 30px rgba(200, 160, 0, 0.18), 0 0 60px rgba(255, 255, 255, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.3);
    color: #2a1e00;
}
body.theme-holy-magic .container h1,
body.theme-holy-magic .container h2,
body.theme-holy-magic .container h3 { color: #8a6a00; text-shadow: 1px 1px rgba(255,255,255,0.8); }
body.theme-holy-magic .container a { color: #7a5800; }
body.theme-holy-magic .container a:hover { color: #3a2800; text-shadow: 0 0 6px rgba(200,160,0,0.4); }
body.theme-holy-magic .container nav { border-bottom-color: rgba(200,160,0,0.3); background: rgba(255,255,255,0.3); }
body.theme-holy-magic .container hr { border-color: rgba(200,160,0,0.25); }
body.theme-holy-magic .container .box {
    border-color: rgba(200,160,0,0.5);
    background: rgba(255,255,255,0.35);
    box-shadow: 0 0 12px rgba(200,160,0,0.12), inset 0 0 10px rgba(255,255,255,0.4);
    animation: holy-box-pulse 4s ease-in-out infinite;
}
@keyframes holy-box-pulse {
    0%   { box-shadow: 0 0 8px rgba(200,160,0,0.1), inset 0 0 8px rgba(255,255,255,0.3); }
    50%  { box-shadow: 0 0 18px rgba(200,160,0,0.2), inset 0 0 14px rgba(255,255,255,0.5); }
    100% { box-shadow: 0 0 8px rgba(200,160,0,0.1), inset 0 0 8px rgba(255,255,255,0.3); }
}
body.theme-holy-magic .custom-scrollbar-thumb { border-color: #c8a000; }
body.theme-holy-magic .custom-scrollbar-thumb:hover,
body.theme-holy-magic .custom-scrollbar-thumb.dragging { border-color: #ffd700; }

body.theme-holy-magic .title-bar {
    background: linear-gradient(to right, #1c1600, #2e2400, #1c1600);
    border-color: #c8a000;
    box-shadow: 0 0 12px rgba(200, 160, 0, 0.35), inset 0 0 8px rgba(10,8,0,0.9);
}
body.theme-holy-magic .title-bar-hint {
    color: #ffd700;
    animation: holy-title-flash 1.2s ease-in-out infinite alternate;
}
@keyframes holy-title-flash {
    0%   { opacity: 0.5; text-shadow: 0 0 6px #c8a000; }
    100% { opacity: 1.0; text-shadow: 0 0 14px #ffd700, 0 0 28px rgba(255,220,80,0.4); }
}
body.theme-holy-magic .title-bar::before,
body.theme-holy-magic .title-bar::after { color: #8a6a00; text-shadow: none; }
body.theme-holy-magic .title-bar-resize-handle { background: rgba(200, 160, 0, 0.4); }
body.theme-holy-magic .title-bar-resize-handle:hover { background: rgba(220, 180, 0, 0.65); }
body.theme-holy-magic .title-bar-minimize-btn { border-color: rgba(200, 160, 0, 0.45); color: rgba(255, 215, 100, 0.8); }
body.theme-holy-magic .title-bar-minimize-btn:hover { background: rgba(200, 160, 0, 0.2); border-color: rgba(220, 180, 0, 0.7); color: #ffd700; text-shadow: 0 0 6px rgba(200,160,0,0.5); }
body.theme-holy-magic .os-taskbar {
    background: rgba(18, 14, 0, 0.98);
    border-top: 2px ridge #c8a000;
    box-shadow: 0 -2px 18px rgba(200, 160, 0, 0.2), 0 0 8px rgba(200, 160, 0, 0.3);
}
body.theme-holy-magic .taskbar-power-btn { color: #c8a000; border-right-color: rgba(200, 160, 0, 0.3); }
body.theme-holy-magic .taskbar-power-btn:hover { background: rgba(200, 160, 0, 0.15); color: #ffd700; text-shadow: 0 0 8px #c8a000; }
body.theme-holy-magic .taskbar-divider { background: rgba(200, 160, 0, 0.3); }
body.theme-holy-magic .taskbar-nav-btn { color: rgba(215, 180, 70, 0.75); }
body.theme-holy-magic .taskbar-nav-btn:hover { background: rgba(200, 160, 0, 0.13); border-color: rgba(200, 160, 0, 0.4); color: #ffe44d; text-shadow: 0 0 6px rgba(200,160,0,0.6); }
body.theme-holy-magic .taskbar-nav-btn.active { background: rgba(200, 160, 0, 0.2); border-color: rgba(220, 180, 0, 0.65); color: #ffd700; text-shadow: 0 0 8px #c8a000; box-shadow: 0 1px 0 rgba(200, 160, 0, 0.4) inset; }
body.theme-holy-magic .taskbar-restore-btn { background: rgba(200, 160, 0, 0.18); border-color: rgba(220, 180, 0, 0.55); color: #ffd700; text-shadow: 0 0 6px rgba(200,160,0,0.8); animation: restore-pulse-holy 1.6s ease-in-out infinite; }
@keyframes restore-pulse-holy {
    0%, 100% { box-shadow: 0 0 4px rgba(200, 160, 0, 0.3); }
    50%       { box-shadow: 0 0 14px rgba(220, 180, 0, 0.65), 0 0 4px rgba(255, 230, 100, 0.25); }
}
body.theme-holy-magic .taskbar-power-menu { background: rgba(18, 14, 0, 0.98); border: 2px ridge #c8a000; box-shadow: 0 0 24px rgba(200, 160, 0, 0.25); }
body.theme-holy-magic .pmenu-item { color: rgba(215, 180, 70, 0.9); }
body.theme-holy-magic .pmenu-item:hover { background: rgba(200, 160, 0, 0.18); color: #ffe44d; text-shadow: 0 0 7px rgba(200,160,0,0.7); }
body.theme-holy-magic .pmenu-sep { background: rgba(200, 160, 0, 0.3); }
body.theme-holy-magic .settings-win { background: rgba(18, 14, 0, 0.98); border: 2px ridge #c8a000; box-shadow: 0 0 28px rgba(200, 160, 0, 0.25); }
body.theme-holy-magic .swin-bar { background: rgba(200, 160, 0, 0.12); border-bottom-color: rgba(200, 160, 0, 0.4); }
body.theme-holy-magic .swin-title { color: #ffd700; text-shadow: 0 0 8px rgba(200,160,0,0.6); }
body.theme-holy-magic .swin-heading { color: rgba(255, 215, 60, 0.65); border-bottom-color: rgba(200, 160, 0, 0.15); }
body.theme-holy-magic .swin-toggle-text span { color: rgba(215, 185, 70, 0.9); }
body.theme-holy-magic .swin-toggle-text small { color: rgba(155, 120, 30, 0.65); }
body.theme-holy-magic .swin-theme-btn { background: rgba(200, 160, 0, 0.08); border-color: rgba(200, 160, 0, 0.3); color: rgba(215, 180, 70, 0.8); }
body.theme-holy-magic .swin-theme-btn:hover { background: rgba(200, 160, 0, 0.18); border-color: rgba(220, 180, 0, 0.55); color: #ffd700; }
body.theme-holy-magic .swin-theme-btn.active { background: rgba(200, 160, 0, 0.25); border-color: rgba(220, 180, 0, 0.8); color: #ffd700; text-shadow: 0 0 6px rgba(200,160,0,0.7); }
body.theme-holy-magic .swin-close { border-color: rgba(200, 160, 0, 0.4); color: rgba(215, 180, 70, 0.7); }
body.theme-holy-magic .swin-close:hover { background: rgba(255,60,80,0.2); border-color: rgba(255,60,80,0.6); color: #ff6680; }
body.theme-holy-magic .swin-toggle:hover { background: rgba(200, 160, 0, 0.08); border-color: rgba(200, 160, 0, 0.2); }
body.theme-holy-magic .popup {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(200, 160, 0, 0.6);
    box-shadow: 0 0 30px rgba(200,160,0,0.15), 0 0 50px rgba(255,255,255,0.3);
    color: #2a1e00;
}
body.theme-holy-magic .popup h2 { color: #8a6a00; text-shadow: none; }
body.theme-holy-magic .popup h3 { color: #6a4e00; text-shadow: none; }
body.theme-holy-magic .popup-drag-bar { background: rgba(200, 160, 0, 0.12); border-bottom-color: rgba(200, 160, 0, 0.3); }
body.theme-holy-magic .popup-drag-title { color: #a07800; text-shadow: 0 0 6px rgba(200,160,0,0.2); }
body.theme-holy-magic .popup-drag-bar .closePopup { border-color: rgba(200, 160, 0, 0.4) !important; color: rgba(160, 120, 0, 0.7) !important; }
body.theme-holy-magic #dragonKillCounter {
    border-color: #c8a000; border-style: solid;
    box-shadow: 0 0 16px rgba(200,160,0,0.4), 0 0 30px rgba(255,255,255,0.3), inset 0 0 10px rgba(255,255,255,0.2);
    color: #a07800; text-shadow: 0 0 8px rgba(200,160,0,0.4), 1px 1px rgba(255,255,255,0.8);
    background: rgba(255, 255, 255, 0.6);
}
body.theme-holy-magic #comboBarFill { background: linear-gradient(90deg, #c8a000, #ffd700, #fff8aa); }
body.theme-holy-magic #comboBarContainer { border-color: rgba(200, 160, 0, 0.5); background: rgba(255, 255, 255, 0.5); }
body.theme-holy-magic #secretMenu.visible {
    border-color: #c8a000;
    box-shadow: 0 0 16px rgba(200,160,0,0.3), inset 0 0 10px rgba(255,255,255,0.2);
}
body.theme-holy-magic .shop-item {
    box-shadow: 0 0 12px rgba(200,160,0,0.15), inset 0 0 8px rgba(255,255,255,0.3);
    border-color: rgba(200, 160, 0, 0.4);
    background: rgba(255, 255, 255, 0.65);
    color: #2a1e00;
}
body.theme-holy-magic .shop-item h3 { color: #8a6a00; }
body.theme-holy-magic .shop-item .cost { color: #6a4e00; }
body.theme-holy-magic .achievement {
    box-shadow: 0 0 10px rgba(200,160,0,0.12), inset 0 0 6px rgba(255,255,255,0.3);
    border-color: rgba(200, 160, 0, 0.35);
    background: rgba(255, 255, 255, 0.65);
    color: #2a1e00;
}
body.theme-holy-magic .achievement h3 { color: #a07800; }
body.theme-holy-magic .achievement.unclaimed { animation: glow-gold 2s infinite alternate; }
@keyframes glow-gold { from { box-shadow: 0 0 5px #c8a000; } to { box-shadow: 0 0 15px #ffd700, 0 0 25px rgba(255,255,255,0.4); } }
body.theme-holy-magic button { background: rgba(200,160,0,0.85); border-color: #ffd700; color: #1a1200; text-shadow: none; border-style: outset; }
body.theme-holy-magic button:active { background: rgba(150,120,0,0.9); border-style: inset; }
body.theme-holy-magic #prestigeStar { background: radial-gradient(circle at 30% 0%, #ffffff, #ffd700 40%, #c8a000 100%); box-shadow: 0 0 14px #ffd700, 0 0 28px rgba(255,255,255,0.5); color: #2a1e00; }
body.theme-holy-magic .closePopup { background: rgba(200,160,0,0.85); border-color: #ffd700; color: #1a1200; border-style: outset; }
body.theme-holy-magic .closePopup:hover { background: rgba(220,180,0,0.9); }


body.theme-fire-magic { background-color: #0e0400 !important; }

body.theme-fire-magic .container {
    background: rgba(14, 5, 0, 0.92);
    border-color: #882200;
    box-shadow: 0 0 20px rgba(180, 50, 0, 0.3), inset 0 0 15px rgba(60, 12, 0, 0.7);
    color: #f0c090;
}
body.theme-fire-magic .container h1,
body.theme-fire-magic .container h2,
body.theme-fire-magic .container h3 { color: #ff7733; text-shadow: 3px 3px #1a0500; }
body.theme-fire-magic .container a { color: #ff9944; }
body.theme-fire-magic .container a:hover { color: #ffcc88; text-shadow: 0 0 8px rgba(200,60,0,0.6); }
body.theme-fire-magic .container nav { border-bottom-color: #661100; background: rgba(180, 50, 0, 0.1); }
body.theme-fire-magic .container hr { border-color: #551100; }
body.theme-fire-magic .container .box {
    border-color: #883300;
    background: rgba(180, 50, 0, 0.07);
    box-shadow: 0 0 8px rgba(100,20,0,0.5), inset 0 0 8px rgba(60,10,0,0.3);
    animation: fire-box-pulse 4s ease-in-out infinite;
}
@keyframes fire-box-pulse {
    0%   { box-shadow: 0 0 8px rgba(100,20,0,0.4), inset 0 0 8px rgba(60,10,0,0.2); }
    50%  { box-shadow: 0 0 18px rgba(180,50,0,0.35), inset 0 0 12px rgba(100,25,0,0.25); }
    100% { box-shadow: 0 0 8px rgba(100,20,0,0.4), inset 0 0 8px rgba(60,10,0,0.2); }
}
body.theme-fire-magic .custom-scrollbar-thumb { border-color: #882200; }
body.theme-fire-magic .custom-scrollbar-thumb:hover,
body.theme-fire-magic .custom-scrollbar-thumb.dragging { border-color: #ff5500; }

body.theme-fire-magic .title-bar {
    background: linear-gradient(to right, #120400, #200800, #120400);
    border-color: #882200;
    box-shadow: 0 0 12px rgba(180, 50, 0, 0.35), inset 0 0 8px rgba(8,2,0,0.9);
}
body.theme-fire-magic .title-bar-hint { color: #ff5500; animation: fire-title-flash 0.9s ease-in-out infinite alternate; }
@keyframes fire-title-flash {
    0%   { opacity: 0.5; text-shadow: 0 0 6px #882200; }
    100% { opacity: 1.0; text-shadow: 0 0 14px #ff6600, 0 0 28px rgba(255,100,0,0.4); }
}
body.theme-fire-magic .title-bar::before,
body.theme-fire-magic .title-bar::after { color: #551100; text-shadow: none; }
body.theme-fire-magic .title-bar-resize-handle { background: rgba(180, 50, 0, 0.4); }
body.theme-fire-magic .title-bar-resize-handle:hover { background: rgba(210, 70, 0, 0.65); }
body.theme-fire-magic .title-bar-minimize-btn { border-color: rgba(180, 50, 0, 0.45); color: rgba(255, 140, 60, 0.8); }
body.theme-fire-magic .title-bar-minimize-btn:hover { background: rgba(180, 50, 0, 0.2); border-color: rgba(220, 70, 0, 0.7); color: #ff6600; text-shadow: 0 0 6px rgba(200,60,0,0.5); }
body.theme-fire-magic .os-taskbar {
    background: rgba(8, 2, 0, 0.98);
    border-top: 2px ridge #882200;
    box-shadow: 0 -2px 18px rgba(160, 40, 0, 0.22), 0 0 8px rgba(180, 50, 0, 0.35);
}
body.theme-fire-magic .taskbar-power-btn { color: #cc3300; border-right-color: rgba(150, 40, 0, 0.3); }
body.theme-fire-magic .taskbar-power-btn:hover { background: rgba(180, 50, 0, 0.15); color: #ff5500; text-shadow: 0 0 8px #cc3300; }
body.theme-fire-magic .taskbar-divider { background: rgba(150, 40, 0, 0.3); }
body.theme-fire-magic .taskbar-nav-btn { color: rgba(220, 130, 60, 0.75); }
body.theme-fire-magic .taskbar-nav-btn:hover { background: rgba(180, 50, 0, 0.13); border-color: rgba(200, 60, 0, 0.4); color: #ff7733; text-shadow: 0 0 6px rgba(200,60,0,0.6); }
body.theme-fire-magic .taskbar-nav-btn.active { background: rgba(180, 50, 0, 0.22); border-color: rgba(220, 70, 0, 0.65); color: #ff5500; text-shadow: 0 0 8px #cc3300; box-shadow: 0 1px 0 rgba(180, 50, 0, 0.4) inset; }
body.theme-fire-magic .taskbar-restore-btn { background: rgba(160, 40, 0, 0.2); border-color: rgba(200, 60, 0, 0.55); color: #ff5500; text-shadow: 0 0 6px rgba(200,60,0,0.8); animation: restore-pulse-fire 1.3s ease-in-out infinite; }
@keyframes restore-pulse-fire {
    0%, 100% { box-shadow: 0 0 4px rgba(180, 50, 0, 0.3); }
    50%       { box-shadow: 0 0 16px rgba(220, 80, 0, 0.7), 0 0 4px rgba(255, 120, 0, 0.25); }
}
body.theme-fire-magic .taskbar-power-menu { background: rgba(8, 2, 0, 0.98); border: 2px ridge #882200; box-shadow: 0 0 24px rgba(160, 40, 0, 0.3); }
body.theme-fire-magic .pmenu-item { color: rgba(220, 130, 60, 0.9); }
body.theme-fire-magic .pmenu-item:hover { background: rgba(180, 50, 0, 0.18); color: #ff7733; text-shadow: 0 0 7px rgba(200,60,0,0.7); }
body.theme-fire-magic .pmenu-sep { background: rgba(150, 40, 0, 0.3); }
body.theme-fire-magic .settings-win { background: rgba(8, 2, 0, 0.98); border: 2px ridge #882200; box-shadow: 0 0 28px rgba(160, 40, 0, 0.3); }
body.theme-fire-magic .swin-bar { background: rgba(160, 40, 0, 0.12); border-bottom-color: rgba(180, 50, 0, 0.4); }
body.theme-fire-magic .swin-title { color: #ff5500; text-shadow: 0 0 8px rgba(200,60,0,0.6); }
body.theme-fire-magic .swin-heading { color: rgba(255, 140, 60, 0.65); border-bottom-color: rgba(200, 60, 0, 0.15); }
body.theme-fire-magic .swin-toggle-text span { color: rgba(220, 140, 60, 0.9); }
body.theme-fire-magic .swin-toggle-text small { color: rgba(155, 75, 25, 0.65); }
body.theme-fire-magic .swin-theme-btn { background: rgba(160, 40, 0, 0.08); border-color: rgba(180, 50, 0, 0.3); color: rgba(210, 120, 50, 0.8); }
body.theme-fire-magic .swin-theme-btn:hover { background: rgba(180, 50, 0, 0.18); border-color: rgba(210, 65, 0, 0.55); color: #ff7733; }
body.theme-fire-magic .swin-theme-btn.active { background: rgba(180, 50, 0, 0.25); border-color: rgba(220, 70, 0, 0.8); color: #ff5500; text-shadow: 0 0 6px rgba(200,60,0,0.7); }
body.theme-fire-magic .swin-close { border-color: rgba(180, 50, 0, 0.4); color: rgba(210, 120, 50, 0.7); }
body.theme-fire-magic .swin-close:hover { background: rgba(255,80,0,0.2); border-color: rgba(255,100,0,0.6); color: #ff7733; }
body.theme-fire-magic .swin-toggle:hover { background: rgba(160, 40, 0, 0.08); border-color: rgba(180, 50, 0, 0.2); }
body.theme-fire-magic .popup { background: rgba(10, 3, 0, 0.97); border-color: rgba(160, 50, 0, 0.6); box-shadow: 0 0 20px rgba(180,50,0,0.25); color: #f0c090; }
body.theme-fire-magic .popup h2 { color: #ff7733; text-shadow: 0 0 8px rgba(200,60,0,0.4); }
body.theme-fire-magic .popup h3 { color: #cc4400; text-shadow: none; }
body.theme-fire-magic .popup-drag-bar { background: rgba(160, 40, 0, 0.12); border-bottom-color: rgba(180, 50, 0, 0.35); }
body.theme-fire-magic .popup-drag-title { color: #ff5500; text-shadow: 0 0 6px rgba(200,60,0,0.4); }
body.theme-fire-magic .popup-drag-bar .closePopup { border-color: rgba(180, 50, 0, 0.4) !important; color: rgba(210, 120, 50, 0.7) !important; }
body.theme-fire-magic #dragonKillCounter {
    border-color: #882200; border-style: solid;
    box-shadow: 0 0 12px rgba(180,50,0,0.55), inset 0 0 8px rgba(40,8,0,0.8);
    color: #ff5500; text-shadow: 0 0 8px rgba(200,60,0,0.5), 2px 2px #0e0400;
    background: rgba(8, 2, 0, 0.9);
}
body.theme-fire-magic #comboBarFill { background: linear-gradient(90deg, #551100, #cc3300, #ff7722); }
body.theme-fire-magic #comboBarContainer { border-color: rgba(150, 40, 0, 0.5); background: rgba(8, 2, 0, 0.85); }
body.theme-fire-magic #secretMenu.visible { border-color: #882200; box-shadow: 0 0 12px rgba(180,50,0,0.4), inset 0 0 8px rgba(25,5,0,0.8); }
body.theme-fire-magic .shop-item { box-shadow: 0 0 10px rgba(150,40,0,0.3); border-color: rgba(160, 50, 0, 0.4); background: #110400; color: #f0c090; }
body.theme-fire-magic .shop-item h3 { color: #ff7733; }
body.theme-fire-magic .shop-item .cost { color: #cc5500; }
body.theme-fire-magic .achievement { box-shadow: 0 0 10px rgba(120,30,0,0.3); border-color: rgba(150, 40, 0, 0.3); background: #110400; color: #f0c090; }
body.theme-fire-magic .achievement h3 { color: #dd4400; }
body.theme-fire-magic button { background: #882200; border-color: #ff5500; color: #ffd0a0; text-shadow: none; border-style: outset; }
body.theme-fire-magic button:active { background: #5c1500; border-style: inset; }
body.theme-fire-magic #prestigeStar { background: radial-gradient(circle at 30% 0%, #ffcc88, #ff5500 40%, #882200 100%); box-shadow: 0 0 14px #ff5500, 0 0 28px rgba(180,50,0,0.5); color: #0e0400; }
body.theme-fire-magic .closePopup { background: #882200; border-color: #ff5500; color: #ffd0a0; border-style: outset; }
body.theme-fire-magic .closePopup:hover { background: #aa2a00; }


body.theme-water-magic { background-color: #000814 !important; }

body.theme-water-magic .container {
    background: rgba(0, 8, 22, 0.92);
    border-color: #004488;
    box-shadow: 0 0 20px rgba(0, 80, 180, 0.3), inset 0 0 15px rgba(0, 25, 70, 0.7);
    color: #88ccee;
}
body.theme-water-magic .container h1,
body.theme-water-magic .container h2,
body.theme-water-magic .container h3 { color: #33bbee; text-shadow: 3px 3px #000814; }
body.theme-water-magic .container a { color: #55aadd; }
body.theme-water-magic .container a:hover { color: #aaddff; text-shadow: 0 0 8px rgba(0,120,200,0.6); }
body.theme-water-magic .container nav { border-bottom-color: #003366; background: rgba(0, 80, 180, 0.1); }
body.theme-water-magic .container hr { border-color: #002255; }
body.theme-water-magic .container .box {
    border-color: #005588;
    background: rgba(0, 80, 180, 0.06);
    box-shadow: 0 0 8px rgba(0,40,100,0.5), inset 0 0 8px rgba(0,30,80,0.3);
    animation: water-box-pulse 4s ease-in-out infinite;
}
@keyframes water-box-pulse {
    0%   { box-shadow: 0 0 8px rgba(0,40,100,0.4), inset 0 0 8px rgba(0,30,80,0.2); }
    50%  { box-shadow: 0 0 18px rgba(0,80,180,0.3), inset 0 0 12px rgba(0,60,140,0.25); }
    100% { box-shadow: 0 0 8px rgba(0,40,100,0.4), inset 0 0 8px rgba(0,30,80,0.2); }
}
body.theme-water-magic .custom-scrollbar-thumb { border-color: #004488; }
body.theme-water-magic .custom-scrollbar-thumb:hover,
body.theme-water-magic .custom-scrollbar-thumb.dragging { border-color: #00aadd; }

body.theme-water-magic .title-bar {
    background: linear-gradient(to right, #000812, #001022, #000812);
    border-color: #004488;
    box-shadow: 0 0 12px rgba(0, 80, 180, 0.35), inset 0 0 8px rgba(0,5,20,0.9);
}
body.theme-water-magic .title-bar-hint { color: #00aadd; animation: water-title-flash 1.4s ease-in-out infinite alternate; }
@keyframes water-title-flash {
    0%   { opacity: 0.4; text-shadow: 0 0 6px #005588; }
    100% { opacity: 0.95; text-shadow: 0 0 14px #00ccff, 0 0 28px rgba(0,160,220,0.4); }
}
body.theme-water-magic .title-bar::before,
body.theme-water-magic .title-bar::after { color: #002255; text-shadow: none; }
body.theme-water-magic .title-bar-resize-handle { background: rgba(0, 80, 180, 0.4); }
body.theme-water-magic .title-bar-resize-handle:hover { background: rgba(0, 110, 200, 0.65); }
body.theme-water-magic .title-bar-minimize-btn { border-color: rgba(0, 80, 180, 0.45); color: rgba(80, 180, 255, 0.8); }
body.theme-water-magic .title-bar-minimize-btn:hover { background: rgba(0, 80, 180, 0.2); border-color: rgba(0, 120, 220, 0.7); color: #00ccff; text-shadow: 0 0 6px rgba(0,120,200,0.5); }
body.theme-water-magic .os-taskbar {
    background: rgba(0, 4, 14, 0.98);
    border-top: 2px ridge #004488;
    box-shadow: 0 -2px 18px rgba(0, 70, 170, 0.2), 0 0 8px rgba(0, 80, 180, 0.3);
}
body.theme-water-magic .taskbar-power-btn { color: #0077bb; border-right-color: rgba(0, 80, 160, 0.3); }
body.theme-water-magic .taskbar-power-btn:hover { background: rgba(0, 80, 180, 0.15); color: #00aadd; text-shadow: 0 0 8px #0077bb; }
body.theme-water-magic .taskbar-divider { background: rgba(0, 80, 160, 0.3); }
body.theme-water-magic .taskbar-nav-btn { color: rgba(60, 170, 230, 0.75); }
body.theme-water-magic .taskbar-nav-btn:hover { background: rgba(0, 80, 180, 0.13); border-color: rgba(0, 100, 200, 0.4); color: #33bbee; text-shadow: 0 0 6px rgba(0,100,200,0.6); }
body.theme-water-magic .taskbar-nav-btn.active { background: rgba(0, 80, 180, 0.2); border-color: rgba(0, 120, 210, 0.65); color: #00aadd; text-shadow: 0 0 8px #0077bb; box-shadow: 0 1px 0 rgba(0, 80, 160, 0.4) inset; }
body.theme-water-magic .taskbar-restore-btn { background: rgba(0, 70, 160, 0.2); border-color: rgba(0, 110, 200, 0.55); color: #00aadd; text-shadow: 0 0 6px rgba(0,100,200,0.8); animation: restore-pulse-water 1.6s ease-in-out infinite; }
@keyframes restore-pulse-water {
    0%, 100% { box-shadow: 0 0 4px rgba(0, 80, 180, 0.3); }
    50%       { box-shadow: 0 0 14px rgba(0, 140, 210, 0.6), 0 0 4px rgba(0, 180, 240, 0.25); }
}
body.theme-water-magic .taskbar-power-menu { background: rgba(0, 4, 14, 0.98); border: 2px ridge #004488; box-shadow: 0 0 24px rgba(0, 70, 170, 0.3); }
body.theme-water-magic .pmenu-item { color: rgba(60, 170, 230, 0.9); }
body.theme-water-magic .pmenu-item:hover { background: rgba(0, 80, 180, 0.18); color: #33bbee; text-shadow: 0 0 7px rgba(0,100,200,0.7); }
body.theme-water-magic .pmenu-sep { background: rgba(0, 80, 160, 0.3); }
body.theme-water-magic .settings-win { background: rgba(0, 4, 14, 0.98); border: 2px ridge #004488; box-shadow: 0 0 28px rgba(0, 70, 170, 0.3); }
body.theme-water-magic .swin-bar { background: rgba(0, 80, 180, 0.12); border-bottom-color: rgba(0, 90, 180, 0.4); }
body.theme-water-magic .swin-title { color: #00aadd; text-shadow: 0 0 8px rgba(0,100,200,0.6); }
body.theme-water-magic .swin-heading { color: rgba(40, 170, 230, 0.65); border-bottom-color: rgba(0, 120, 200, 0.15); }
body.theme-water-magic .swin-toggle-text span { color: rgba(60, 170, 230, 0.9); }
body.theme-water-magic .swin-toggle-text small { color: rgba(30, 105, 165, 0.65); }
body.theme-water-magic .swin-theme-btn { background: rgba(0, 80, 180, 0.08); border-color: rgba(0, 90, 180, 0.3); color: rgba(50, 160, 220, 0.8); }
body.theme-water-magic .swin-theme-btn:hover { background: rgba(0, 80, 180, 0.18); border-color: rgba(0, 120, 210, 0.55); color: #33bbee; }
body.theme-water-magic .swin-theme-btn.active { background: rgba(0, 80, 180, 0.25); border-color: rgba(0, 130, 210, 0.8); color: #00aadd; text-shadow: 0 0 6px rgba(0,100,200,0.7); }
body.theme-water-magic .swin-close { border-color: rgba(0, 90, 180, 0.4); color: rgba(50, 160, 220, 0.7); }
body.theme-water-magic .swin-close:hover { background: rgba(255,60,80,0.2); border-color: rgba(255,60,80,0.6); color: #ff6680; }
body.theme-water-magic .swin-toggle:hover { background: rgba(0, 80, 180, 0.08); border-color: rgba(0, 90, 180, 0.2); }
body.theme-water-magic .popup { background: rgba(0, 6, 18, 0.97); border-color: rgba(0, 90, 180, 0.6); box-shadow: 0 0 20px rgba(0,80,180,0.25); color: #88ccee; }
body.theme-water-magic .popup h2 { color: #33bbee; text-shadow: 0 0 8px rgba(0,120,200,0.4); }
body.theme-water-magic .popup h3 { color: #0099cc; text-shadow: none; }
body.theme-water-magic .popup-drag-bar { background: rgba(0, 80, 180, 0.12); border-bottom-color: rgba(0, 90, 180, 0.35); }
body.theme-water-magic .popup-drag-title { color: #00aadd; text-shadow: 0 0 6px rgba(0,100,200,0.4); }
body.theme-water-magic .popup-drag-bar .closePopup { border-color: rgba(0, 90, 180, 0.4) !important; color: rgba(50, 160, 220, 0.7) !important; }
body.theme-water-magic #dragonKillCounter {
    border-color: #004488; border-style: solid;
    box-shadow: 0 0 12px rgba(0,100,200,0.5), inset 0 0 8px rgba(0,15,50,0.8);
    color: #00aadd; text-shadow: 0 0 8px rgba(0,120,200,0.5), 2px 2px #000814;
    background: rgba(0, 4, 14, 0.9);
}
body.theme-water-magic #comboBarFill { background: linear-gradient(90deg, #002255, #0077bb, #00ccff); }
body.theme-water-magic #comboBarContainer { border-color: rgba(0, 80, 160, 0.5); background: rgba(0, 4, 14, 0.85); }
body.theme-water-magic #secretMenu.visible { border-color: #004488; box-shadow: 0 0 12px rgba(0,100,200,0.4), inset 0 0 8px rgba(0,10,35,0.8); }
body.theme-water-magic .shop-item { box-shadow: 0 0 10px rgba(0,80,180,0.3); border-color: rgba(0, 90, 180, 0.4); background: #00060e; color: #88ccee; }
body.theme-water-magic .shop-item h3 { color: #33bbee; }
body.theme-water-magic .shop-item .cost { color: #0099bb; }
body.theme-water-magic .achievement { box-shadow: 0 0 10px rgba(0,60,140,0.3); border-color: rgba(0, 80, 160, 0.3); background: #00060e; color: #88ccee; }
body.theme-water-magic .achievement h3 { color: #0099cc; }
body.theme-water-magic button { background: #004488; border-color: #00aadd; color: #aaeeff; text-shadow: none; border-style: outset; }
body.theme-water-magic button:active { background: #002d5a; border-style: inset; }
body.theme-water-magic #prestigeStar { background: radial-gradient(circle at 30% 0%, #aaeeff, #00aadd 40%, #004488 100%); box-shadow: 0 0 14px #00aadd, 0 0 28px rgba(0,100,200,0.4); color: #000814; }
body.theme-water-magic .closePopup { background: #004488; border-color: #00aadd; color: #aaeeff; border-style: outset; }
body.theme-water-magic .closePopup:hover { background: #005599; }


body.theme-earth-magic { background-color: #080601 !important; }

body.theme-earth-magic .container {
    background: rgba(10, 8, 2, 0.92);
    border-color: #3d6e20;
    box-shadow: 0 0 20px rgba(50, 90, 20, 0.3), inset 0 0 15px rgba(18, 30, 4, 0.7);
    color: #c8e890;
}
body.theme-earth-magic .container h1,
body.theme-earth-magic .container h2,
body.theme-earth-magic .container h3 { color: #8dc840; text-shadow: 3px 3px #080601; }
body.theme-earth-magic .container a { color: #7ab840; }
body.theme-earth-magic .container a:hover { color: #c8e890; text-shadow: 0 0 8px rgba(80,130,30,0.6); }
body.theme-earth-magic .container nav { border-bottom-color: #2a4a10; background: rgba(60, 100, 25, 0.1); }
body.theme-earth-magic .container hr { border-color: #243c10; }
body.theme-earth-magic .container .box {
    border-color: #4a7a25;
    background: rgba(60, 100, 25, 0.07);
    box-shadow: 0 0 8px rgba(25,50,8,0.5), inset 0 0 8px rgba(20,38,5,0.3);
    animation: earth-box-pulse 4s ease-in-out infinite;
}
@keyframes earth-box-pulse {
    0%   { box-shadow: 0 0 8px rgba(25,50,8,0.4), inset 0 0 8px rgba(20,38,5,0.2); }
    50%  { box-shadow: 0 0 18px rgba(60,100,20,0.3), inset 0 0 12px rgba(40,70,12,0.25); }
    100% { box-shadow: 0 0 8px rgba(25,50,8,0.4), inset 0 0 8px rgba(20,38,5,0.2); }
}
body.theme-earth-magic .custom-scrollbar-thumb { border-color: #3d6e20; }
body.theme-earth-magic .custom-scrollbar-thumb:hover,
body.theme-earth-magic .custom-scrollbar-thumb.dragging { border-color: #7ab840; }

body.theme-earth-magic .title-bar {
    background: linear-gradient(to right, #0a0800, #141000, #0a0800);
    border-color: #3d6e20;
    box-shadow: 0 0 12px rgba(50, 90, 20, 0.35), inset 0 0 8px rgba(5,4,0,0.9);
}
body.theme-earth-magic .title-bar-hint { color: #7ab840; animation: earth-title-flash 1.6s ease-in-out infinite alternate; }
@keyframes earth-title-flash {
    0%   { opacity: 0.45; text-shadow: 0 0 6px #3d6e20; }
    100% { opacity: 0.95; text-shadow: 0 0 14px #8dc840, 0 0 28px rgba(100,160,40,0.35); }
}
body.theme-earth-magic .title-bar::before,
body.theme-earth-magic .title-bar::after { color: #243c10; text-shadow: none; }
body.theme-earth-magic .title-bar-resize-handle { background: rgba(60, 100, 25, 0.4); }
body.theme-earth-magic .title-bar-resize-handle:hover { background: rgba(80, 130, 30, 0.65); }
body.theme-earth-magic .title-bar-minimize-btn { border-color: rgba(60, 100, 25, 0.45); color: rgba(140, 195, 70, 0.8); }
body.theme-earth-magic .title-bar-minimize-btn:hover { background: rgba(60, 100, 25, 0.2); border-color: rgba(90, 140, 35, 0.7); color: #8dc840; text-shadow: 0 0 6px rgba(80,130,30,0.5); }
body.theme-earth-magic .os-taskbar {
    background: rgba(5, 4, 0, 0.98);
    border-top: 2px ridge #3d6e20;
    box-shadow: 0 -2px 18px rgba(50, 90, 20, 0.17), 0 0 8px rgba(60, 100, 25, 0.28);
}
body.theme-earth-magic .taskbar-power-btn { color: #5a9030; border-right-color: rgba(60, 100, 25, 0.3); }
body.theme-earth-magic .taskbar-power-btn:hover { background: rgba(60, 100, 25, 0.15); color: #7ab840; text-shadow: 0 0 8px #5a9030; }
body.theme-earth-magic .taskbar-divider { background: rgba(60, 100, 25, 0.3); }
body.theme-earth-magic .taskbar-nav-btn { color: rgba(130, 190, 70, 0.75); }
body.theme-earth-magic .taskbar-nav-btn:hover { background: rgba(60, 100, 25, 0.13); border-color: rgba(70, 120, 30, 0.4); color: #8dc840; text-shadow: 0 0 6px rgba(80,130,30,0.6); }
body.theme-earth-magic .taskbar-nav-btn.active { background: rgba(60, 100, 25, 0.2); border-color: rgba(90, 140, 35, 0.65); color: #7ab840; text-shadow: 0 0 8px #5a9030; box-shadow: 0 1px 0 rgba(60, 100, 25, 0.4) inset; }
body.theme-earth-magic .taskbar-restore-btn { background: rgba(55, 90, 22, 0.2); border-color: rgba(80, 130, 30, 0.55); color: #7ab840; text-shadow: 0 0 6px rgba(80,130,30,0.8); animation: restore-pulse-earth 1.8s ease-in-out infinite; }
@keyframes restore-pulse-earth {
    0%, 100% { box-shadow: 0 0 4px rgba(60, 100, 25, 0.25); }
    50%       { box-shadow: 0 0 12px rgba(90, 140, 35, 0.5), 0 0 4px rgba(140, 200, 60, 0.18); }
}
body.theme-earth-magic .taskbar-power-menu { background: rgba(5, 4, 0, 0.98); border: 2px ridge #3d6e20; box-shadow: 0 0 24px rgba(50, 90, 20, 0.25); }
body.theme-earth-magic .pmenu-item { color: rgba(130, 190, 70, 0.9); }
body.theme-earth-magic .pmenu-item:hover { background: rgba(60, 100, 25, 0.18); color: #8dc840; text-shadow: 0 0 7px rgba(80,130,30,0.7); }
body.theme-earth-magic .pmenu-sep { background: rgba(60, 100, 25, 0.28); }
body.theme-earth-magic .settings-win { background: rgba(5, 4, 0, 0.98); border: 2px ridge #3d6e20; box-shadow: 0 0 28px rgba(50, 90, 20, 0.25); }
body.theme-earth-magic .swin-bar { background: rgba(60, 100, 25, 0.12); border-bottom-color: rgba(70, 110, 28, 0.4); }
body.theme-earth-magic .swin-title { color: #7ab840; text-shadow: 0 0 8px rgba(80,130,30,0.6); }
body.theme-earth-magic .swin-heading { color: rgba(130, 185, 60, 0.65); border-bottom-color: rgba(80, 130, 30, 0.15); }
body.theme-earth-magic .swin-toggle-text span { color: rgba(130, 190, 70, 0.9); }
body.theme-earth-magic .swin-toggle-text small { color: rgba(85, 125, 45, 0.65); }
body.theme-earth-magic .swin-theme-btn { background: rgba(60, 100, 25, 0.08); border-color: rgba(70, 110, 28, 0.3); color: rgba(120, 180, 60, 0.8); }
body.theme-earth-magic .swin-theme-btn:hover { background: rgba(60, 100, 25, 0.18); border-color: rgba(90, 140, 35, 0.55); color: #7ab840; }
body.theme-earth-magic .swin-theme-btn.active { background: rgba(60, 100, 25, 0.25); border-color: rgba(100, 150, 38, 0.8); color: #7ab840; text-shadow: 0 0 6px rgba(80,130,30,0.7); }
body.theme-earth-magic .swin-close { border-color: rgba(70, 110, 28, 0.4); color: rgba(120, 180, 60, 0.7); }
body.theme-earth-magic .swin-close:hover { background: rgba(255,60,80,0.2); border-color: rgba(255,60,80,0.6); color: #ff6680; }
body.theme-earth-magic .swin-toggle:hover { background: rgba(60, 100, 25, 0.08); border-color: rgba(70, 110, 28, 0.2); }
body.theme-earth-magic .popup { background: rgba(8, 7, 1, 0.97); border-color: rgba(70, 110, 28, 0.6); box-shadow: 0 0 20px rgba(50,90,20,0.25); color: #c8e890; }
body.theme-earth-magic .popup h2 { color: #8dc840; text-shadow: 0 0 8px rgba(80,130,30,0.35); }
body.theme-earth-magic .popup h3 { color: #5a9030; text-shadow: none; }
body.theme-earth-magic .popup-drag-bar { background: rgba(60, 100, 25, 0.12); border-bottom-color: rgba(70, 110, 28, 0.35); }
body.theme-earth-magic .popup-drag-title { color: #7ab840; text-shadow: 0 0 6px rgba(80,130,30,0.4); }
body.theme-earth-magic .popup-drag-bar .closePopup { border-color: rgba(70, 110, 28, 0.4) !important; color: rgba(120, 180, 60, 0.7) !important; }
body.theme-earth-magic #dragonKillCounter {
    border-color: #3d6e20; border-style: solid;
    box-shadow: 0 0 12px rgba(60,100,25,0.5), inset 0 0 8px rgba(12,18,3,0.8);
    color: #7ab840; text-shadow: 0 0 8px rgba(80,130,30,0.5), 2px 2px #080601;
    background: rgba(5, 4, 0, 0.9);
}
body.theme-earth-magic #comboBarFill { background: linear-gradient(90deg, #243c10, #5a9030, #8dc840); }
body.theme-earth-magic #comboBarContainer { border-color: rgba(60, 100, 25, 0.5); background: rgba(5, 4, 0, 0.85); }
body.theme-earth-magic #secretMenu.visible { border-color: #3d6e20; box-shadow: 0 0 12px rgba(60,100,25,0.4), inset 0 0 8px rgba(8,12,2,0.8); }
body.theme-earth-magic .shop-item { box-shadow: 0 0 10px rgba(50,85,18,0.3); border-color: rgba(70, 110, 28, 0.4); background: #0b0901; color: #c8e890; }
body.theme-earth-magic .shop-item h3 { color: #8dc840; }
body.theme-earth-magic .shop-item .cost { color: #5a9030; }
body.theme-earth-magic .achievement { box-shadow: 0 0 10px rgba(40,70,14,0.3); border-color: rgba(60, 100, 25, 0.3); background: #0b0901; color: #c8e890; }
body.theme-earth-magic .achievement h3 { color: #6aa030; }
body.theme-earth-magic button { background: #3d6e20; border-color: #7ab840; color: #d4f0a0; text-shadow: none; border-style: outset; }
body.theme-earth-magic button:active { background: #284a15; border-style: inset; }
body.theme-earth-magic #prestigeStar { background: radial-gradient(circle at 30% 0%, #d4f0a0, #7ab840 40%, #3d6e20 100%); box-shadow: 0 0 14px #7ab840, 0 0 28px rgba(60,110,25,0.4); color: #0e1406; }
body.theme-earth-magic .closePopup { background: #3d6e20; border-color: #7ab840; color: #d4f0a0; border-style: outset; }
body.theme-earth-magic .closePopup:hover { background: #4e8a28; }

body.theme-dark-magic {
    color: #d0d0e8;
    background-image:
        radial-gradient(circle at center, rgba(10,10,20,0.6) 0%, rgba(6,6,10,0.6) 100%),
        url('/stars.gif');
}
body.theme-dark-magic .custom-scrollbar-track {
    border-color: #3a3a4a;
    box-shadow: inset 0 0 10px rgba(10,10,20,0.9), 0 0 6px rgba(60,60,100,0.3);
}
body.theme-dark-magic .custom-scrollbar-htrack {
    border-color: #3a3a4a;
    box-shadow: inset 0 0 8px rgba(10,10,20,0.9), 0 0 4px rgba(60,60,100,0.3);
}
body.theme-dark-magic .popup-scrollbar-track {
    border-left-color: #3a3a4a;
    box-shadow: inset 0 0 10px rgba(10,10,20,0.9), 0 0 6px rgba(60,60,100,0.2);
}
body.theme-dark-magic .blinky-ribbon {
    border-color: #5a5a80;
    background: rgba(60, 60, 100, 0.06);
    box-shadow: 0 0 12px rgba(20,20,50,0.6), inset 0 0 8px rgba(60,60,100,0.15);
}
body.theme-dark-magic .spoiler-box {
    border-color: #3a3a4a;
    background: rgba(0,0,0,0.5);
    box-shadow: 0 0 12px rgba(40,40,80,0.4), inset 0 0 8px rgba(30,30,60,0.5);
    color: #c8c8e0;
}
body.theme-dark-magic .spoiler-summary { color: #9090b8; text-shadow: 0 0 6px rgba(80,80,130,0.5); }
body.theme-dark-magic .spoiler-summary:hover { color: #d0d0f0; text-shadow: 0 0 10px rgba(100,100,160,0.6); }
body.theme-dark-magic .spoiler-content-box { border-left-color: #3a3a4a; }
body.theme-dark-magic .inner-spoiler { box-shadow: 0 0 8px rgba(20,20,50,0.5), inset 0 0 6px rgba(60,60,100,0.2); }
body.theme-dark-magic .copy-btn {
    background: #0a0a18;
    border-color: #5a5a80; color: #c0c0e0;
    text-shadow: 0 0 6px rgba(80,80,130,0.5);
    box-shadow: 0 0 10px rgba(40,40,80,0.4);
}
body.theme-dark-magic .copy-btn:hover { background: #5a5a80; color: #e0e0ff; box-shadow: 0 0 14px rgba(80,80,130,0.6); }
body.theme-dark-magic .crt-frame {
    border-color: #3a3a4a;
    box-shadow: 0 0 20px rgba(40,40,80,0.4);
}
body.theme-dark-magic .crt-counter {
    color: #a0a0d0;
    border-color: #5a5a80;
    background: rgba(5,5,15,0.75);
    box-shadow: 0 0 14px rgba(60,60,100,0.5), 0 0 24px rgba(30,30,60,0.4), inset 0 0 10px rgba(60,60,100,0.15);
    text-shadow: 0 0 4px rgba(80,80,130,0.7), 0 0 8px rgba(80,80,130,0.5);
}
body.theme-dark-magic .crt-counter:hover {
    box-shadow: 0 0 18px rgba(80,80,130,0.6), 0 0 32px rgba(60,60,100,0.4), inset 0 0 12px rgba(80,80,130,0.2);
    text-shadow: 0 0 6px rgba(100,100,160,0.7), 0 0 12px rgba(100,100,160,0.5), 0 0 20px rgba(80,80,130,0.4);
}
body.theme-dark-magic pre {
    background-color: rgba(40,40,70,0.06);
    border-color: rgba(80,80,130,0.3);
}
body.theme-dark-magic #context-menu {
    border-color: #5a5a80; color: #c0c0e0;
    box-shadow: 0 0 12px rgba(60,60,100,0.5);
}
body.theme-dark-magic .menu-item:hover { background: #5a5a80; color: #e0e0ff; }
body.theme-dark-magic #cdr { color: #9090b8; }
body.theme-dark-magic .art-thumb { border-color: #3a3a4a; }
body.theme-dark-magic .lightbox img { border-color: #3a3a4a; box-shadow: 0 0 20px rgba(40,40,80,0.5); }
body.theme-dark-magic .warning-flash { border-color: #3a3a4a; box-shadow: 0 0 20px rgba(40,40,80,0.4), inset 0 0 10px rgba(20,20,40,0.6); }
body.theme-dark-magic #resetConfirmPopup.popup { border-color: #5a5a80; box-shadow: 0 0 20px rgba(40,40,80,0.5), 0 0 40px rgba(60,60,100,0.3); }

body.theme-holy-magic {
    color: #2a1e00;
    background-image:
        radial-gradient(circle at center, rgba(255,250,220,0.5) 0%, rgba(240,235,200,0.4) 100%),
        url('/stars.gif');
    background-color: #f5f8ff;
}
body.theme-holy-magic .custom-scrollbar-track {
    border-color: rgba(200,160,0,0.5);
    box-shadow: inset 0 0 10px rgba(255,240,160,0.08), 0 0 6px rgba(200,160,0,0.2);
    background: rgba(255,255,255,0.4);
}
body.theme-holy-magic .custom-scrollbar-htrack {
    border-color: rgba(200,160,0,0.5);
    box-shadow: inset 0 0 8px rgba(255,240,160,0.08), 0 0 4px rgba(200,160,0,0.2);
    background: rgba(255,255,255,0.4);
}
body.theme-holy-magic .popup-scrollbar-track {
    border-left-color: rgba(200,160,0,0.5);
    box-shadow: inset 0 0 10px rgba(255,240,160,0.08), 0 0 6px rgba(200,160,0,0.15);
    background: rgba(255,255,255,0.6);
}
body.theme-holy-magic .blinky-ribbon {
    border-color: rgba(200,160,0,0.5);
    background: rgba(255,255,255,0.3);
    box-shadow: 0 0 12px rgba(200,160,0,0.15), inset 0 0 8px rgba(255,255,255,0.4);
}
body.theme-holy-magic .spoiler-box {
    border-color: rgba(200,160,0,0.5);
    background: rgba(255,255,255,0.45);
    box-shadow: 0 0 12px rgba(200,160,0,0.12), inset 0 0 8px rgba(255,255,255,0.4);
    color: #3a2800;
}
body.theme-holy-magic .spoiler-summary { color: #a07800; text-shadow: 0 0 6px rgba(200,160,0,0.3); }
body.theme-holy-magic .spoiler-summary:hover { color: #2a1e00; text-shadow: 0 0 10px rgba(200,160,0,0.4); }
body.theme-holy-magic .spoiler-content-box { border-left-color: rgba(200,160,0,0.4); }
body.theme-holy-magic .inner-spoiler { box-shadow: 0 0 8px rgba(200,160,0,0.1), inset 0 0 6px rgba(255,255,255,0.4); }
body.theme-holy-magic .copy-btn {
    background: rgba(255,255,255,0.7);
    border-color: rgba(200,160,0,0.6); color: #7a5800;
    text-shadow: 0 0 4px rgba(200,160,0,0.2);
    box-shadow: 0 0 10px rgba(200,160,0,0.12);
}
body.theme-holy-magic .copy-btn:hover { background: rgba(200,160,0,0.85); color: #1a1200; box-shadow: 0 0 14px rgba(200,160,0,0.3); }
body.theme-holy-magic .crt-frame {
    border-color: rgba(200,160,0,0.5);
    box-shadow: 0 0 20px rgba(200,160,0,0.15), 0 0 40px rgba(255,255,255,0.3);
}
body.theme-holy-magic .crt-counter {
    color: #7a5800;
    border-color: rgba(200,160,0,0.6);
    background: rgba(255,255,255,0.55);
    box-shadow: 0 0 14px rgba(200,160,0,0.2), 0 0 24px rgba(255,255,255,0.3), inset 0 0 10px rgba(255,255,255,0.4);
    text-shadow: 0 0 4px rgba(200,160,0,0.4), 0 0 8px rgba(200,160,0,0.2);
}
body.theme-holy-magic .crt-counter:hover {
    box-shadow: 0 0 18px rgba(200,160,0,0.3), 0 0 32px rgba(255,255,255,0.4), inset 0 0 12px rgba(255,255,255,0.5);
}
body.theme-holy-magic pre {
    background-color: rgba(255,255,255,0.35);
    border-color: rgba(200,160,0,0.3);
    color: #2a1e00;
}
body.theme-holy-magic #context-menu {
    background: rgba(255,252,230,0.97);
    border-color: rgba(200,160,0,0.6); color: #7a5800;
    box-shadow: 0 0 12px rgba(200,160,0,0.25);
}
body.theme-holy-magic .menu-item:hover { background: rgba(200,160,0,0.85); color: #1a1200; }
body.theme-holy-magic #cdr { color: #a07800; }
body.theme-holy-magic .art-thumb { border-color: rgba(200,160,0,0.5); }
body.theme-holy-magic .lightbox img { border-color: rgba(200,160,0,0.6); box-shadow: 0 0 20px rgba(200,160,0,0.2), 0 0 40px rgba(255,255,255,0.3); }
body.theme-holy-magic .warning-flash { border-color: rgba(200,160,0,0.6); box-shadow: 0 0 20px rgba(200,160,0,0.15), inset 0 0 10px rgba(255,255,255,0.3); }
body.theme-holy-magic #resetConfirmPopup.popup { background: rgba(255,252,230,0.97); border-color: rgba(200,160,0,0.7); box-shadow: 0 0 20px rgba(200,160,0,0.2), 0 0 40px rgba(255,255,255,0.3); color: #2a1e00; }
body.theme-holy-magic #resetConfirmPopup h2 { color: #8a6a00; text-shadow: none; }

body.theme-fire-magic {
    color: #f0c090;
    background-image:
        radial-gradient(circle at center, rgba(40,10,0,0.5) 0%, rgba(20,5,0,0.5) 100%),
        url('/stars.gif');
}
body.theme-fire-magic .custom-scrollbar-track {
    border-color: #551100;
    box-shadow: inset 0 0 10px rgba(20,3,0,0.9), 0 0 6px rgba(150,40,0,0.3);
}
body.theme-fire-magic .custom-scrollbar-htrack {
    border-color: #551100;
    box-shadow: inset 0 0 8px rgba(20,3,0,0.9), 0 0 4px rgba(150,40,0,0.3);
}
body.theme-fire-magic .popup-scrollbar-track {
    border-left-color: #551100;
    box-shadow: inset 0 0 10px rgba(20,3,0,0.9), 0 0 6px rgba(150,40,0,0.2);
}
body.theme-fire-magic .blinky-ribbon {
    border-color: #883300;
    background: rgba(180,50,0,0.06);
    box-shadow: 0 0 12px rgba(60,10,0,0.6), inset 0 0 8px rgba(100,20,0,0.2);
}
body.theme-fire-magic .spoiler-box {
    border-color: #661100;
    background: rgba(0,0,0,0.5);
    box-shadow: 0 0 12px rgba(100,20,0,0.4), inset 0 0 8px rgba(40,5,0,0.6);
    color: #f0c090;
}
body.theme-fire-magic .spoiler-summary { color: #cc4400; text-shadow: 0 0 6px rgba(180,50,0,0.5); }
body.theme-fire-magic .spoiler-summary:hover { color: #ffaa66; text-shadow: 0 0 10px rgba(220,80,0,0.6); }
body.theme-fire-magic .spoiler-content-box { border-left-color: #551100; }
body.theme-fire-magic .inner-spoiler { box-shadow: 0 0 8px rgba(40,5,0,0.6), inset 0 0 6px rgba(100,20,0,0.2); }
body.theme-fire-magic .copy-btn {
    background: #1a0500;
    border-color: #cc3300; color: #ff9944;
    text-shadow: 0 0 6px rgba(180,50,0,0.5);
    box-shadow: 0 0 10px rgba(100,20,0,0.4);
}
body.theme-fire-magic .copy-btn:hover { background: #882200; color: #ffd0a0; box-shadow: 0 0 14px rgba(180,50,0,0.6); }
body.theme-fire-magic .crt-frame {
    border-color: #661100;
    box-shadow: 0 0 20px rgba(150,40,0,0.3);
}
body.theme-fire-magic .crt-counter {
    color: #ff7733;
    border-color: #883300;
    background: rgba(10,3,0,0.75);
    box-shadow: 0 0 14px rgba(150,40,0,0.4), 0 0 24px rgba(60,10,0,0.4), inset 0 0 10px rgba(100,20,0,0.2);
    text-shadow: 0 0 4px rgba(200,60,0,0.7), 0 0 8px rgba(200,60,0,0.5);
}
body.theme-fire-magic .crt-counter:hover {
    box-shadow: 0 0 18px rgba(200,60,0,0.5), 0 0 32px rgba(150,40,0,0.4), inset 0 0 12px rgba(120,25,0,0.3);
}
body.theme-fire-magic pre {
    background-color: rgba(180,50,0,0.05);
    border-color: rgba(120,30,0,0.4);
    color: #f0c090;
}
body.theme-fire-magic #context-menu {
    background: rgba(14,5,0,0.97);
    border-color: #883300; color: #ff7733;
    box-shadow: 0 0 12px rgba(150,40,0,0.5);
}
body.theme-fire-magic .menu-item:hover { background: #882200; color: #ffd0a0; }
body.theme-fire-magic #cdr { color: #ff7733; }
body.theme-fire-magic .art-thumb { border-color: #661100; }
body.theme-fire-magic .lightbox img { border-color: #882200; box-shadow: 0 0 20px rgba(180,50,0,0.4); }
body.theme-fire-magic .warning-flash { border-color: #661100; box-shadow: 0 0 20px rgba(150,40,0,0.3), inset 0 0 10px rgba(40,5,0,0.6); }
body.theme-fire-magic #resetConfirmPopup.popup { background: rgba(12,4,0,0.97); border-color: #cc3300; box-shadow: 0 0 20px rgba(180,50,0,0.4), 0 0 40px rgba(100,20,0,0.3); color: #f0c090; }
body.theme-fire-magic #resetConfirmPopup h2 { color: #ff7733; text-shadow: 0 0 8px rgba(200,60,0,0.4); }

body.theme-water-magic {
    color: #88ccee;
    background-image:
        radial-gradient(circle at center, rgba(0,20,60,0.5) 0%, rgba(0,10,35,0.5) 100%),
        url('/stars.gif');
}
body.theme-water-magic .custom-scrollbar-track {
    border-color: #003366;
    box-shadow: inset 0 0 10px rgba(0,10,40,0.9), 0 0 6px rgba(0,80,180,0.25);
}
body.theme-water-magic .custom-scrollbar-htrack {
    border-color: #003366;
    box-shadow: inset 0 0 8px rgba(0,10,40,0.9), 0 0 4px rgba(0,80,180,0.25);
}
body.theme-water-magic .popup-scrollbar-track {
    border-left-color: #003366;
    box-shadow: inset 0 0 10px rgba(0,10,40,0.9), 0 0 6px rgba(0,80,180,0.2);
}
body.theme-water-magic .blinky-ribbon {
    border-color: #005588;
    background: rgba(0,80,180,0.05);
    box-shadow: 0 0 12px rgba(0,20,70,0.6), inset 0 0 8px rgba(0,60,140,0.15);
}
body.theme-water-magic .spoiler-box {
    border-color: #003366;
    background: rgba(0,0,0,0.5);
    box-shadow: 0 0 12px rgba(0,40,120,0.4), inset 0 0 8px rgba(0,20,70,0.6);
    color: #88ccee;
}
body.theme-water-magic .spoiler-summary { color: #0099cc; text-shadow: 0 0 6px rgba(0,100,200,0.5); }
body.theme-water-magic .spoiler-summary:hover { color: #44ddff; text-shadow: 0 0 10px rgba(0,150,220,0.6); }
body.theme-water-magic .spoiler-content-box { border-left-color: #003366; }
body.theme-water-magic .inner-spoiler { box-shadow: 0 0 8px rgba(0,20,70,0.5), inset 0 0 6px rgba(0,60,140,0.15); }
body.theme-water-magic .copy-btn {
    background: #000610;
    border-color: #0077bb; color: #55aadd;
    text-shadow: 0 0 6px rgba(0,100,200,0.5);
    box-shadow: 0 0 10px rgba(0,60,140,0.3);
}
body.theme-water-magic .copy-btn:hover { background: #004488; color: #aaeeff; box-shadow: 0 0 14px rgba(0,100,200,0.5); }
body.theme-water-magic .crt-frame {
    border-color: #003366;
    box-shadow: 0 0 20px rgba(0,80,180,0.25);
}
body.theme-water-magic .crt-counter {
    color: #33bbee;
    border-color: #005588;
    background: rgba(0,5,18,0.75);
    box-shadow: 0 0 14px rgba(0,80,180,0.4), 0 0 24px rgba(0,30,90,0.4), inset 0 0 10px rgba(0,60,140,0.15);
    text-shadow: 0 0 4px rgba(0,120,200,0.7), 0 0 8px rgba(0,120,200,0.5);
}
body.theme-water-magic .crt-counter:hover {
    box-shadow: 0 0 18px rgba(0,120,200,0.5), 0 0 32px rgba(0,80,180,0.4), inset 0 0 12px rgba(0,80,160,0.2);
}
body.theme-water-magic pre {
    background-color: rgba(0,80,180,0.04);
    border-color: rgba(0,80,160,0.35);
    color: #88ccee;
}
body.theme-water-magic #context-menu {
    background: rgba(0,6,18,0.97);
    border-color: #005588; color: #33bbee;
    box-shadow: 0 0 12px rgba(0,80,180,0.4);
}
body.theme-water-magic .menu-item:hover { background: #004488; color: #aaeeff; }
body.theme-water-magic #cdr { color: #33bbee; }
body.theme-water-magic .art-thumb { border-color: #003366; }
body.theme-water-magic .lightbox img { border-color: #004488; box-shadow: 0 0 20px rgba(0,80,180,0.35); }
body.theme-water-magic .warning-flash { border-color: #003366; box-shadow: 0 0 20px rgba(0,80,180,0.25), inset 0 0 10px rgba(0,20,70,0.5); }
body.theme-water-magic #resetConfirmPopup.popup { background: rgba(0,5,16,0.97); border-color: #0077bb; box-shadow: 0 0 20px rgba(0,80,180,0.35), 0 0 40px rgba(0,60,140,0.25); color: #88ccee; }
body.theme-water-magic #resetConfirmPopup h2 { color: #33bbee; text-shadow: 0 0 8px rgba(0,120,200,0.4); }

body.theme-earth-magic {
    color: #c8e890;
    background-image:
        radial-gradient(circle at center, rgba(15,20,3,0.6) 0%, rgba(8,10,1,0.6) 100%),
        url('/stars.gif');
}
body.theme-earth-magic .custom-scrollbar-track {
    border-color: #243c10;
    box-shadow: inset 0 0 10px rgba(5,8,1,0.9), 0 0 6px rgba(60,100,25,0.25);
}
body.theme-earth-magic .custom-scrollbar-htrack {
    border-color: #243c10;
    box-shadow: inset 0 0 8px rgba(5,8,1,0.9), 0 0 4px rgba(60,100,25,0.25);
}
body.theme-earth-magic .popup-scrollbar-track {
    border-left-color: #243c10;
    box-shadow: inset 0 0 10px rgba(5,8,1,0.9), 0 0 6px rgba(60,100,25,0.2);
}
body.theme-earth-magic .blinky-ribbon {
    border-color: #4a7a25;
    background: rgba(60,100,25,0.06);
    box-shadow: 0 0 12px rgba(15,30,3,0.6), inset 0 0 8px rgba(40,70,12,0.15);
}
body.theme-earth-magic .spoiler-box {
    border-color: #2a4a10;
    background: rgba(0,0,0,0.5);
    box-shadow: 0 0 12px rgba(30,55,8,0.4), inset 0 0 8px rgba(15,28,3,0.6);
    color: #c8e890;
}
body.theme-earth-magic .spoiler-summary { color: #5a9030; text-shadow: 0 0 6px rgba(80,130,30,0.5); }
body.theme-earth-magic .spoiler-summary:hover { color: #8dc840; text-shadow: 0 0 10px rgba(100,160,40,0.6); }
body.theme-earth-magic .spoiler-content-box { border-left-color: #2a4a10; }
body.theme-earth-magic .inner-spoiler { box-shadow: 0 0 8px rgba(15,28,3,0.5), inset 0 0 6px rgba(40,70,12,0.15); }
body.theme-earth-magic .copy-btn {
    background: #090700;
    border-color: #5a9030; color: #7ab840;
    text-shadow: 0 0 6px rgba(80,130,30,0.5);
    box-shadow: 0 0 10px rgba(30,55,8,0.3);
}
body.theme-earth-magic .copy-btn:hover { background: #3d6e20; color: #d4f0a0; box-shadow: 0 0 14px rgba(80,130,30,0.5); }
body.theme-earth-magic .crt-frame {
    border-color: #2a4a10;
    box-shadow: 0 0 20px rgba(50,90,20,0.25);
}
body.theme-earth-magic .crt-counter {
    color: #8dc840;
    border-color: #4a7a25;
    background: rgba(6,5,0,0.75);
    box-shadow: 0 0 14px rgba(60,100,25,0.4), 0 0 24px rgba(20,40,5,0.4), inset 0 0 10px rgba(40,70,12,0.15);
    text-shadow: 0 0 4px rgba(80,130,30,0.7), 0 0 8px rgba(80,130,30,0.5);
}
body.theme-earth-magic .crt-counter:hover {
    box-shadow: 0 0 18px rgba(100,160,40,0.5), 0 0 32px rgba(60,100,25,0.4), inset 0 0 12px rgba(60,100,25,0.2);
}
body.theme-earth-magic pre {
    background-color: rgba(60,100,25,0.05);
    border-color: rgba(60,100,25,0.35);
    color: #c8e890;
}
body.theme-earth-magic #context-menu {
    background: rgba(8,7,1,0.97);
    border-color: #4a7a25; color: #7ab840;
    box-shadow: 0 0 12px rgba(60,100,25,0.4);
}
body.theme-earth-magic .menu-item:hover { background: #3d6e20; color: #d4f0a0; }
body.theme-earth-magic #cdr { color: #7ab840; }
body.theme-earth-magic .art-thumb { border-color: #2a4a10; }
body.theme-earth-magic .lightbox img { border-color: #3d6e20; box-shadow: 0 0 20px rgba(60,100,25,0.35); }
body.theme-earth-magic .warning-flash { border-color: #2a4a10; box-shadow: 0 0 20px rgba(50,90,20,0.25), inset 0 0 10px rgba(15,28,3,0.5); }
body.theme-earth-magic #resetConfirmPopup.popup { background: rgba(7,6,0,0.97); border-color: #5a9030; box-shadow: 0 0 20px rgba(60,100,25,0.35), 0 0 40px rgba(40,70,12,0.25); color: #c8e890; }
body.theme-earth-magic #resetConfirmPopup h2 { color: #8dc840; text-shadow: 0 0 8px rgba(80,130,30,0.4); }

body {
    --theme-primary: #b142f5;
    --theme-secondary: #00ffff;
    --theme-glow1: rgba(177,66,245,0.6);
    --theme-glow2: rgba(0,255,255,0.6);
    --theme-particle1: #ff77ff;
    --theme-particle2: #b142f5;
    --theme-burst1: #aef;
    --theme-burst2: #7df;
}
body.theme-dark-magic {
    --theme-primary: #5a5a80;
    --theme-secondary: #9090c0;
    --theme-glow1: rgba(80,80,130,0.5);
    --theme-glow2: rgba(130,130,180,0.4);
    --theme-particle1: #9090c0;
    --theme-particle2: #505070;
    --theme-burst1: #c0c0e0;
    --theme-burst2: #8080b0;
}
body.theme-holy-magic {
    --theme-primary: #c8a000;
    --theme-secondary: #ffd700;
    --theme-glow1: rgba(200,160,0,0.5);
    --theme-glow2: rgba(255,215,0,0.4);
    --theme-particle1: #ffd700;
    --theme-particle2: #c8a000;
    --theme-burst1: #fff8aa;
    --theme-burst2: #ffe44d;
}
body.theme-fire-magic {
    --theme-primary: #882200;
    --theme-secondary: #ff5500;
    --theme-glow1: rgba(180,50,0,0.5);
    --theme-glow2: rgba(255,85,0,0.4);
    --theme-particle1: #ff7733;
    --theme-particle2: #882200;
    --theme-burst1: #ffcc88;
    --theme-burst2: #ff5500;
}
body.theme-water-magic {
    --theme-primary: #004488;
    --theme-secondary: #00aadd;
    --theme-glow1: rgba(0,80,180,0.5);
    --theme-glow2: rgba(0,170,220,0.4);
    --theme-particle1: #33bbee;
    --theme-particle2: #004488;
    --theme-burst1: #aaeeff;
    --theme-burst2: #00aadd;
}
body.theme-earth-magic {
    --theme-primary: #3d6e20;
    --theme-secondary: #7ab840;
    --theme-glow1: rgba(60,100,25,0.5);
    --theme-glow2: rgba(122,184,64,0.4);
    --theme-particle1: #8dc840;
    --theme-particle2: #3d6e20;
    --theme-burst1: #d4f0a0;
    --theme-burst2: #7ab840;
}

body.theme-dark-magic  .magic-particle { background: radial-gradient(circle, #c0c0e0, #505070 70%); }
body.theme-holy-magic  .magic-particle { background: radial-gradient(circle, #ffd700, #c8a000 70%); }
body.theme-fire-magic  .magic-particle { background: radial-gradient(circle, #ff7733, #882200 70%); }
body.theme-water-magic .magic-particle { background: radial-gradient(circle, #33bbee, #004488 70%); }
body.theme-earth-magic .magic-particle { background: radial-gradient(circle, #8dc840, #3d6e20 70%); }

body.theme-dark-magic  .magic-burst { background: radial-gradient(circle, #fff 0%, #c0c0e0 40%, #8080b0 70%, transparent 100%); box-shadow: 0 0 6px #9090c0, 0 0 12px #5a5a80; }
body.theme-holy-magic  .magic-burst { background: radial-gradient(circle, #fff 0%, #fff8aa 40%, #ffe44d 70%, transparent 100%); box-shadow: 0 0 6px #ffd700, 0 0 12px #c8a000; }
body.theme-fire-magic  .magic-burst { background: radial-gradient(circle, #fff 0%, #ffcc88 40%, #ff5500 70%, transparent 100%); box-shadow: 0 0 6px #ff7733, 0 0 12px #882200; }
body.theme-water-magic .magic-burst { background: radial-gradient(circle, #fff 0%, #aaeeff 40%, #00aadd 70%, transparent 100%); box-shadow: 0 0 6px #33bbee, 0 0 12px #004488; }
body.theme-earth-magic .magic-burst { background: radial-gradient(circle, #fff 0%, #d4f0a0 40%, #7ab840 70%, transparent 100%); box-shadow: 0 0 6px #8dc840, 0 0 12px #3d6e20; }

body.theme-dark-magic  #arcane-autoscroll-orb { background: radial-gradient(circle at center, rgba(160,160,210,0.95), rgba(60,60,110,0.7), rgba(15,15,35,0.15)); box-shadow: 0 0 28px rgba(120,120,180,0.9), 0 0 60px rgba(60,60,110,0.6), inset 0 0 26px rgba(255,255,255,0.3); }
body.theme-holy-magic  #arcane-autoscroll-orb { background: radial-gradient(circle at center, rgba(255,245,180,0.95), rgba(200,160,0,0.7), rgba(80,60,0,0.15)); box-shadow: 0 0 28px rgba(255,215,0,0.9), 0 0 60px rgba(200,160,0,0.6), inset 0 0 26px rgba(255,255,255,0.45); }
body.theme-fire-magic  #arcane-autoscroll-orb { background: radial-gradient(circle at center, rgba(255,160,80,0.95), rgba(180,50,0,0.7), rgba(40,5,0,0.15)); box-shadow: 0 0 28px rgba(255,100,0,0.9), 0 0 60px rgba(150,40,0,0.6), inset 0 0 26px rgba(255,200,100,0.35); }
body.theme-water-magic #arcane-autoscroll-orb { background: radial-gradient(circle at center, rgba(100,220,255,0.95), rgba(0,80,180,0.7), rgba(0,15,50,0.15)); box-shadow: 0 0 28px rgba(0,180,240,0.9), 0 0 60px rgba(0,80,180,0.6), inset 0 0 26px rgba(180,255,255,0.35); }
body.theme-earth-magic #arcane-autoscroll-orb { background: radial-gradient(circle at center, rgba(160,230,80,0.95), rgba(60,100,25,0.7), rgba(10,18,2,0.15)); box-shadow: 0 0 28px rgba(120,190,40,0.9), 0 0 60px rgba(60,100,25,0.6), inset 0 0 26px rgba(220,255,150,0.35); }

body.theme-dark-magic  #arcane-autoscroll-orb.orb-idle { animation: orbPulseDark  1.5s infinite ease-in-out; }
body.theme-holy-magic  #arcane-autoscroll-orb.orb-idle { animation: orbPulseHoly  1.5s infinite ease-in-out; }
body.theme-fire-magic  #arcane-autoscroll-orb.orb-idle { animation: orbPulseFire  1.5s infinite ease-in-out; }
body.theme-water-magic #arcane-autoscroll-orb.orb-idle { animation: orbPulseWater 1.5s infinite ease-in-out; }
body.theme-earth-magic #arcane-autoscroll-orb.orb-idle { animation: orbPulseEarth 1.5s infinite ease-in-out; }

@keyframes orbPulseDark  { 0%,100% { transform: scale(1.0); box-shadow: 0 0 24px rgba(120,120,180,0.8); } 50% { transform: scale(1.08); box-shadow: 0 0 40px rgba(160,160,220,0.95); } }
@keyframes orbPulseHoly  { 0%,100% { transform: scale(1.0); box-shadow: 0 0 24px rgba(255,215,0,0.8); } 50% { transform: scale(1.08); box-shadow: 0 0 40px rgba(255,240,100,0.95); } }
@keyframes orbPulseFire  { 0%,100% { transform: scale(1.0); box-shadow: 0 0 24px rgba(255,100,0,0.8); } 50% { transform: scale(1.08); box-shadow: 0 0 40px rgba(255,140,0,0.95); } }
@keyframes orbPulseWater { 0%,100% { transform: scale(1.0); box-shadow: 0 0 24px rgba(0,180,240,0.8); } 50% { transform: scale(1.08); box-shadow: 0 0 40px rgba(0,220,255,0.95); } }
@keyframes orbPulseEarth { 0%,100% { transform: scale(1.0); box-shadow: 0 0 24px rgba(120,190,40,0.8); } 50% { transform: scale(1.08); box-shadow: 0 0 40px rgba(160,230,60,0.95); } }

body.theme-dark-magic  .logo, body.theme-dark-magic  .art-ref { filter: drop-shadow(0 0 4px #3a3a5a) drop-shadow(0 0 8px #6060a0); }
body.theme-holy-magic  .logo, body.theme-holy-magic  .art-ref { filter: drop-shadow(0 0 4px #c8a000) drop-shadow(0 0 8px #ffd700); }
body.theme-fire-magic  .logo, body.theme-fire-magic  .art-ref { filter: drop-shadow(0 0 4px #882200) drop-shadow(0 0 8px #cc3300); }
body.theme-water-magic .logo, body.theme-water-magic .art-ref { filter: drop-shadow(0 0 4px #004488) drop-shadow(0 0 8px #0077bb); }
body.theme-earth-magic .logo, body.theme-earth-magic .art-ref { filter: drop-shadow(0 0 4px #3d6e20) drop-shadow(0 0 8px #5a9030); }

body.theme-dark-magic  .logo { animation: logoCRT-dark  0.15s infinite; }
body.theme-holy-magic  .logo { animation: logoCRT-holy  0.15s infinite; }
body.theme-fire-magic  .logo { animation: logoCRT-fire  0.15s infinite; }
body.theme-water-magic .logo { animation: logoCRT-water 0.15s infinite; }
body.theme-earth-magic .logo { animation: logoCRT-earth 0.15s infinite; }

@keyframes logoCRT-dark  { 0%,100% { filter: brightness(1) drop-shadow(0 0 4px #3a3a5a) drop-shadow(0 0 8px #6060a0); } 50% { filter: brightness(1.1) drop-shadow(0 0 6px #5a5a80) drop-shadow(0 0 10px #9090c0); } }
@keyframes logoCRT-holy  { 0%,100% { filter: brightness(1) drop-shadow(0 0 4px #c8a000) drop-shadow(0 0 8px #ffd700); } 50% { filter: brightness(1.1) drop-shadow(0 0 6px #e0b800) drop-shadow(0 0 10px #ffe44d); } }
@keyframes logoCRT-fire  { 0%,100% { filter: brightness(1) drop-shadow(0 0 4px #882200) drop-shadow(0 0 8px #cc3300); } 50% { filter: brightness(1.1) drop-shadow(0 0 6px #aa2800) drop-shadow(0 0 10px #ff5500); } }
@keyframes logoCRT-water { 0%,100% { filter: brightness(1) drop-shadow(0 0 4px #004488) drop-shadow(0 0 8px #0077bb); } 50% { filter: brightness(1.1) drop-shadow(0 0 6px #005599) drop-shadow(0 0 10px #00aadd); } }
@keyframes logoCRT-earth { 0%,100% { filter: brightness(1) drop-shadow(0 0 4px #3d6e20) drop-shadow(0 0 8px #5a9030); } 50% { filter: brightness(1.1) drop-shadow(0 0 6px #4e8a28) drop-shadow(0 0 10px #7ab840); } }

body.theme-dark-magic  .box { animation: boxPulse-dark  4s ease-in-out infinite; }
body.theme-holy-magic  .box { animation: boxPulse-holy  4s ease-in-out infinite; }
body.theme-fire-magic  .box { animation: boxPulse-fire  4s ease-in-out infinite; }
body.theme-water-magic .box { animation: boxPulse-water 4s ease-in-out infinite; }
body.theme-earth-magic .box { animation: boxPulse-earth 4s ease-in-out infinite; }

@keyframes boxPulse-dark  { 0%,100% { box-shadow: 0 0 8px rgba(30,30,60,0.5), inset 0 0 8px rgba(60,60,100,0.1); } 50% { box-shadow: 0 0 18px rgba(80,80,130,0.35), inset 0 0 12px rgba(80,80,120,0.18); } }
@keyframes boxPulse-holy  { 0%,100% { box-shadow: 0 0 8px rgba(200,160,0,0.12), inset 0 0 8px rgba(255,255,255,0.3); } 50% { box-shadow: 0 0 18px rgba(200,160,0,0.22), inset 0 0 14px rgba(255,255,255,0.5); } }
@keyframes boxPulse-fire  { 0%,100% { box-shadow: 0 0 8px rgba(80,15,0,0.5), inset 0 0 8px rgba(100,20,0,0.15); } 50% { box-shadow: 0 0 18px rgba(180,50,0,0.4), inset 0 0 12px rgba(120,25,0,0.2); } }
@keyframes boxPulse-water { 0%,100% { box-shadow: 0 0 8px rgba(0,30,90,0.5), inset 0 0 8px rgba(0,60,140,0.12); } 50% { box-shadow: 0 0 18px rgba(0,80,180,0.35), inset 0 0 12px rgba(0,80,160,0.2); } }
@keyframes boxPulse-earth { 0%,100% { box-shadow: 0 0 8px rgba(20,40,5,0.5), inset 0 0 8px rgba(40,70,12,0.12); } 50% { box-shadow: 0 0 18px rgba(60,100,20,0.35), inset 0 0 12px rgba(50,85,15,0.2); } }

body.theme-dark-magic  .popup { border: 2px solid rgba(60,60,100,0.55)  !important; }
body.theme-holy-magic  .popup { border: 2px solid rgba(200,160,0,0.6)   !important; }
body.theme-fire-magic  .popup { border: 2px solid rgba(160,50,0,0.6)    !important; }
body.theme-water-magic .popup { border: 2px solid rgba(0,90,180,0.6)    !important; }
body.theme-earth-magic .popup { border: 2px solid rgba(70,110,28,0.6)   !important; }

body.theme-dark-magic  .swin-toggle input[type="checkbox"] { accent-color: #9090c0; }
body.theme-holy-magic  .swin-toggle input[type="checkbox"] { accent-color: #c8a000; }
body.theme-fire-magic  .swin-toggle input[type="checkbox"] { accent-color: #cc3300; }
body.theme-water-magic .swin-toggle input[type="checkbox"] { accent-color: #0077bb; }
body.theme-earth-magic .swin-toggle input[type="checkbox"] { accent-color: #5a9030; }

body.theme-dark-magic  em, body.theme-dark-magic  i { color: #a0a0c8; }
body.theme-holy-magic  em, body.theme-holy-magic  i { color: #7a5800; }
body.theme-fire-magic  em, body.theme-fire-magic  i { color: #cc7744; }
body.theme-water-magic em, body.theme-water-magic i { color: #5599bb; }
body.theme-earth-magic em, body.theme-earth-magic i { color: #6a9a38; }

body.theme-dark-magic  strong, body.theme-dark-magic  b { color: #c0c0e0; }
body.theme-holy-magic  strong, body.theme-holy-magic  b { color: #6a4e00; }
body.theme-fire-magic  strong, body.theme-fire-magic  b { color: #dd8844; }
body.theme-water-magic strong, body.theme-water-magic b { color: #4499cc; }
body.theme-earth-magic strong, body.theme-earth-magic b { color: #7ab840; }

body.theme-dark-magic  .custom-scrollbar-thumb,
body.theme-dark-magic  .custom-scrollbar-hthumb { animation: thumbGlow-dark  2.1s ease-in-out infinite; }
body.theme-holy-magic  .custom-scrollbar-thumb,
body.theme-holy-magic  .custom-scrollbar-hthumb { animation: thumbGlow-holy  2.1s ease-in-out infinite; }
body.theme-fire-magic  .custom-scrollbar-thumb,
body.theme-fire-magic  .custom-scrollbar-hthumb { animation: thumbGlow-fire  2.1s ease-in-out infinite; }
body.theme-water-magic .custom-scrollbar-thumb,
body.theme-water-magic .custom-scrollbar-hthumb { animation: thumbGlow-water 2.1s ease-in-out infinite; }
body.theme-earth-magic .custom-scrollbar-thumb,
body.theme-earth-magic .custom-scrollbar-hthumb { animation: thumbGlow-earth 2.1s ease-in-out infinite; }

@keyframes thumbGlow-dark  { 0%,100% { box-shadow: 0 0 6px rgba(80,80,130,0.6), inset 0 0 4px rgba(60,60,100,0.5); } 50% { box-shadow: 0 0 14px rgba(100,100,160,0.8), inset 0 0 8px rgba(80,80,130,0.7); } }
@keyframes thumbGlow-holy  { 0%,100% { box-shadow: 0 0 6px rgba(200,160,0,0.6), inset 0 0 4px rgba(200,160,0,0.4); } 50% { box-shadow: 0 0 14px rgba(255,215,0,0.8), inset 0 0 8px rgba(200,160,0,0.6); } }
@keyframes thumbGlow-fire  { 0%,100% { box-shadow: 0 0 6px rgba(180,50,0,0.6), inset 0 0 4px rgba(150,40,0,0.5); } 50% { box-shadow: 0 0 14px rgba(220,80,0,0.8), inset 0 0 8px rgba(180,50,0,0.7); } }
@keyframes thumbGlow-water { 0%,100% { box-shadow: 0 0 6px rgba(0,80,180,0.6), inset 0 0 4px rgba(0,60,140,0.5); } 50% { box-shadow: 0 0 14px rgba(0,140,210,0.8), inset 0 0 8px rgba(0,100,200,0.7); } }
@keyframes thumbGlow-earth { 0%,100% { box-shadow: 0 0 6px rgba(60,100,25,0.6), inset 0 0 4px rgba(50,85,18,0.5); } 50% { box-shadow: 0 0 14px rgba(90,140,35,0.8), inset 0 0 8px rgba(70,110,28,0.7); } }

body.theme-dark-magic  .custom-scrollbar-thumb,
body.theme-dark-magic  .custom-scrollbar-hthumb,
body.theme-holy-magic  .custom-scrollbar-thumb,
body.theme-holy-magic  .custom-scrollbar-hthumb,
body.theme-fire-magic  .custom-scrollbar-thumb,
body.theme-fire-magic  .custom-scrollbar-hthumb,
body.theme-water-magic .custom-scrollbar-thumb,
body.theme-water-magic .custom-scrollbar-hthumb,
body.theme-earth-magic .custom-scrollbar-thumb,
body.theme-earth-magic .custom-scrollbar-hthumb { will-change: border-color; }