html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    font-family: sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    color: #ffffff;
    overflow: hidden;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
}

* {
    -webkit-tap-highlight-color: transparent !important;
}

button,
input[type="button"],
input[type="submit"],
.btn,
.menu-quad-column,
.clickable,
[role="button"],
.quad-col-card,
.flight-dock-card,
.manda-sector-btn,
.manda-liquid-item,
.menu-side-btn,
.btn-top-logout,
.btn-kembali-jurnal,
.flight-action-btn,
.flight-home-btn,
.toolbox-item-card,
.atom-toolbox-item {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent !important;
}

::selection {
    background: transparent !important;
    color: inherit !important;
}

::-moz-selection {
    background: transparent !important;
    color: inherit !important;
}

/* ==========================================================================
   UNIVERSAL VIRTUAL RESOLUTION CANVAS SCALER (FIXED 1920x864 - 20:9)
   Maintains 100% visual parity across Desktop PC, Mobile APK, Tablets & 4K.
   Scales all components, fonts, borders, modals, and 3D scenes uniformly.
   ========================================================================== */
.app-viewport-shell {
    position: absolute;
    width: 1920px;
    height: 864px;
    left: 50%;
    top: 50%;
    transform-origin: center center;
    transform: translate(-50%, -50%) scale(var(--app-scale, 1));
    background-color: #000000;
    overflow: hidden;
    display: flex;
    box-sizing: border-box;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.98);
}

/* ==========================================================================
   STRICT GLOBAL HIDDEN & DISPLAY INVARIANTS
   Guarantees zero backdrop leak, zero phantom overlays, and zero layer conflicts
   ========================================================================== */
.hidden,
.app-viewport-shell>.hidden,
[class*="-overlay"].hidden,
[class*="-modal"].hidden,
#user-inventory-modal.hidden,
#merchant-shop-modal.hidden,
#unit-book-modal.hidden,
#shard-synthesizer-modal.hidden,
#storage-journal-modal.hidden,
#reaction-catalogue-modal.hidden,
#mission-leaderboard-modal.hidden,
#user-profile-modal.hidden,
#shard-inspector-modal.hidden,
#shard-3d-inspector-modal.hidden,
#flight-dock-selector-modal.hidden,
#mission-selector-modal.hidden,
#journal-login-overlay.hidden,
#page-menu-utama.hidden,
#mission-victory-modal.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Page inner containers fill 20:9 viewport comfortably without cutting off */
.unit-book-spread,
.storage-journal-box,
.leaderboard-ledger-box,
.catalogue-window {
    width: 96% !important;
    max-width: 1440px !important;
    height: 94% !important;
    max-height: 820px !important;
    margin: auto !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.95), inset 0 0 50px rgba(90, 56, 20, 0.35) !important;
    animation: none !important;
}

/* Merchant Shop Sheet Ledger Paper: +10% enlarged (max-width: 1740px, max-height: 990px) */
.merchant-shop-sheet {
    width: 97% !important;
    max-width: 1740px !important; /* Scaled +10% from 1584px */
    height: 96% !important;
    max-height: 990px !important; /* Scaled +10% from 902px */
    margin: auto !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.95), inset 0 0 50px rgba(90, 56, 20, 0.35) !important;
    animation: none !important;
}

/* User Profile Dossier Ledger Paper: +12% enlarged (max-width: 1612px, max-height: 918px) */
.profile-ledger-box {
    width: 96% !important;
    max-width: 1612px !important;
    height: 94% !important;
    max-height: 918px !important;
    margin: auto !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.95), inset 0 0 50px rgba(90, 56, 20, 0.35) !important;
    animation: none !important;
}

/* Shard Synthesizer Ledger Paper: +10% enlarged (width 1678px, height 902px) */
.synth-ledger-box {
    width: 98% !important;
    max-width: 1678px !important;
    height: 96% !important;
    max-height: 902px !important;
    margin: auto !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.95), inset 0 0 50px rgba(90, 56, 20, 0.35) !important;
    animation: none !important;
}

.void-ground {
    flex: 1;
    width: auto;
    min-width: 0;
    height: 100%;
    position: relative;
    background-color: #000000;
    contain: layout size style;
    isolation: isolate;
}

.molecule-tooltip {
    position: absolute;
    display: none;
    background-color: rgba(40, 40, 40, 0.9);
    border: 1px solid #666;
    border-radius: 5px;
    padding: 8px 12px;
    color: #eee;
    font-size: 13px;
    max-width: 200px;
    z-index: 1000;
    pointer-events: none;
    /* So the tooltip doesn't block mouse events on things below it */
    text-align: center;
}

/* Laboratory Return Home Button (Superseded by single Top-Right Header button) */
.lab-home-btn {
    display: none !important;
}

.toolbox {
    position: relative;
    width: clamp(554px, 34.3vw, 660px);
    min-width: 607px;
    max-width: 686px;
    flex-shrink: 0;
    height: 100%;
    background-color: #241107;
    background-image:
        radial-gradient(ellipse at 50% 12%, rgba(88, 44, 20, 0.5) 0%, rgba(32, 15, 6, 0.85) 65%, #120602 100%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='leatherNoise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.18 0 0 0 0 0.09 0 0 0 0 0.04 0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23leatherNoise)'/%3E%3C/svg%3E");
    border-left: 4px solid #140702;
    box-shadow: -6px 0 24px rgba(0, 0, 0, 0.95), inset 0 0 45px rgba(10, 4, 1, 0.85), inset 4px 0 10px rgba(0, 0, 0, 0.9);
    padding: clamp(8px, 1.5vh, 12px) 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    align-items: stretch;
}

/* Journal Embossed Leather Perimeter Stitching */
.toolbox::before {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 8px;
    right: 8px;
    border: 1.5px dashed rgba(184, 134, 76, 0.25);
    border-radius: 5px;
    pointer-events: none;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
    z-index: 0;
}

.toolbox>* {
    position: relative;
    z-index: 1;
}

/* Custom Old-School Journal Scrollbar */
.toolbox::-webkit-scrollbar {
    width: 7px;
}

.toolbox::-webkit-scrollbar-track {
    background: #190e07;
}

.toolbox::-webkit-scrollbar-thumb {
    background: #54341e;
    border-radius: 4px;
    border: 1px solid #362012;
}

.toolbox::-webkit-scrollbar-thumb:hover {
    background: #73482a;
}

.title-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid #3d2314;
    box-sizing: border-box;
    gap: 0;
}

.title-container button,
.title-container .toolbox-menu-btn,
.toolbox-header-controls button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #edd6a4;
    width: 58px;
    height: 58px;
    padding: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
    flex-shrink: 0;
}

.title-container button:hover,
.title-container .toolbox-menu-btn:hover,
.toolbox-header-controls button:hover {
    background: rgba(212, 175, 55, 0.14) !important;
    transform: scale(1.10);
}

.title-container button:active,
.title-container .toolbox-menu-btn:active,
.toolbox-header-controls button:active {
    transform: scale(0.94);
    background: rgba(212, 175, 55, 0.22) !important;
}

.title-container button .header-icon-svg,
.title-container .toolbox-menu-btn .header-icon-svg,
.toolbox-header-controls button .header-icon-svg {
    width: 40px;
    height: 40px;
    color: #edd6a4;
    stroke: currentColor;
    fill: none;
    transition: transform 0.2s ease, color 0.2s ease, filter 0.2s ease;
}

.title-container button:hover .header-icon-svg,
.title-container .toolbox-menu-btn:hover .header-icon-svg,
.toolbox-header-controls button:hover .header-icon-svg {
    color: #fff1cc;
    stroke: #ffd978;
    filter: drop-shadow(0 0 8px rgba(255, 217, 120, 0.65));
}

.header-divider-pipe {
    color: #8c5d2e;
    font-size: 26px;
    font-weight: 300;
    font-family: monospace, sans-serif;
    user-select: none;
    pointer-events: none;
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin: 0 4px;
}

#open-settings-button,
.settings-button {
    display: none !important;
}

.toolbox h2 {
    display: none !important;
}

.toolbox-header-controls {
    display: contents;
}

.header-icon-svg {
    width: 40px;
    height: 40px;
    color: #edd6a4;
    stroke: currentColor;
    fill: none;
    transition: transform 0.2s ease, color 0.2s ease;
}

.catalogue-button:hover .header-icon-svg,
.settings-button:hover .header-icon-svg {
    transform: scale(1.1);
    color: #fff1cc;
}

.atom-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* --- Atom Carousel (Max 4 per page, 3 pages) --- */
.atom-carousel-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
    flex-shrink: 0;
}

.atom-carousel-viewport {
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    flex-shrink: 0;
}

.atom-carousel-track {
    display: flex;
    width: 100%;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    box-sizing: border-box;
}

.atom-page {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.atom-source {
    cursor: pointer;
    margin: 0;
    padding: 12px 14px;
    min-height: 90px;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
    background: #f4ead2;
    border: 1.5px solid #bfa478;
    border-radius: 9px;
    box-shadow: 0 2px 4px #120904;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    touch-action: none !important;
    -webkit-touch-callout: none !important;
}

.atom-source:hover {
    background: #faeed8;
    border-color: #8a6a42;
    transform: translateY(-1px);
}

.atom-source:active {
    background: #e8d7b7;
    border-color: #6a4f2e;
    transform: scale(0.98);
}

.atom-info {
    flex: 1;
    min-width: 0;
}

.atom-info span {
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 21px;
    font-weight: 800;
    color: #241306;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.atom-description {
    font-size: 19px;
    /* Scaled +30% from 14.5px for mobile legibility */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: #3b2212;
    margin: 4px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.atom-carousel-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 9px 0 6px 0;
    padding: 8px 16px;
    background: #eddcb9;
    border: 1px solid #bda277;
    border-radius: 6px;
    box-sizing: border-box;
    user-select: none;
    box-shadow: 0 1px 3px #120904;
    flex-shrink: 0;
}

.carousel-nav-btn {
    background: #3b2214;
    border: 1px solid #6b4125;
    color: #f4ead2;
    font-size: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease;
    box-shadow: 0 1px 2px #100804;
}

.carousel-nav-btn:hover {
    background: #4c2d1b;
    color: #ffffff;
}

.carousel-nav-btn:active {
    transform: scale(0.92);
}

.carousel-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #9c8266;
    border: 1px solid #6e543b;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.carousel-dots .dot:hover {
    background: #6e543b;
}

.carousel-dots .dot.active {
    background: #241306;
    border-color: #241306;
    transform: scale(1.2);
}

.carousel-page-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    color: #241306;
    font-weight: 800;
    min-width: 48px;
    text-align: center;
    letter-spacing: 1px;
}

.toolbox-button {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    margin-top: 10px;
    background: #eddab4;
    color: #241306;
    border: 2px solid #7c5832;
    border-radius: 7px;
    cursor: pointer;
    font-family: 'Georgia', 'Cambria', serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    box-shadow: 0 2px 4px #120904;
    text-align: center;
}

.toolbox-button:hover {
    background: #e2cba0;
    border-color: #59391a;
    color: #120701;
    transform: translateY(-1px);
}

.toolbox-button:active {
    transform: translateY(1px);
    background: #d6bc8b;
}

/* Specific styling for Hapus Semua (Solid Vintage Crimson Wax Seal) */
#remove-all-button {
    background: #6e2017;
    border: 2px solid #451009;
    color: #faede9;
}

#remove-all-button:hover {
    background: #82271d;
    border-color: #2b0804;
    color: #ffffff;
    transform: translateY(-1px);
}

#remove-all-button:active {
    background: #59160f;
    transform: translateY(1px);
}


/* Settings Modal Content */
.settings-modal-content {
    max-width: 480px;
    border-radius: 12px;
    background-color: #222;
    border: 1px solid #444;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.settings-modal-body {
    display: flex;
    flex-direction: column;
    padding: 30px;
    gap: 10px;
}

.settings-modal-body h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
    color: #fff;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

.config-sliders {
    margin-top: 0;
    width: 100%;
}

.slider-container {
    margin-bottom: 18px;
    font-size: 14px;
}

.slider-container label {
    display: block;
    margin-bottom: 6px;
    color: #ccc;
    font-weight: 500;
}

.slider-container input[type="range"] {
    width: 72%;
    vertical-align: middle;
    accent-color: #00d2ff;
}

.slider-container span {
    margin-left: 12px;
    font-family: monospace;
    font-size: 14px;
    color: #00d2ff;
    font-weight: bold;
    display: inline-block;
    min-width: 50px;
}

.atom {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Make atoms in the toolbox look like Leonardo da Vinci old-school pen & compass studies */
.atom-source .atom {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    background: radial-gradient(circle at 45% 45%, #fbf4e2 0%, #ede0bd 65%, #ddc99e 100%) !important;
    border: 1.5px solid #543419 !important;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(46, 23, 8, 0.35), inset 0 0 5px rgba(110, 75, 45, 0.22) !important;
    animation: none !important;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Da Vinci Compass Guideline - Concentric Dashed Orbit */
.atom-source .atom::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border-radius: 50%;
    border: 1px dashed rgba(84, 49, 23, 0.45);
    pointer-events: none;
    z-index: 1;
}

/* Da Vinci Caliper Crosshair Markings */
.atom-source .atom::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background:
        linear-gradient(to right, transparent calc(50% - 0.5px), rgba(84, 49, 23, 0.2) calc(50% - 0.5px), rgba(84, 49, 23, 0.2) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
        linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(84, 49, 23, 0.2) calc(50% - 0.5px), rgba(84, 49, 23, 0.2) calc(50% + 0.5px), transparent calc(50% + 0.5px));
    pointer-events: none;
    z-index: 1;
}

.atom-source:hover .atom {
    border-color: #3b1d09 !important;
    box-shadow: 0 2px 5px rgba(46, 23, 8, 0.45), inset 0 0 7px rgba(110, 75, 45, 0.3) !important;
}

/* Alchemical Core / Nucleus */
.atom-source .nucleus {
    position: relative;
    width: 18px;
    height: 18px;
    background: radial-gradient(circle at 35% 35%, #ecdcb8 0%, #caa472 65%, #8e6236 100%) !important;
    border: 1.2px solid #3c1e0a !important;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(46, 23, 8, 0.3) !important;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Red Chalk Protons & Sepia Wash Neutrons */
.atom-source .proton,
.atom-source .neutron {
    position: absolute;
    width: 5px;
    height: 5px;
    margin: -2.5px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    box-shadow: none !important;
}

.atom-source .proton {
    background-color: #8e2b1b !important;
    border: 0.5px solid #45120a !important;
}

.atom-source .neutron {
    background-color: #543d28 !important;
    border: 0.5px solid #23160a !important;
}

/* Micro-clusters for protons/neutrons inside the antique nucleus */
.atom-source .nucleus .proton:nth-child(1) {
    transform: translate(-2.5px, -2.5px);
}

.atom-source .nucleus .proton:nth-child(2) {
    transform: translate(2.5px, -1.5px);
}

.atom-source .nucleus .proton:nth-child(3) {
    transform: translate(-1.5px, 2.5px);
}

.atom-source .nucleus .proton:nth-child(4) {
    transform: translate(2.5px, 2.5px);
}

.atom-source .nucleus .proton:nth-child(5) {
    transform: translate(0px, -3px);
}

.atom-source .nucleus .proton:nth-child(6) {
    transform: translate(0px, 3px);
}

.atom-source .nucleus .proton:nth-child(7) {
    transform: translate(-3px, 0px);
}

.atom-source .nucleus .proton:nth-child(8) {
    transform: translate(3px, 0px);
}

.atom-source .nucleus .neutron:nth-child(odd) {
    transform: translate(-1.2px, 0px);
}

.atom-source .nucleus .neutron:nth-child(even) {
    transform: translate(1.2px, 0px);
}

/* Antique Iron-Gall Ink Electron Nodes */
.atom-source .electron {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    margin: -2px;
    background: #241306 !important;
    border: 0.5px solid #0f0502 !important;
    border-radius: 50%;
    box-shadow: 0 0 1px rgba(36, 19, 6, 0.6) !important;
    animation: none !important;
    z-index: 4;
}

/* Orbitally distributed electron ink coordinates along compass dashed orbit */
.atom-source .electron:nth-child(2) {
    transform: rotate(0deg) translateX(16px);
}

.atom-source .electron:nth-child(3) {
    transform: rotate(45deg) translateX(16px);
}

.atom-source .electron:nth-child(4) {
    transform: rotate(90deg) translateX(16px);
}

.atom-source .electron:nth-child(5) {
    transform: rotate(135deg) translateX(16px);
}

.atom-source .electron:nth-child(6) {
    transform: rotate(180deg) translateX(16px);
}

.atom-source .electron:nth-child(7) {
    transform: rotate(225deg) translateX(16px);
}

.atom-source .electron:nth-child(8) {
    transform: rotate(270deg) translateX(16px);
}

.atom-source .electron:nth-child(9) {
    transform: rotate(315deg) translateX(16px);
}

.atom-source .electron:nth-child(10) {
    transform: rotate(20deg) translateX(10.5px);
}

.atom-source .electron:nth-child(11) {
    transform: rotate(80deg) translateX(10.5px);
}

.atom-source .electron:nth-child(12) {
    transform: rotate(140deg) translateX(10.5px);
}

.atom-source .electron:nth-child(13) {
    transform: rotate(200deg) translateX(10.5px);
}

.atom-source .electron:nth-child(14) {
    transform: rotate(260deg) translateX(10.5px);
}

.atom-source .electron:nth-child(15) {
    transform: rotate(320deg) translateX(10.5px);
}

.nucleus {
    position: relative;
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.proton,
.neutron {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    margin: -5px;
}

.proton {
    background-color: #ff4d4d;
}

.neutron {
    background-color: #808080;
}

.electron {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px;
    background: radial-gradient(circle at 3px 3px, #a9c9ff, #4d94ff);
    box-shadow: 0 0 8px #4d94ff, 0 0 12px #a9c9ff;
    animation-duration: 5s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    border-radius: 50%;
}

.void-ground .electron {
    width: 5px;
    height: 5px;
    margin: -2.5px;
}

/* --- Base Atom Colors & Pulses --- */
.hydrogen {
    background-color: rgba(230, 230, 250, 0.2);
    animation: pulse-white 2s infinite ease-in-out;
}

.carbon {
    background-color: rgba(255, 100, 100, 0.2);
    animation: pulse-red 2s infinite ease-in-out;
}

.oxygen {
    background-color: rgba(100, 150, 255, 0.2);
    animation: pulse-blue 2s infinite ease-in-out;
}

.nitrogen {
    background-color: rgba(100, 255, 100, 0.2);
    animation: pulse-green 2s infinite ease-in-out;
}

.sodium {
    background-color: rgba(255, 165, 0, 0.25);
    animation: pulse-orange 2s infinite ease-in-out;
}

.chlorine {
    background-color: rgba(173, 255, 47, 0.25);
    animation: pulse-lime 2s infinite ease-in-out;
}

.sulfur {
    background-color: rgba(255, 230, 0, 0.25);
    animation: pulse-yellow-bright 2s infinite ease-in-out;
}

.phosphorus {
    background-color: rgba(255, 120, 80, 0.25);
    animation: pulse-phosphorus 2s infinite ease-in-out;
}

.magnesium {
    background-color: rgba(220, 225, 235, 0.25);
    animation: pulse-magnesium 2s infinite ease-in-out;
}

.fluorine {
    background-color: rgba(180, 255, 120, 0.25);
    animation: pulse-fluorine 2s infinite ease-in-out;
}

.iron {
    background-color: rgba(160, 175, 195, 0.25);
    animation: pulse-iron 2s infinite ease-in-out;
}

.copper {
    background-color: rgba(220, 130, 80, 0.25);
    animation: pulse-copper 2s infinite ease-in-out;
}

.aluminum {
    background-color: rgba(200, 220, 235, 0.28);
    animation: pulse-aluminum 2s infinite ease-in-out;
}

.silicon {
    background-color: rgba(145, 185, 230, 0.28);
    animation: pulse-silicon 2s infinite ease-in-out;
}

.potassium {
    background-color: rgba(210, 150, 255, 0.28);
    animation: pulse-potassium 2s infinite ease-in-out;
}

.uranium {
    background-color: rgba(50, 240, 110, 0.32);
    animation: pulse-uranium 2s infinite ease-in-out;
}

@keyframes pulse-white {
    70% {
        box-shadow: 0 0 10px 10px rgba(255, 255, 255, 0);
    }
}

@keyframes pulse-red {
    70% {
        box-shadow: 0 0 10px 10px rgba(255, 100, 100, 0);
    }
}

@keyframes pulse-blue {
    70% {
        box-shadow: 0 0 10px 10px rgba(100, 150, 255, 0);
    }
}

@keyframes pulse-green {
    70% {
        box-shadow: 0 0 10px 10px rgba(100, 255, 100, 0);
    }
}

@keyframes pulse-orange {
    70% {
        box-shadow: 0 0 10px 10px rgba(255, 165, 0, 0);
    }
}

@keyframes pulse-lime {
    70% {
        box-shadow: 0 0 10px 10px rgba(173, 255, 47, 0);
    }
}

@keyframes pulse-yellow-bright {
    70% {
        box-shadow: 0 0 10px 10px rgba(255, 230, 0, 0);
    }
}

@keyframes pulse-phosphorus {
    70% {
        box-shadow: 0 0 10px 10px rgba(255, 120, 80, 0);
    }
}

@keyframes pulse-magnesium {
    70% {
        box-shadow: 0 0 10px 10px rgba(220, 225, 235, 0);
    }
}

@keyframes pulse-fluorine {
    70% {
        box-shadow: 0 0 10px 10px rgba(180, 255, 120, 0);
    }
}

@keyframes pulse-iron {
    70% {
        box-shadow: 0 0 10px 10px rgba(160, 175, 195, 0);
    }
}

@keyframes pulse-copper {
    70% {
        box-shadow: 0 0 10px 10px rgba(220, 130, 80, 0);
    }
}

@keyframes pulse-aluminum {
    70% {
        box-shadow: 0 0 10px 10px rgba(200, 220, 235, 0);
    }
}

@keyframes pulse-silicon {
    70% {
        box-shadow: 0 0 10px 10px rgba(145, 185, 230, 0);
    }
}

@keyframes pulse-potassium {
    70% {
        box-shadow: 0 0 10px 10px rgba(210, 150, 255, 0);
    }
}

@keyframes pulse-uranium {
    70% {
        box-shadow: 0 0 14px 14px rgba(50, 240, 110, 0);
    }
}

/* --- Fusing Glows --- */
.fusing-blue {
    animation: pulse-fusing-blue 0.5s infinite ease-in-out !important;
}

.fusing-light-blue {
    animation: pulse-fusing-light-blue 0.5s infinite ease-in-out !important;
}

.fusing-dark-blue {
    animation: pulse-fusing-dark-blue 0.5s infinite ease-in-out !important;
}

.fusing-yellow {
    animation: pulse-fusing-yellow 0.5s infinite ease-in-out !important;
}

.fusing-green {
    animation: pulse-fusing-green 0.5s infinite ease-in-out !important;
}

.fusing-red {
    animation: pulse-fusing-red 0.5s infinite ease-in-out !important;
}

.fusing-light-yellow {
    animation: pulse-fusing-light-yellow 0.5s infinite ease-in-out !important;
}

.fusing-purple {
    animation: pulse-fusing-purple 0.5s infinite ease-in-out !important;
}

.fusing-brown {
    animation: pulse-fusing-brown 0.5s infinite ease-in-out !important;
}

.fusing-dark-red {
    animation: pulse-fusing-dark-red 0.5s infinite ease-in-out !important;
}

.fusing-cyan {
    animation: pulse-fusing-cyan 0.5s infinite ease-in-out !important;
}

.fusing-orange {
    animation: pulse-fusing-orange 0.5s infinite ease-in-out !important;
}

.fusing-pink {
    animation: pulse-fusing-pink 0.5s infinite ease-in-out !important;
}

.fusing-indigo {
    animation: pulse-fusing-indigo 0.5s infinite ease-in-out !important;
}

.fusing-lime {
    animation: pulse-fusing-lime 0.5s infinite ease-in-out !important;
}

.fusing-silver {
    animation: pulse-fusing-silver 0.5s infinite ease-in-out !important;
}

.fusing-gold {
    animation: pulse-fusing-gold 0.5s infinite ease-in-out !important;
}

.fusing-pale-green {
    animation: pulse-fusing-pale-green 0.5s infinite ease-in-out !important;
}

.fusing-amber {
    animation: pulse-fusing-amber 0.5s infinite ease-in-out !important;
}

.fusing-teal {
    animation: pulse-fusing-teal 0.5s infinite ease-in-out !important;
}

.fusing-white-flare {
    animation: pulse-fusing-white-flare 0.5s infinite ease-in-out !important;
}

.fusing-blue-silver {
    animation: pulse-fusing-blue-silver 0.5s infinite ease-in-out !important;
}

.fusing-orange-red {
    animation: pulse-fusing-orange-red 0.5s infinite ease-in-out !important;
}

.fusing-dark-copper {
    animation: pulse-fusing-dark-copper 0.5s infinite ease-in-out !important;
}

.fusing-cyan-blue {
    animation: pulse-fusing-cyan-blue 0.5s infinite ease-in-out !important;
}

.fusing-gold-bronze {
    animation: pulse-fusing-gold-bronze 0.5s infinite ease-in-out !important;
}

.fusing-blue-green {
    animation: pulse-fusing-blue-green 0.5s infinite ease-in-out !important;
}


@keyframes pulse-fusing-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(80, 150, 255, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(80, 150, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(80, 150, 255, 0);
    }
}

@keyframes pulse-fusing-light-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(120, 180, 255, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(120, 180, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(120, 180, 255, 0);
    }
}

@keyframes pulse-fusing-dark-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(50, 100, 200, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(50, 100, 200, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(50, 100, 200, 0);
    }
}

@keyframes pulse-fusing-yellow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 220, 50, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(255, 220, 50, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 220, 50, 0);
    }
}

@keyframes pulse-fusing-green {
    0% {
        box-shadow: 0 0 0 0 rgba(80, 255, 80, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(80, 255, 80, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(80, 255, 80, 0);
    }
}

@keyframes pulse-fusing-light-yellow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 240, 150, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(255, 240, 150, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 240, 150, 0);
    }
}

@keyframes pulse-fusing-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 80, 80, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(255, 80, 80, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 80, 80, 0);
    }
}

@keyframes pulse-fusing-purple {
    0% {
        box-shadow: 0 0 0 0 rgba(180, 100, 255, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(180, 100, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(180, 100, 255, 0);
    }
}

@keyframes pulse-fusing-brown {
    0% {
        box-shadow: 0 0 0 0 rgba(165, 100, 80, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(165, 100, 80, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(165, 100, 80, 0);
    }
}

@keyframes pulse-fusing-dark-red {
    0% {
        box-shadow: 0 0 0 0 rgba(180, 50, 50, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(180, 50, 50, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(180, 50, 50, 0);
    }
}

@keyframes pulse-fusing-cyan {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(0, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0);
    }
}

@keyframes pulse-fusing-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 165, 0, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(255, 165, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 165, 0, 0);
    }
}

@keyframes pulse-fusing-pink {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 105, 180, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(255, 105, 180, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 105, 180, 0);
    }
}

@keyframes pulse-fusing-indigo {
    0% {
        box-shadow: 0 0 0 0 rgba(75, 0, 130, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(75, 0, 130, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(75, 0, 130, 0);
    }
}

@keyframes pulse-fusing-lime {
    0% {
        box-shadow: 0 0 0 0 rgba(180, 255, 180, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(180, 255, 180, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(180, 255, 180, 0);
    }
}

@keyframes pulse-fusing-silver {
    0% {
        box-shadow: 0 0 0 0 rgba(192, 192, 192, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(192, 192, 192, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(192, 192, 192, 0);
    }
}

/* --- Explosion Flash --- */
@keyframes pulse-fusing-gold {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(255, 215, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

@keyframes pulse-fusing-pale-green {
    0% {
        box-shadow: 0 0 0 0 rgba(144, 238, 144, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(144, 238, 144, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(144, 238, 144, 0);
    }
}

@keyframes pulse-fusing-amber {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 140, 0, 0.9);
    }

    70% {
        box-shadow: 0 0 30px 18px rgba(255, 69, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 140, 0, 0);
    }
}

@keyframes pulse-fusing-teal {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 206, 209, 0.9);
    }

    70% {
        box-shadow: 0 0 25px 15px rgba(0, 206, 209, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 206, 209, 0);
    }
}

@keyframes pulse-fusing-white-flare {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 1);
    }

    70% {
        box-shadow: 0 0 35px 20px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

@keyframes pulse-fusing-blue-silver {
    0% {
        box-shadow: 0 0 0 0 rgba(190, 225, 255, 0.95);
    }

    70% {
        box-shadow: 0 0 28px 16px rgba(190, 225, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(190, 225, 255, 0);
    }
}

@keyframes pulse-fusing-orange-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 69, 0, 0.95);
    }

    70% {
        box-shadow: 0 0 30px 18px rgba(255, 69, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 69, 0, 0);
    }
}

@keyframes pulse-fusing-dark-copper {
    0% {
        box-shadow: 0 0 0 0 rgba(184, 115, 51, 0.95);
    }

    70% {
        box-shadow: 0 0 28px 16px rgba(184, 115, 51, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(184, 115, 51, 0);
    }
}

@keyframes pulse-fusing-cyan-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 191, 255, 0.95);
    }

    70% {
        box-shadow: 0 0 28px 16px rgba(0, 191, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 191, 255, 0);
    }
}

@keyframes pulse-fusing-gold-bronze {
    0% {
        box-shadow: 0 0 0 0 rgba(205, 127, 50, 0.95);
    }

    70% {
        box-shadow: 0 0 28px 16px rgba(205, 127, 50, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(205, 127, 50, 0);
    }
}

@keyframes pulse-fusing-blue-green {
    0% {
        box-shadow: 0 0 0 0 rgba(32, 178, 170, 0.95);
    }

    70% {
        box-shadow: 0 0 28px 16px rgba(32, 178, 170, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(32, 178, 170, 0);
    }
}

.explosion-flash {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 30%, rgba(255, 255, 255, 0) 65%);
    pointer-events: none;
    /* So it doesn't interfere with mouse events */
    transform-origin: center;
    animation: explosion-animation 0.4s ease-out forwards;
}

@keyframes explosion-animation {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* --- Molecule Base Styles --- */
.void-ground .atom {
    position: absolute;
    transform: scale(1.07);
    transform-origin: center center;
    will-change: transform;
}

.molecule {
    position: absolute;
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    /* filter: blur(5px) contrast(10); */
    /* Removed for sharper molecules */
    border-radius: 50%;
    /* Make pulse glow circular */
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
    transform: scale(1.07);
    transform-origin: center center;
    will-change: transform;
}

.molecule .atom-part {
    position: absolute;
    border-radius: 50%;
    box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.8;
}

.molecule .hydrogen {
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 5px 5px, #ffffff, #e6e6fa);
}

.molecule .carbon {
    width: 38px;
    height: 38px;
    background: radial-gradient(circle at 10px 10px, #ff9999, #c0392b);
}

.molecule .nitrogen {
    width: 38px;
    height: 38px;
    background: radial-gradient(circle at 10px 10px, #98fb98, #27ae60);
}

.molecule .oxygen {
    width: 38px;
    height: 38px;
    background: radial-gradient(circle at 10px 10px, #87cefa, #2980b9);
}

.molecule .chlorine {
    width: 38px;
    height: 38px;
    background: radial-gradient(circle at 10px 10px, #f4d03f, #16a085);
}

.molecule .sodium {
    width: 38px;
    height: 38px;
    background: radial-gradient(circle at 10px 10px, #f5b041, #d35400);
}

/* --- Detailed Molecule Colors & Structures --- */

/* Water (H2O) - Blue */
.water-molecule .oxygen {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #87cefa, #5096ff);
    z-index: 1;
}

.water-molecule .h1 {
    transform: rotate(45deg) translateX(25px) rotate(-45deg);
}

.water-molecule .h2 {
    transform: rotate(-45deg) translateX(25px) rotate(45deg);
}

/* Methane (CH4) - Yellow */
.methane-molecule .carbon {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #ffeea0, #ffd700);
    z-index: 1;
}

.methane-molecule .h1 {
    transform: translateY(-28px);
}

.methane-molecule .h2 {
    transform: translateY(28px);
}

.methane-molecule .h3 {
    transform: translateX(-28px);
}

.methane-molecule .h4 {
    transform: translateX(28px);
}

/* Methyl (CH3) - Light Yellow */
.methyl-molecule .carbon {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #fffacd, #fafad2);
    z-index: 1;
}

.methyl-molecule .h1 {
    transform: translateY(-28px);
}

.methyl-molecule .h2 {
    transform: rotate(120deg) translateY(-28px) rotate(-120deg);
}

.methyl-molecule .h3 {
    transform: rotate(240deg) translateY(-28px) rotate(-240deg);
}

/* Ammonia (NH3) - Green */
.ammonia-molecule .nitrogen {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #98fb98, #32cd32);
    z-index: 1;
}

.ammonia-molecule .h1 {
    transform: translateY(-28px);
}

.ammonia-molecule .h2 {
    transform: rotate(120deg) translateY(-28px) rotate(-120deg);
}

.ammonia-molecule .h3 {
    transform: rotate(240deg) translateY(-28px) rotate(-240deg);
}

/* Carbon Monoxide (CO) - Red */
.carbonmonoxide-molecule .carbon {
    width: 40px;
    height: 40px;
    transform: translateX(-15px);
    background: radial-gradient(circle at 10px 10px, #ff9999, #ff5050);
}

.carbonmonoxide-molecule .oxygen {
    width: 40px;
    height: 40px;
    transform: translateX(15px);
    background: radial-gradient(circle at 10px 10px, #87cefa, #5096ff);
}

/* Carbon Dioxide (CO2) - Dark Red */
.carbondioxide-molecule .carbon {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #cd5c5c, #b22222);
    z-index: 1;
}

.carbondioxide-molecule .oxygen {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #87cefa, #5096ff);
}

.carbondioxide-molecule .o1 {
    transform: translateX(-30px);
}

.carbondioxide-molecule .o2 {
    transform: translateX(30px);
}

/* Hydrogen Peroxide (H2O2) - Dark Blue (For Future) */
.hydrogenperoxide-molecule .o1 {
    width: 40px;
    height: 40px;
    transform: translateX(-15px);
    background: radial-gradient(circle at 10px 10px, #add8e6, #4682b4);
}

.hydrogenperoxide-molecule .o2 {
    width: 40px;
    height: 40px;
    transform: translateX(15px);
    background: radial-gradient(circle at 10px 10px, #add8e6, #4682b4);
}

.hydrogenperoxide-molecule .h1 {
    transform: translateX(-40px);
}

.hydrogenperoxide-molecule .h2 {
    transform: translateX(40px);
}

/* Dioxygen (O2) - Light Blue */
.dioxygen-molecule .oxygen {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #b0e0e6, #87ceeb);
}

.dioxygen-molecule .o1 {
    transform: translateX(-20px);
}

.dioxygen-molecule .o2 {
    transform: translateX(20px);
}

/* Dinitrogen (N2) - Light Green */
.dinitrogen-molecule .nitrogen {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #90ee90, #3cb371);
}

.dinitrogen-molecule .n1 {
    transform: translateX(-20px);
}

.dinitrogen-molecule .n2 {
    transform: translateX(20px);
}

/* Nitrogen Monoxide (NO) - Purple */
.nitrogenmonoxide-molecule .nitrogen {
    width: 40px;
    height: 40px;
    transform: translateX(-15px);
    background: radial-gradient(circle at 10px 10px, #e6e6fa, #9370db);
}

.nitrogenmonoxide-molecule .oxygen {
    width: 40px;
    height: 40px;
    transform: translateX(15px);
    background: radial-gradient(circle at 10px 10px, #87cefa, #5096ff);
}

/* Nitrogen Dioxide (NO2) - Brown */
.nitrogendioxide-molecule .nitrogen {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #d2b48c, #a0522d);
    z-index: 1;
}

.nitrogendioxide-molecule .oxygen {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #87cefa, #5096ff);
}

.nitrogendioxide-molecule .o1 {
    transform: rotate(55deg) translateX(30px) rotate(-55deg);
}

.nitrogendioxide-molecule .o2 {
    transform: rotate(-55deg) translateX(30px) rotate(55deg);
}

/* Ozone (O3) - Very Light Blue */
.ozone-molecule .oxygen {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #e0ffff, #afeeee);
}

.ozone-molecule .o1 {
    z-index: 1;
}

/* Central atom */
.ozone-molecule .o2 {
    transform: rotate(60deg) translateX(30px) rotate(-60deg);
}

.ozone-molecule .o3 {
    transform: rotate(-60deg) translateX(30px) rotate(60deg);
}

/* Hydrogen Cyanide (HCN) - Cyan/Pink */
.hydrogencyanide-molecule .carbon {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #ff9999, #ff5050);
}

.hydrogencyanide-molecule .hydrogen {
    transform: translateX(-35px);
}

.hydrogencyanide-molecule .nitrogen {
    width: 40px;
    height: 40px;
    transform: translateX(35px);
    background: radial-gradient(circle at 10px 10px, #90ee90, #3cb371);
}

/* Hydroxylamine (NH2OH) - Orange/Pink */
.hydroxylamine-molecule .nitrogen {
    width: 40px;
    height: 40px;
    transform: translateX(-15px);
    background: radial-gradient(circle at 10px 10px, #90ee90, #3cb371);
}

.hydroxylamine-molecule .oxygen {
    width: 40px;
    height: 40px;
    transform: translateX(15px);
    background: radial-gradient(circle at 10px 10px, #87cefa, #5096ff);
}

.hydroxylamine-molecule .hydrogen {
    transform: translateX(40px);
}

/* Nitrous Oxide (N2O) - Indigo */
.nitrousoxide-molecule .nitrogen {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #e6e6fa, #9370db);
}

.nitrousoxide-molecule .oxygen {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #87cefa, #5096ff);
}

.nitrousoxide-molecule .n1 {
    z-index: 1;
}

/* Central atom */
.nitrousoxide-molecule .n2 {
    transform: translateX(-35px);
}

.nitrousoxide-molecule .oxygen {
    transform: translateX(35px);
}

/* Formic Acid (HCOOH) - Lime */
.formicacid-molecule .carbon {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #f0fff0, #98fb98);
    z-index: 1;
}

.formicacid-molecule .oxygen {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #87cefa, #5096ff);
}

.formicacid-molecule .o1 {
    transform: translateY(-30px);
}

/* Double bond O */
.formicacid-molecule .o2 {
    transform: rotate(120deg) translateX(30px) rotate(-120deg);
}

/* OH group O */
.formicacid-molecule .h1 {
    transform: rotate(-120deg) translateX(30px) rotate(120deg);
}

/* H on C */

/* Urea (CO(NH2)2) - Silver */
.urea-molecule .carbon {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #f5f5f5, #c0c0c0);
    z-index: 1;
}

.urea-molecule .oxygen {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #87cefa, #5096ff);
    transform: translateY(-30px);
}

.urea-molecule .nitrogen {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #90ee90, #3cb371);
}

.urea-molecule .n1 {
    transform: rotate(120deg) translateX(30px) rotate(-120deg);
}

.urea-molecule .n2 {
    transform: rotate(-120deg) translateX(30px) rotate(120deg);
}

/* --- Sodium & Chlorine Molecules --- */
.molecule .sodium {
    width: 36px;
    height: 36px;
    background: radial-gradient(circle at 10px 10px, #ffeaa7, #e67e22);
}

.molecule .chlorine {
    width: 36px;
    height: 36px;
    background: radial-gradient(circle at 10px 10px, #e8f5e9, #2ecc71);
}

/* NaCl */
.nacl-molecule .sodium {
    transform: translateX(-18px);
}

.nacl-molecule .chlorine {
    transform: translateX(18px);
}

/* HCl */
.hcl-molecule .chlorine {
    transform: translateX(-10px);
}

.hcl-molecule .h1 {
    transform: translateX(20px);
}

/* Cl2 */
.cl2-molecule .cl1 {
    transform: translateX(-16px);
}

.cl2-molecule .cl2 {
    transform: translateX(16px);
}

/* NaOH */
.naoh-molecule .sodium {
    transform: translateX(-24px);
}

.naoh-molecule .oxygen {
    transform: translateX(6px);
}

.naoh-molecule .h1 {
    transform: translateX(28px);
}

/* CCl4 */
.ccl4-molecule .carbon {
    width: 36px;
    height: 36px;
    background: radial-gradient(circle at 10px 10px, #ffeea0, #e74c3c);
    z-index: 1;
}

.ccl4-molecule .cl1 {
    transform: translateY(-28px);
}

.ccl4-molecule .cl2 {
    transform: translateY(28px);
}

.ccl4-molecule .cl3 {
    transform: translateX(-28px);
}

.ccl4-molecule .cl4 {
    transform: translateX(28px);
}

/* --- Sulfur & Phosphorus Molecules --- */
.molecule .sulfur {
    width: 38px;
    height: 38px;
    background: radial-gradient(circle at 10px 10px, #fff3b0, #f39c12);
}

.molecule .phosphorus {
    width: 38px;
    height: 38px;
    background: radial-gradient(circle at 10px 10px, #ffccd5, #c0392b);
}

/* H2S */
.h2s-molecule .h1 {
    transform: rotate(45deg) translateX(24px) rotate(-45deg);
}

.h2s-molecule .h2 {
    transform: rotate(-45deg) translateX(24px) rotate(45deg);
}

/* SO2 */
.so2-molecule .o1 {
    transform: rotate(60deg) translateX(26px) rotate(-60deg);
}

.so2-molecule .o2 {
    transform: rotate(-60deg) translateX(26px) rotate(60deg);
}

/* SO3 */
.so3-molecule .o1 {
    transform: translateY(-28px);
}

.so3-molecule .o2 {
    transform: rotate(120deg) translateY(-28px) rotate(-120deg);
}

.so3-molecule .o3 {
    transform: rotate(240deg) translateY(-28px) rotate(-240deg);
}

/* H2SO4 */
.h2so4-molecule .o1 {
    transform: translateY(-30px);
}

.h2so4-molecule .o2 {
    transform: translateY(30px);
}

.h2so4-molecule .o3 {
    transform: translateX(-30px);
}

.h2so4-molecule .o4 {
    transform: translateX(30px);
}

.h2so4-molecule .h1 {
    transform: translateX(-48px) translateY(-10px);
}

.h2so4-molecule .h2 {
    transform: translateX(48px) translateY(10px);
}

/* PH3 */
.ph3-molecule .h1 {
    transform: translateY(-26px);
}

.ph3-molecule .h2 {
    transform: rotate(120deg) translateY(-26px) rotate(-120deg);
}

.ph3-molecule .h3 {
    transform: rotate(240deg) translateY(-26px) rotate(-240deg);
}

/* CS2 */
.cs2-molecule .carbon {
    width: 36px;
    height: 36px;
    background: radial-gradient(circle at 10px 10px, #ffeea0, #e74c3c);
    z-index: 1;
}

.cs2-molecule .s1 {
    transform: translateX(-28px);
}

.cs2-molecule .s2 {
    transform: translateX(28px);
}

/* PCl3 */
.pcl3-molecule .cl1 {
    transform: translateY(-28px);
}

.pcl3-molecule .cl2 {
    transform: rotate(120deg) translateY(-28px) rotate(-120deg);
}

.pcl3-molecule .cl3 {
    transform: rotate(240deg) translateY(-28px) rotate(-240deg);
}

/* --- Magnesium & Fluorine Molecules --- */
.molecule .magnesium {
    width: 38px;
    height: 38px;
    background: radial-gradient(circle at 10px 10px, #ffffff, #95a5a6);
}

.molecule .fluorine {
    width: 32px;
    height: 32px;
    background: radial-gradient(circle at 10px 10px, #d4edda, #27ae60);
}

/* MgO */
.mgo-molecule .magnesium {
    transform: translateX(-16px);
}

.mgo-molecule .oxygen {
    transform: translateX(16px);
}

/* HF */
.hf-molecule .fluorine {
    transform: translateX(-10px);
}

.hf-molecule .h1 {
    transform: translateX(18px);
}

/* MgCl2 */
.mgcl2-molecule .magnesium {
    z-index: 1;
}

.mgcl2-molecule .cl1 {
    transform: translateX(-28px);
}

.mgcl2-molecule .cl2 {
    transform: translateX(28px);
}

/* NaF */
.naf-molecule .sodium {
    transform: translateX(-16px);
}

.naf-molecule .fluorine {
    transform: translateX(16px);
}

/* F2 */
.f2-molecule .f1 {
    transform: translateX(-14px);
}

.f2-molecule .f2 {
    transform: translateX(14px);
}

/* CF4 */
.cf4-molecule .carbon {
    width: 36px;
    height: 36px;
    background: radial-gradient(circle at 10px 10px, #ffeea0, #e74c3c);
    z-index: 1;
}

.cf4-molecule .f1 {
    transform: translateY(-26px);
}

.cf4-molecule .f2 {
    transform: translateY(26px);
}

.cf4-molecule .f3 {
    transform: translateX(-26px);
}

.cf4-molecule .f4 {
    transform: translateX(26px);
}

/* MgF2 */
.mgf2-molecule .magnesium {
    z-index: 1;
}

.mgf2-molecule .f1 {
    transform: translateX(-26px);
}

.mgf2-molecule .f2 {
    transform: translateX(26px);
}

/* --- Iron & Copper Molecules --- */
.molecule .iron {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #e2e8f0, #475569);
}

.molecule .copper {
    width: 38px;
    height: 38px;
    background: radial-gradient(circle at 10px 10px, #ffedd5, #c2410c);
}

.molecule .aluminum {
    width: 38px;
    height: 38px;
    background: radial-gradient(circle at 10px 10px, #f8fafc, #94a3b8);
}

.molecule .silicon {
    width: 38px;
    height: 38px;
    background: radial-gradient(circle at 10px 10px, #cbd5e1, #475569);
}

.molecule .potassium {
    width: 42px;
    height: 42px;
    background: radial-gradient(circle at 12px 12px, #f3e8ff, #9333ea);
}

.molecule .uranium {
    width: 44px;
    height: 44px;
    background: radial-gradient(circle at 12px 12px, #ecfccb, #65a30d);
}

/* FeO */
.feo-molecule .iron {
    transform: translateX(-16px);
}

.feo-molecule .oxygen {
    transform: translateX(16px);
}

/* FeCl2 */
.fecl2-molecule .iron {
    z-index: 1;
}

.fecl2-molecule .cl1 {
    transform: translateX(-28px);
}

.fecl2-molecule .cl2 {
    transform: translateX(28px);
}

/* CuO */
.cuo-molecule .copper {
    transform: translateX(-16px);
}

.cuo-molecule .oxygen {
    transform: translateX(16px);
}

/* CuCl2 */
.cucl2-molecule .copper {
    z-index: 1;
}

.cucl2-molecule .cl1 {
    transform: translateX(-28px);
}

.cucl2-molecule .cl2 {
    transform: translateX(28px);
}

/* CuS */
.cus-molecule .copper {
    transform: translateX(-16px);
}

.cus-molecule .sulfur {
    transform: translateX(16px);
}

/* FeS */
.fes-molecule .iron {
    transform: translateX(-16px);
}

.fes-molecule .sulfur {
    transform: translateX(16px);
}

/* CuF2 */
.cuf2-molecule .copper {
    z-index: 1;
}

.cuf2-molecule .f1 {
    transform: translateX(-26px);
}

.cuf2-molecule .f2 {
    transform: translateX(26px);
}

/* --- Batch 6 Molecules --- */

/* H2 */
.h2-molecule .h1 {
    transform: translateX(-12px);
}

.h2-molecule .h2 {
    transform: translateX(12px);
}

/* Fe2O3 */
.fe2o3-molecule .fe1 {
    transform: translateX(-24px);
    z-index: 1;
}

.fe2o3-molecule .fe2 {
    transform: translateX(24px);
    z-index: 1;
}

.fe2o3-molecule .o1 {
    transform: translateY(-22px);
}

.fe2o3-molecule .o2 {
    transform: translateY(22px);
}

.fe2o3-molecule .o3 {
    transform: translateX(0px);
}

/* FeCl3 */
.fecl3-molecule .iron {
    z-index: 1;
}

.fecl3-molecule .cl1 {
    transform: translateY(-28px);
}

.fecl3-molecule .cl2 {
    transform: rotate(120deg) translateY(-28px) rotate(-120deg);
}

.fecl3-molecule .cl3 {
    transform: rotate(240deg) translateY(-28px) rotate(-240deg);
}

/* CuSO4 */
.cuso4-molecule .copper {
    transform: translateX(-30px);
    z-index: 2;
}

.cuso4-molecule .sulfur {
    transform: translateX(10px);
    z-index: 1;
}

.cuso4-molecule .o1 {
    transform: translateX(10px) translateY(-26px);
}

.cuso4-molecule .o2 {
    transform: translateX(10px) translateY(26px);
}

.cuso4-molecule .o3 {
    transform: translateX(36px);
}

.cuso4-molecule .o4 {
    transform: translateX(-12px);
}

/* FeSO4 */
.feso4-molecule .iron {
    transform: translateX(-30px);
    z-index: 2;
}

.feso4-molecule .sulfur {
    transform: translateX(10px);
    z-index: 1;
}

.feso4-molecule .o1 {
    transform: translateX(10px) translateY(-26px);
}

.feso4-molecule .o2 {
    transform: translateX(10px) translateY(26px);
}

.feso4-molecule .o3 {
    transform: translateX(36px);
}

.feso4-molecule .o4 {
    transform: translateX(-12px);
}

/* MgSO4 */
.mgso4-molecule .magnesium {
    transform: translateX(-30px);
    z-index: 2;
}

.mgso4-molecule .sulfur {
    transform: translateX(10px);
    z-index: 1;
}

.mgso4-molecule .o1 {
    transform: translateX(10px) translateY(-26px);
}

.mgso4-molecule .o2 {
    transform: translateX(10px) translateY(26px);
}

.mgso4-molecule .o3 {
    transform: translateX(36px);
}

.mgso4-molecule .o4 {
    transform: translateX(-12px);
}

/* CuFeS2 */
.cufes2-molecule .copper {
    transform: translateX(-26px);
    z-index: 1;
}

.cufes2-molecule .iron {
    transform: translateX(26px);
    z-index: 1;
}

.cufes2-molecule .s1 {
    transform: translateY(-24px);
}

.cufes2-molecule .s2 {
    transform: translateY(24px);
}

/* --- Batch 7 Molecules --- */

/* NaHCO3 */
.nahco3-molecule .carbon {
    z-index: 2;
}

.nahco3-molecule .sodium {
    transform: translateX(-32px);
    z-index: 1;
}

.nahco3-molecule .hydrogen {
    transform: translateX(32px) translateY(-14px);
    z-index: 1;
}

.nahco3-molecule .o1 {
    transform: translateY(-26px);
}

.nahco3-molecule .o2 {
    transform: translateY(26px);
}

.nahco3-molecule .o3 {
    transform: translateX(20px) translateY(14px);
}

/* Na2CO3 */
.na2co3-molecule .carbon {
    z-index: 2;
}

.na2co3-molecule .na1 {
    transform: translateX(-32px);
    z-index: 1;
}

.na2co3-molecule .na2 {
    transform: translateX(32px);
    z-index: 1;
}

.na2co3-molecule .o1 {
    transform: translateY(-26px);
}

.na2co3-molecule .o2 {
    transform: rotate(120deg) translateY(-26px) rotate(-120deg);
}

.na2co3-molecule .o3 {
    transform: rotate(240deg) translateY(-26px) rotate(-240deg);
}

/* Mg(OH)2 */
.mgoh2-molecule .magnesium {
    z-index: 2;
}

.mgoh2-molecule .o1 {
    transform: translateX(-24px);
}

.mgoh2-molecule .h1 {
    transform: translateX(-42px);
}

.mgoh2-molecule .o2 {
    transform: translateX(24px);
}

.mgoh2-molecule .h2 {
    transform: translateX(42px);
}

/* NH4Cl */
.nh4cl-molecule .nitrogen {
    z-index: 2;
}

.nh4cl-molecule .h1 {
    transform: translateY(-24px);
}

.nh4cl-molecule .h2 {
    transform: translateY(24px);
}

.nh4cl-molecule .h3 {
    transform: translateX(-24px);
}

.nh4cl-molecule .h4 {
    transform: translateX(24px);
}

.nh4cl-molecule .chlorine {
    transform: translateX(40px) translateY(20px);
    z-index: 1;
}

/* --- Batch 8 Molecules (Organic & Alcohols) --- */

/* CH3OH */
.ch3oh-molecule .carbon {
    transform: translateX(-16px);
    z-index: 2;
}

.ch3oh-molecule .oxygen {
    transform: translateX(18px);
    z-index: 2;
}

.ch3oh-molecule .h1 {
    transform: translateX(-38px);
}

.ch3oh-molecule .h2 {
    transform: translateX(-16px) translateY(-24px);
}

.ch3oh-molecule .h3 {
    transform: translateX(-16px) translateY(24px);
}

.ch3oh-molecule .h4 {
    transform: translateX(36px) translateY(-14px);
}

/* C2H5OH */
.c2h5oh-molecule .c1 {
    transform: translateX(-28px);
    z-index: 2;
}

.c2h5oh-molecule .c2 {
    transform: translateX(4px);
    z-index: 2;
}

.c2h5oh-molecule .oxygen {
    transform: translateX(32px);
    z-index: 2;
}

.c2h5oh-molecule .h1 {
    transform: translateX(-48px);
}

.c2h5oh-molecule .h2 {
    transform: translateX(-28px) translateY(-24px);
}

.c2h5oh-molecule .h3 {
    transform: translateX(-28px) translateY(24px);
}

.c2h5oh-molecule .h4 {
    transform: translateX(4px) translateY(-24px);
}

.c2h5oh-molecule .h5 {
    transform: translateX(4px) translateY(24px);
}

.c2h5oh-molecule .h6 {
    transform: translateX(48px) translateY(-14px);
}

/* CH3COOH */
.ch3cooh-molecule .c1 {
    transform: translateX(-24px);
    z-index: 2;
}

.ch3cooh-molecule .c2 {
    transform: translateX(10px);
    z-index: 2;
}

.ch3cooh-molecule .o1 {
    transform: translateX(10px) translateY(-26px);
}

.ch3cooh-molecule .o2 {
    transform: translateX(34px);
    z-index: 2;
}

.ch3cooh-molecule .h1 {
    transform: translateX(-46px);
}

.ch3cooh-molecule .h2 {
    transform: translateX(-24px) translateY(-24px);
}

.ch3cooh-molecule .h3 {
    transform: translateX(-24px) translateY(24px);
}

.ch3cooh-molecule .h4 {
    transform: translateX(50px) translateY(-14px);
}

/* C2H2 (Linear Alkuna) */
.c2h2-molecule .c1 {
    transform: translateX(-14px);
    z-index: 2;
}

.c2h2-molecule .c2 {
    transform: translateX(14px);
    z-index: 2;
}

.c2h2-molecule .h1 {
    transform: translateX(-38px);
}

.c2h2-molecule .h2 {
    transform: translateX(38px);
}

/* C2H4 (Planar Alkena) */
.c2h4-molecule .c1 {
    transform: translateX(-16px);
    z-index: 2;
}

.c2h4-molecule .c2 {
    transform: translateX(16px);
    z-index: 2;
}

.c2h4-molecule .h1 {
    transform: translateX(-36px) translateY(-20px);
}

.c2h4-molecule .h2 {
    transform: translateX(-36px) translateY(20px);
}

.c2h4-molecule .h3 {
    transform: translateX(36px) translateY(-20px);
}

.c2h4-molecule .h4 {
    transform: translateX(36px) translateY(20px);
}

/* CH3Cl */
.ch3cl-molecule .carbon {
    transform: translateX(-10px);
    z-index: 2;
}

.ch3cl-molecule .chlorine {
    transform: translateX(24px);
    z-index: 1;
}

.ch3cl-molecule .h1 {
    transform: translateX(-32px);
}

.ch3cl-molecule .h2 {
    transform: translateX(-10px) translateY(-24px);
}

.ch3cl-molecule .h3 {
    transform: translateX(-10px) translateY(24px);
}

/* HCONH2 */
.hconh2-molecule .carbon {
    transform: translateX(-8px);
    z-index: 2;
}

.hconh2-molecule .oxygen {
    transform: translateX(-8px) translateY(-26px);
}

.hconh2-molecule .nitrogen {
    transform: translateX(20px);
    z-index: 2;
}

.hconh2-molecule .h1 {
    transform: translateX(-30px);
}

.hconh2-molecule .h2 {
    transform: translateX(38px) translateY(-14px);
}

.hconh2-molecule .h3 {
    transform: translateX(38px) translateY(14px);
}

/* --- Batch 9 Molecules (Halides, Phosphates, Organics & Metal Oxides) --- */

/* SF6 */
.sf6-molecule .sulfur {
    z-index: 2;
}

.sf6-molecule .f1 {
    transform: translateY(-28px);
}

.sf6-molecule .f2 {
    transform: translateY(28px);
}

.sf6-molecule .f3 {
    transform: translateX(-28px);
}

.sf6-molecule .f4 {
    transform: translateX(28px);
}

.sf6-molecule .f5 {
    transform: translateX(-20px) translateY(-20px);
}

.sf6-molecule .f6 {
    transform: translateX(20px) translateY(20px);
}

/* NF3 */
.nf3-molecule .nitrogen {
    z-index: 2;
}

.nf3-molecule .f1 {
    transform: translateY(-26px);
}

.nf3-molecule .f2 {
    transform: rotate(120deg) translateY(-26px) rotate(-120deg);
}

.nf3-molecule .f3 {
    transform: rotate(240deg) translateY(-26px) rotate(-240deg);
}

/* PF5 */
.pf5-molecule .phosphorus {
    z-index: 2;
}

.pf5-molecule .f1 {
    transform: translateY(-30px);
}

.pf5-molecule .f2 {
    transform: translateY(30px);
}

.pf5-molecule .f3 {
    transform: translateX(-26px);
}

.pf5-molecule .f4 {
    transform: rotate(60deg) translateX(26px) rotate(-60deg);
}

.pf5-molecule .f5 {
    transform: rotate(-60deg) translateX(26px) rotate(60deg);
}

/* PCl5 */
.pcl5-molecule .phosphorus {
    z-index: 2;
}

.pcl5-molecule .cl1 {
    transform: translateY(-32px);
}

.pcl5-molecule .cl2 {
    transform: translateY(32px);
}

.pcl5-molecule .cl3 {
    transform: translateX(-28px);
}

.pcl5-molecule .cl4 {
    transform: rotate(60deg) translateX(28px) rotate(-60deg);
}

.pcl5-molecule .cl5 {
    transform: rotate(-60deg) translateX(28px) rotate(60deg);
}

/* H3PO4 */
.h3po4-molecule .phosphorus {
    z-index: 2;
}

.h3po4-molecule .o1 {
    transform: translateY(-26px);
}

.h3po4-molecule .o2 {
    transform: translateX(-26px);
}

.h3po4-molecule .o3 {
    transform: translateX(26px);
}

.h3po4-molecule .o4 {
    transform: translateY(26px);
}

.h3po4-molecule .h1 {
    transform: translateX(-44px);
}

.h3po4-molecule .h2 {
    transform: translateX(44px);
}

.h3po4-molecule .h3 {
    transform: translateY(44px);
}

/* COCl2 */
.cocl2-molecule .carbon {
    z-index: 2;
}

.cocl2-molecule .oxygen {
    transform: translateY(-26px);
}

.cocl2-molecule .cl1 {
    transform: translateX(-26px) translateY(20px);
}

.cocl2-molecule .cl2 {
    transform: translateX(26px) translateY(20px);
}

/* CH2Cl2 */
.ch2cl2-molecule .carbon {
    z-index: 2;
}

.ch2cl2-molecule .h1 {
    transform: translateX(-22px) translateY(-20px);
}

.ch2cl2-molecule .h2 {
    transform: translateX(22px) translateY(-20px);
}

.ch2cl2-molecule .cl1 {
    transform: translateX(-26px) translateY(22px);
}

.ch2cl2-molecule .cl2 {
    transform: translateX(26px) translateY(22px);
}

/* C2H6 */
.c2h6-molecule .c1 {
    transform: translateX(-16px);
    z-index: 2;
}

.c2h6-molecule .c2 {
    transform: translateX(16px);
    z-index: 2;
}

.c2h6-molecule .h1 {
    transform: translateX(-38px);
}

.c2h6-molecule .h2 {
    transform: translateX(-20px) translateY(-24px);
}

.c2h6-molecule .h3 {
    transform: translateX(-20px) translateY(24px);
}

.c2h6-molecule .h4 {
    transform: translateX(38px);
}

.c2h6-molecule .h5 {
    transform: translateX(20px) translateY(-24px);
}

.c2h6-molecule .h6 {
    transform: translateX(20px) translateY(24px);
}

/* CH3NH2 */
.ch3nh2-molecule .carbon {
    transform: translateX(-16px);
    z-index: 2;
}

.ch3nh2-molecule .nitrogen {
    transform: translateX(16px);
    z-index: 2;
}

.ch3nh2-molecule .h-c1 {
    transform: translateX(-38px);
}

.ch3nh2-molecule .h-c2 {
    transform: translateX(-20px) translateY(-24px);
}

.ch3nh2-molecule .h-c3 {
    transform: translateX(-20px) translateY(24px);
}

.ch3nh2-molecule .h-n1 {
    transform: translateX(34px) translateY(-16px);
}

.ch3nh2-molecule .h-n2 {
    transform: translateX(34px) translateY(16px);
}

/* Fe3O4 */
.fe3o4-molecule .fe1 {
    transform: translateX(-24px);
    z-index: 2;
}

.fe3o4-molecule .fe2 {
    transform: translateX(0px);
    z-index: 2;
}

.fe3o4-molecule .fe3 {
    transform: translateX(24px);
    z-index: 2;
}

.fe3o4-molecule .o1 {
    transform: translateX(-12px) translateY(-24px);
}

.fe3o4-molecule .o2 {
    transform: translateX(12px) translateY(-24px);
}

.fe3o4-molecule .o3 {
    transform: translateX(-12px) translateY(24px);
}

.fe3o4-molecule .o4 {
    transform: translateX(12px) translateY(24px);
}

/* Cu2O */
.cu2o-molecule .oxygen {
    transform: translateX(0px);
    z-index: 1;
}

.cu2o-molecule .cu1 {
    transform: translateX(-24px);
    z-index: 2;
}

.cu2o-molecule .cu2 {
    transform: translateX(24px);
    z-index: 2;
}

/* CuCl */
.cucl-molecule .copper {
    transform: translateX(-14px);
    z-index: 2;
}

.cucl-molecule .chlorine {
    transform: translateX(14px);
    z-index: 1;
}

/* --- Batch 10 Molecules (22 Advanced Compounds) --- */

/* CHCl3 */
.chcl3-molecule .carbon {
    z-index: 2;
}

.chcl3-molecule .hydrogen {
    transform: translateY(-24px);
}

.chcl3-molecule .cl1 {
    transform: translateX(-26px) translateY(18px);
}

.chcl3-molecule .cl2 {
    transform: translateX(26px) translateY(18px);
}

.chcl3-molecule .cl3 {
    transform: translateY(30px);
}

/* C2H5Cl */
.c2h5cl-molecule .c1 {
    transform: translateX(-20px);
    z-index: 2;
}

.c2h5cl-molecule .c2 {
    transform: translateX(12px);
    z-index: 2;
}

.c2h5cl-molecule .h1 {
    transform: translateX(-40px);
}

.c2h5cl-molecule .h2 {
    transform: translateX(-20px) translateY(-24px);
}

.c2h5cl-molecule .h3 {
    transform: translateX(-20px) translateY(24px);
}

.c2h5cl-molecule .h4 {
    transform: translateX(12px) translateY(-24px);
}

.c2h5cl-molecule .h5 {
    transform: translateX(12px) translateY(24px);
}

.c2h5cl-molecule .chlorine {
    transform: translateX(38px);
    z-index: 1;
}

/* CF2Cl2 */
.cf2cl2-molecule .carbon {
    z-index: 2;
}

.cf2cl2-molecule .f1 {
    transform: translateX(-22px) translateY(-22px);
}

.cf2cl2-molecule .f2 {
    transform: translateX(22px) translateY(-22px);
}

.cf2cl2-molecule .cl1 {
    transform: translateX(-26px) translateY(22px);
}

.cf2cl2-molecule .cl2 {
    transform: translateX(26px) translateY(22px);
}

/* CH3COOCH3 */
.ch3cooch3-molecule .c1 {
    transform: translateX(-38px);
    z-index: 2;
}

.ch3cooch3-molecule .h-c1-1 {
    transform: translateX(-56px);
}

.ch3cooch3-molecule .h-c1-2 {
    transform: translateX(-38px) translateY(-22px);
}

.ch3cooch3-molecule .h-c1-3 {
    transform: translateX(-38px) translateY(22px);
}

.ch3cooch3-molecule .c2 {
    transform: translateX(-12px);
    z-index: 2;
}

.ch3cooch3-molecule .o1 {
    transform: translateX(-12px) translateY(-26px);
}

.ch3cooch3-molecule .o2 {
    transform: translateX(14px);
    z-index: 2;
}

.ch3cooch3-molecule .c3 {
    transform: translateX(40px);
    z-index: 2;
}

.ch3cooch3-molecule .h-c3-1 {
    transform: translateX(58px);
}

.ch3cooch3-molecule .h-c3-2 {
    transform: translateX(40px) translateY(-22px);
}

.ch3cooch3-molecule .h-c3-3 {
    transform: translateX(40px) translateY(22px);
}

/* CH3COOC2H5 */
.ch3cooc2h5-molecule .c1 {
    transform: translateX(-50px);
    z-index: 2;
}

.ch3cooc2h5-molecule .h-c1-1 {
    transform: translateX(-68px);
}

.ch3cooc2h5-molecule .h-c1-2 {
    transform: translateX(-50px) translateY(-22px);
}

.ch3cooc2h5-molecule .h-c1-3 {
    transform: translateX(-50px) translateY(22px);
}

.ch3cooc2h5-molecule .c2 {
    transform: translateX(-24px);
    z-index: 2;
}

.ch3cooc2h5-molecule .o1 {
    transform: translateX(-24px) translateY(-26px);
}

.ch3cooc2h5-molecule .o2 {
    transform: translateX(0px);
    z-index: 2;
}

.ch3cooc2h5-molecule .c3 {
    transform: translateX(26px);
    z-index: 2;
}

.ch3cooc2h5-molecule .h-c3-1 {
    transform: translateX(26px) translateY(-22px);
}

.ch3cooc2h5-molecule .h-c3-2 {
    transform: translateX(26px) translateY(22px);
}

.ch3cooc2h5-molecule .c4 {
    transform: translateX(52px);
    z-index: 2;
}

.ch3cooc2h5-molecule .h-c4-1 {
    transform: translateX(70px);
}

.ch3cooc2h5-molecule .h-c4-2 {
    transform: translateX(52px) translateY(-22px);
}

.ch3cooc2h5-molecule .h-c4-3 {
    transform: translateX(52px) translateY(22px);
}

/* CH3CONH2 */
.ch3conh2-molecule .c1 {
    transform: translateX(-26px);
    z-index: 2;
}

.ch3conh2-molecule .h-c1-1 {
    transform: translateX(-46px);
}

.ch3conh2-molecule .h-c1-2 {
    transform: translateX(-26px) translateY(-24px);
}

.ch3conh2-molecule .h-c1-3 {
    transform: translateX(-26px) translateY(24px);
}

.ch3conh2-molecule .c2 {
    transform: translateX(4px);
    z-index: 2;
}

.ch3conh2-molecule .oxygen {
    transform: translateX(4px) translateY(-26px);
}

.ch3conh2-molecule .nitrogen {
    transform: translateX(32px);
    z-index: 2;
}

.ch3conh2-molecule .h-n-1 {
    transform: translateX(48px) translateY(-14px);
}

.ch3conh2-molecule .h-n-2 {
    transform: translateX(48px) translateY(14px);
}

/* SO2Cl2 */
.so2cl2-molecule .sulfur {
    z-index: 2;
}

.so2cl2-molecule .o1 {
    transform: translateY(-26px);
}

.so2cl2-molecule .o2 {
    transform: translateY(26px);
}

.so2cl2-molecule .cl1 {
    transform: translateX(-28px);
}

.so2cl2-molecule .cl2 {
    transform: translateX(28px);
}

/* POCl3 */
.pocl3-molecule .phosphorus {
    z-index: 2;
}

.pocl3-molecule .oxygen {
    transform: translateY(-28px);
}

.pocl3-molecule .cl1 {
    transform: translateX(-26px) translateY(20px);
}

.pocl3-molecule .cl2 {
    transform: translateX(26px) translateY(20px);
}

.pocl3-molecule .cl3 {
    transform: translateY(32px);
}

/* P2O5 */
.p2o5-molecule .p1 {
    transform: translateX(-22px);
    z-index: 2;
}

.p2o5-molecule .p2 {
    transform: translateX(22px);
    z-index: 2;
}

.p2o5-molecule .o1 {
    transform: translateX(0px);
    z-index: 1;
}

.p2o5-molecule .o2 {
    transform: translateX(-22px) translateY(-24px);
}

.p2o5-molecule .o3 {
    transform: translateX(22px) translateY(-24px);
}

.p2o5-molecule .o4 {
    transform: translateX(-22px) translateY(24px);
}

.p2o5-molecule .o5 {
    transform: translateX(22px) translateY(24px);
}

/* H2SO3 */
.h2so3-molecule .sulfur {
    z-index: 2;
}

.h2so3-molecule .o1 {
    transform: translateY(-24px);
}

.h2so3-molecule .o2 {
    transform: translateX(-24px) translateY(12px);
}

.h2so3-molecule .o3 {
    transform: translateX(24px) translateY(12px);
}

.h2so3-molecule .h1 {
    transform: translateX(-40px) translateY(22px);
}

.h2so3-molecule .h2 {
    transform: translateX(40px) translateY(22px);
}

/* HNO3 */
.hno3-molecule .nitrogen {
    z-index: 2;
}

.hno3-molecule .o1 {
    transform: translateY(-24px);
}

.hno3-molecule .o2 {
    transform: translateX(-24px) translateY(14px);
}

.hno3-molecule .o3 {
    transform: translateX(24px) translateY(14px);
}

.hno3-molecule .hydrogen {
    transform: translateX(42px) translateY(20px);
}

/* Na2SO4 */
.na2so4-molecule .sulfur {
    z-index: 2;
}

.na2so4-molecule .na1 {
    transform: translateX(-42px);
    z-index: 2;
}

.na2so4-molecule .na2 {
    transform: translateX(42px);
    z-index: 2;
}

.na2so4-molecule .o1 {
    transform: translateY(-24px);
}

.na2so4-molecule .o2 {
    transform: translateY(24px);
}

.na2so4-molecule .o3 {
    transform: translateX(-22px);
}

.na2so4-molecule .o4 {
    transform: translateX(22px);
}

/* Na2S */
.na2s-molecule .sulfur {
    z-index: 1;
}

.na2s-molecule .na1 {
    transform: translateX(-26px);
    z-index: 2;
}

.na2s-molecule .na2 {
    transform: translateX(26px);
    z-index: 2;
}

/* NaCN */
.nacn-molecule .sodium {
    transform: translateX(-28px);
    z-index: 2;
}

.nacn-molecule .carbon {
    transform: translateX(0px);
    z-index: 2;
}

.nacn-molecule .nitrogen {
    transform: translateX(26px);
    z-index: 2;
}

/* NH4NO3 */
.nh4no3-molecule .n1 {
    transform: translateX(-24px);
    z-index: 2;
}

.nh4no3-molecule .h1 {
    transform: translateX(-44px);
}

.nh4no3-molecule .h2 {
    transform: translateX(-24px) translateY(-22px);
}

.nh4no3-molecule .h3 {
    transform: translateX(-24px) translateY(22px);
}

.nh4no3-molecule .h4 {
    transform: translateX(-6px);
}

.nh4no3-molecule .n2 {
    transform: translateX(24px);
    z-index: 2;
}

.nh4no3-molecule .o1 {
    transform: translateX(24px) translateY(-24px);
}

.nh4no3-molecule .o2 {
    transform: translateX(24px) translateY(24px);
}

.nh4no3-molecule .o3 {
    transform: translateX(44px);
}

/* (NH4)2SO4 */
.nh42so4-molecule .sulfur {
    z-index: 2;
}

.nh42so4-molecule .o1 {
    transform: translateY(-22px);
}

.nh42so4-molecule .o2 {
    transform: translateY(22px);
}

.nh42so4-molecule .o3 {
    transform: translateX(-20px);
}

.nh42so4-molecule .o4 {
    transform: translateX(20px);
}

.nh42so4-molecule .n1 {
    transform: translateX(-46px);
    z-index: 2;
}

.nh42so4-molecule .h-n1-1 {
    transform: translateX(-64px);
}

.nh42so4-molecule .h-n1-2 {
    transform: translateX(-46px) translateY(-20px);
}

.nh42so4-molecule .h-n1-3 {
    transform: translateX(-46px) translateY(20px);
}

.nh42so4-molecule .h-n1-4 {
    transform: translateX(-28px);
}

.nh42so4-molecule .n2 {
    transform: translateX(46px);
    z-index: 2;
}

.nh42so4-molecule .h-n2-1 {
    transform: translateX(64px);
}

.nh42so4-molecule .h-n2-2 {
    transform: translateX(46px) translateY(-20px);
}

.nh42so4-molecule .h-n2-3 {
    transform: translateX(46px) translateY(20px);
}

.nh42so4-molecule .h-n2-4 {
    transform: translateX(28px);
}

/* FeS2 */
.fes2-molecule .iron {
    z-index: 2;
}

.fes2-molecule .s1 {
    transform: translateX(-22px);
}

.fes2-molecule .s2 {
    transform: translateX(22px);
}

/* Cu2S */
.cu2s-molecule .sulfur {
    z-index: 1;
}

.cu2s-molecule .cu1 {
    transform: translateX(-24px);
    z-index: 2;
}

.cu2s-molecule .cu2 {
    transform: translateX(24px);
    z-index: 2;
}

/* MgCO3 */
.mgco3-molecule .magnesium {
    transform: translateX(-26px);
    z-index: 2;
}

.mgco3-molecule .carbon {
    transform: translateX(8px);
    z-index: 2;
}

.mgco3-molecule .o1 {
    transform: translateX(8px) translateY(-24px);
}

.mgco3-molecule .o2 {
    transform: translateX(8px) translateY(24px);
}

.mgco3-molecule .o3 {
    transform: translateX(30px);
}

/* FeCO3 */
.feco3-molecule .iron {
    transform: translateX(-26px);
    z-index: 2;
}

.feco3-molecule .carbon {
    transform: translateX(8px);
    z-index: 2;
}

.feco3-molecule .o1 {
    transform: translateX(8px) translateY(-24px);
}

.feco3-molecule .o2 {
    transform: translateX(8px) translateY(24px);
}

.feco3-molecule .o3 {
    transform: translateX(30px);
}

/* CuCO3 */
.cuco3-molecule .copper {
    transform: translateX(-26px);
    z-index: 2;
}

.cuco3-molecule .carbon {
    transform: translateX(8px);
    z-index: 2;
}

.cuco3-molecule .o1 {
    transform: translateX(8px) translateY(-24px);
}

.cuco3-molecule .o2 {
    transform: translateX(8px) translateY(24px);
}

.cuco3-molecule .o3 {
    transform: translateX(30px);
}

/* C2N2 (Cyanogen: N≡C-C≡N linear molecule) */
.c2n2-molecule {
    width: 140px;
    height: 60px;
}

.c2n2-molecule .carbon {
    width: 38px;
    height: 38px;
    background: radial-gradient(circle at 10px 10px, #ff9999, #b22222);
    z-index: 2;
}

.c2n2-molecule .nitrogen {
    width: 36px;
    height: 36px;
    background: radial-gradient(circle at 10px 10px, #98fb98, #27ae60);
    z-index: 1;
}

.c2n2-molecule .n1 {
    transform: translateX(-44px);
}

.c2n2-molecule .c1 {
    transform: translateX(-15px);
    z-index: 2;
}

.c2n2-molecule .c2 {
    transform: translateX(15px);
    z-index: 2;
}

.c2n2-molecule .n2 {
    transform: translateX(44px);
}

/* --- Batch 11: Aluminum, Silicon, Potassium & Uranium Molecules --- */

/* Al2O3 */
.al2o3-molecule .al1 {
    transform: translateX(-22px);
    z-index: 1;
}

.al2o3-molecule .al2 {
    transform: translateX(22px);
    z-index: 1;
}

.al2o3-molecule .o1 {
    transform: translateY(-20px);
}

.al2o3-molecule .o2 {
    transform: translateY(20px);
}

.al2o3-molecule .o3 {
    transform: translateX(0px);
}

/* AlCl3 */
.alcl3-molecule .aluminum {
    z-index: 1;
}

.alcl3-molecule .cl1 {
    transform: translateY(-28px);
}

.alcl3-molecule .cl2 {
    transform: rotate(120deg) translateY(-28px) rotate(-120deg);
}

.alcl3-molecule .cl3 {
    transform: rotate(240deg) translateY(-28px) rotate(-240deg);
}

/* SiO2 */
.sio2-molecule .silicon {
    z-index: 1;
}

.sio2-molecule .o1 {
    transform: translateX(-26px);
}

.sio2-molecule .o2 {
    transform: translateX(26px);
}

/* SiC */
.sic-molecule .silicon {
    transform: translateX(-16px);
}

.sic-molecule .carbon {
    transform: translateX(16px);
}

/* SiCl4 */
.sicl4-molecule .silicon {
    z-index: 1;
}

.sicl4-molecule .cl1 {
    transform: translateY(-28px);
}

.sicl4-molecule .cl2 {
    transform: translateX(28px);
}

.sicl4-molecule .cl3 {
    transform: translateY(28px);
}

.sicl4-molecule .cl4 {
    transform: translateX(-28px);
}

/* KCl */
.kcl-molecule .potassium {
    transform: translateX(-18px);
}

.kcl-molecule .chlorine {
    transform: translateX(18px);
}

/* KOH */
.koh-molecule .potassium {
    transform: translateX(-24px);
    z-index: 1;
}

.koh-molecule .oxygen {
    transform: translateX(10px);
}

.koh-molecule .hydrogen {
    transform: translateX(32px);
}

/* KNO3 */
.kno3-molecule .potassium {
    transform: translateX(-30px);
    z-index: 2;
}

.kno3-molecule .nitrogen {
    transform: translateX(10px);
    z-index: 1;
}

.kno3-molecule .o1 {
    transform: translateX(10px) translateY(-26px);
}

.kno3-molecule .o2 {
    transform: translateX(10px) translateY(26px);
}

.kno3-molecule .o3 {
    transform: translateX(36px);
}

/* UO2 */
.uo2-molecule .uranium {
    z-index: 1;
}

.uo2-molecule .o1 {
    transform: translateX(-28px);
}

.uo2-molecule .o2 {
    transform: translateX(28px);
}

/* UF6 */
.uf6-molecule .uranium {
    z-index: 1;
}

.uf6-molecule .f1 {
    transform: translateY(-30px);
}

.uf6-molecule .f2 {
    transform: rotate(60deg) translateY(-30px) rotate(-60deg);
}

.uf6-molecule .f3 {
    transform: rotate(120deg) translateY(-30px) rotate(-120deg);
}

.uf6-molecule .f4 {
    transform: rotate(180deg) translateY(-30px) rotate(-180deg);
}

.uf6-molecule .f5 {
    transform: rotate(240deg) translateY(-30px) rotate(-240deg);
}

.uf6-molecule .f6 {
    transform: rotate(300deg) translateY(-30px) rotate(-300deg);
}

/* --- Batch 12: Semiconductor, Glass-Etch, Metallurgy, Fertilizer & Nuclear Intermediates --- */

/* SiH4 */
.sih4-molecule .silicon {
    z-index: 1;
}

.sih4-molecule .h1 {
    transform: translateY(-24px);
}

.sih4-molecule .h2 {
    transform: translateX(24px);
}

.sih4-molecule .h3 {
    transform: translateY(24px);
}

.sih4-molecule .h4 {
    transform: translateX(-24px);
}

/* SiF4 */
.sif4-molecule .silicon {
    z-index: 1;
}

.sif4-molecule .f1 {
    transform: translateY(-28px);
}

.sif4-molecule .f2 {
    transform: translateX(28px);
}

.sif4-molecule .f3 {
    transform: translateY(28px);
}

.sif4-molecule .f4 {
    transform: translateX(-28px);
}

/* Al2S3 */
.al2s3-molecule .al1 {
    transform: translateX(-24px);
    z-index: 1;
}

.al2s3-molecule .al2 {
    transform: translateX(24px);
    z-index: 1;
}

.al2s3-molecule .s1 {
    transform: translateY(-22px);
}

.al2s3-molecule .s2 {
    transform: translateY(22px);
}

.al2s3-molecule .s3 {
    transform: translateX(0px);
}

/* AlF3 */
.alf3-molecule .aluminum {
    z-index: 1;
}

.alf3-molecule .f1 {
    transform: translateY(-28px);
}

.alf3-molecule .f2 {
    transform: rotate(120deg) translateY(-28px) rotate(-120deg);
}

.alf3-molecule .f3 {
    transform: rotate(240deg) translateY(-28px) rotate(-240deg);
}

/* K2CO3 */
.k2co3-molecule .k1 {
    transform: translateX(-36px);
    z-index: 2;
}

.k2co3-molecule .k2 {
    transform: translateX(36px);
    z-index: 2;
}

.k2co3-molecule .carbon {
    transform: translateX(0px);
    z-index: 1;
}

.k2co3-molecule .o1 {
    transform: translateY(-24px);
}

.k2co3-molecule .o2 {
    transform: translateY(24px);
}

.k2co3-molecule .o3 {
    transform: translateX(0px);
}

/* K2SO4 */
.k2so4-molecule .k1 {
    transform: translateX(-36px);
    z-index: 2;
}

.k2so4-molecule .k2 {
    transform: translateX(36px);
    z-index: 2;
}

.k2so4-molecule .sulfur {
    transform: translateX(0px);
    z-index: 1;
}

.k2so4-molecule .o1 {
    transform: translateY(-26px);
}

.k2so4-molecule .o2 {
    transform: translateY(26px);
}

.k2so4-molecule .o3 {
    transform: translateX(-16px) translateY(-14px);
}

.k2so4-molecule .o4 {
    transform: translateX(16px) translateY(14px);
}

/* UF4 */
.uf4-molecule .uranium {
    z-index: 1;
}

.uf4-molecule .f1 {
    transform: translateY(-30px);
}

.uf4-molecule .f2 {
    transform: translateX(30px);
}

.uf4-molecule .f3 {
    transform: translateY(30px);
}

.uf4-molecule .f4 {
    transform: translateX(-30px);
}

/* --- Universal Full-Page Container for Modals & Overlay Stations --- */
.modal-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #100804 url('assets/wood-table.jpg') center center / cover no-repeat !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 2000 !important;
    padding: 16px !important;
    box-sizing: border-box !important;
}

.modal-overlay.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.modal-content {
    background-color: #2a2a2a;
    border: 1px solid #555;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 96% !important;
    max-width: 1440px !important;
    height: 94% !important;
    max-height: 820px !important;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 30px;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    display: flex;
    padding: 40px;
    /* Remove padding from modal-body */
    gap: 40px;
    /* Remove gap from modal-body */
    align-items: stretch;
    /* Make columns equal height */
}

/* --- Reaction Catalogue Notebook Modal (Vintage Kraft & Aged Lined Paper Theme) --- */
#reaction-catalogue-modal .modal-content.catalogue-notebook-modal {
    width: 1200px;
    max-width: 96vw;
    height: 680px;
    max-height: 94vh;
    transform: scale(0.77);
    transform-origin: center center;
    border-radius: 16px;
    background: #3d2719;
    border: 3px solid #2a180d;
    box-shadow:
        0 35px 80px rgba(0, 0, 0, 0.9),
        0 8px 24px rgba(20, 10, 5, 0.8),
        inset 0 0 15px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: visible;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Spiral notebooks do not have a fabric bookmark ribbon */
.notebook-bookmark {
    display: none;
}

/* Vintage Antique Eyelet / Brass Rivet Close Button (+30% Symmetric) */
.catalogue-notebook-modal .modal-close {
    top: 10px;
    right: 14px;
    width: 62px;
    height: 62px;
    background: #e8dbca;
    border: 2px solid #b59f84;
    border-radius: 50%;
    font-size: 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: #5c4432;
    z-index: 40;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.catalogue-notebook-modal .modal-close:hover {
    background: #8b3a22;
    border-color: #632412;
    color: #fff8f0;
    transform: scale(1.08);
}

#reaction-catalogue-modal .modal-body.catalogue-notebook-body {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    gap: 0;
    position: relative;
    overflow: hidden;
    border-radius: 13px;
    box-sizing: border-box;
}

/* Right-Edge Bookmark Tabs (ALL + 5 Shards, +70% enlarged & flush-attached to book edge) */
.catalogue-shard-tabs {
    position: absolute;
    top: 76px;
    right: -114px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 4;
}

.catalogue-shard-tab {
    width: 116px;
    height: 92px;
    padding: 8px 12px 8px 14px;
    background: #e6d5b8;
    border: 2px solid #6e4e2e;
    border-left: none;
    border-radius: 0 12px 12px 0;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.45), inset 5px 0 8px rgba(61, 39, 25, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.catalogue-shard-tab:hover {
    background: #f5ebd6;
}

.catalogue-shard-tab.active {
    background: #fbf4e4;
    border-color: #8b3a22;
    box-shadow: 6px 6px 14px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(139, 58, 34, 0.45);
}

.catalogue-shard-tab-all {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 26px;
    font-weight: 900;
    color: #3d2719;
    letter-spacing: 1.5px;
}

.catalogue-shard-tab.active .catalogue-shard-tab-all {
    color: #8b3a22;
}

.catalogue-shard-tab img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

/* Two Open Pages (50% each with symmetric padding) */
.notebook-page {
    flex: 1 1 50%;
    width: 50%;
    min-width: 0;
    max-width: 50%;
    height: 100%;
    box-sizing: border-box;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

/* Left Page: Aged Weathered Brown Kraft / Cardboard Cover */
.notebook-left-page {
    background:
        radial-gradient(ellipse at 40% 30%, rgba(138, 97, 68, 0.25) 0%, rgba(45, 28, 18, 0.95) 100%),
        linear-gradient(to right, #4a3020 0%, #583a27 65%, #3d2516 100%);
    box-shadow: inset -5px 0 15px rgba(0, 0, 0, 0.4);
    position: relative;
}

/* Vintage cardboard punch hole detail on left cover */
.notebook-left-page::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1c1109;
    border: 1px solid #73513a;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8), 0 1px 1px rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 5;
}

/* Right Page: Aged Ivory/Cream Lined Paper with Vintage Vignette & Multi-layer Edge */
.notebook-right-page {
    background:
        radial-gradient(circle at 85% 85%, #ede0cb 0%, #f7efe1 55%, #fdf9f1 100%);
    box-shadow:
        inset 8px 0 16px rgba(0, 0, 0, 0.12),
        inset -2px 0 6px rgba(180, 155, 125, 0.35);
    position: relative;
}

/* Subtle stacked paper edge shadow along the outer right edge */
.notebook-right-page::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.02), rgba(130, 105, 80, 0.18));
    pointer-events: none;
}

/* Central Book Spine: Realistic Twin-Loop Wire Spiral */
.notebook-spine {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 32px;
    transform: translateX(-50%);
    background: linear-gradient(to right,
            rgba(40, 24, 15, 0.85) 0%,
            rgba(25, 15, 9, 0.95) 45%,
            rgba(15, 9, 5, 0.98) 50%,
            rgba(200, 185, 165, 0.3) 55%,
            rgba(235, 225, 210, 0.1) 100%);
    box-shadow:
        -4px 0 10px rgba(0, 0, 0, 0.6),
        4px 0 10px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    z-index: 25;
    pointer-events: none;
}

/* Metallic Chrome / Steel Twin-Wire Rings with Spiral Punch Holes */
.spine-stitch {
    width: 28px;
    height: 7px;
    background: linear-gradient(to bottom,
            #f5f7fa 0%,
            #d1d8e0 25%,
            #828d9a 50%,
            #48525e 75%,
            #9ea8b5 100%);
    border-radius: 4px;
    box-shadow:
        0 3px 5px rgba(0, 0, 0, 0.65),
        inset 0 1px 1px rgba(255, 255, 255, 0.9),
        inset 0 -1px 1px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Punch Holes under the wire rings */
.spine-stitch::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -3px;
    width: 6px;
    height: 11px;
    background: #140d08;
    border-radius: 2px;
    box-shadow: inset 0 1px 3px #000;
    z-index: -1;
}

.spine-stitch::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -3px;
    width: 6px;
    height: 11px;
    background: #1c1510;
    border-radius: 2px;
    box-shadow: inset 0 1px 3px #000;
    z-index: -1;
}

/* Page Headers (Symmetric 48px height) */
.notebook-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 48px;
    min-height: 48px;
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(140, 110, 85, 0.35);
    box-sizing: border-box;
    margin-bottom: 10px;
}

.notebook-left-page .notebook-page-header {
    border-bottom: 1px dashed rgba(220, 195, 165, 0.25);
}

.notebook-right-page .notebook-page-header {
    justify-content: center;
    padding-right: 0;
}

.notebook-left-page .page-tag {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 23.5px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #e2c9ab;
    text-transform: uppercase;
}

.notebook-left-page .page-num {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 23.5px;
    font-weight: 700;
    color: #bfa688;
    letter-spacing: 1px;
}

/* Elimination of SYNTHESIS FORMULATION per user instruction */
.notebook-right-page .page-tag {
    display: none !important;
}

.notebook-right-page .page-num {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 23.5px;
    font-weight: 700;
    color: #61462d;
    letter-spacing: 1px;
    text-align: center;
    margin: 0 auto;
}

/* Middle Content Area */
.notebook-page-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.notebook-left-content {
    width: 100%;
}

.notebook-right-content {
    width: 100%;
    height: 320px;
    max-height: 320px;
    box-sizing: border-box;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: auto 0;
    position: relative;
}

/* Left Page Visual Specimen Box (390px x 390px, +20%) - Antique Brass / Specimen Viewing Plate */
.catalogue-notebook-modal .catalogue-visual {
    width: 390px;
    height: 390px;
    max-width: 100%;
    background: radial-gradient(circle at 50% 50%, #1f1610 0%, #110c08 100%);
    border: 2px solid #8c6d4b;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.9),
        0 4px 15px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 235, 205, 0.12);
    position: relative;
    overflow: hidden;
    margin: auto 0;
}

/* Brass plate corner rivets */
.catalogue-notebook-modal .catalogue-visual::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px dashed rgba(195, 160, 120, 0.28);
    border-radius: 8px;
    pointer-events: none;
}

.catalogue-notebook-modal .reaction-image {
    max-width: 310px;
    max-height: 310px;
    width: 310px;
    height: 310px;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.65));
    position: relative;
    z-index: 2;
}

/* Dynamic Specimen Molecular / Atomic Visual in Logbook (Pure Reference Guide, non-interactive) */
.catalogue-notebook-modal .catalogue-visual .molecule,
.catalogue-notebook-modal .catalogue-visual .atom {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    margin: auto !important;
    transform: scale(2.55);
    transform-origin: center center;
    cursor: default;
    user-select: none;
    pointer-events: none;
    z-index: 5;
}

/* Right Page Reaction Equation Box (+40% typography, centered with breathing margin) */
.notebook-equation-box {
    height: 88px;
    min-height: 88px;
    max-height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0 54px;
    box-sizing: border-box;
    overflow: hidden;
    text-align: center;
    flex-shrink: 0;
}

.catalogue-notebook-modal #catalogue-reaction-display {
    font-size: 41px;
    font-weight: 700;
    color: #1a130e;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
    margin: 0 auto;
    line-height: 1.25;
    white-space: normal;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", serif;
    text-align: center;
}

/* Right Page Reaction Notes Container with Pixel-Perfect Baseline-Aligned Ruled Lines & Centered Margin */
.notebook-notes-container {
    flex: 1;
    min-height: 0;
    height: 232px;
    max-height: 232px;
    overflow-y: auto;
    background: transparent;
    background-image:
        /* Faint blue-grey horizontal ruled lines spaced 52px, precisely resting beneath text baseline */
        repeating-linear-gradient(to bottom, transparent 0px, transparent 51px, rgba(82, 108, 142, 0.28) 51px, rgba(82, 108, 142, 0.28) 52px);
    background-size: 100% 52px;
    background-position: 0 42px;
    border: none;
    border-radius: 0;
    padding: 0 54px;
    box-sizing: border-box;
    position: relative;
    margin: 0;
}

.notebook-notes-container::-webkit-scrollbar {
    width: 5px;
}

.notebook-notes-container::-webkit-scrollbar-track {
    background: transparent;
}

.notebook-notes-container::-webkit-scrollbar-thumb {
    background: rgba(135, 105, 80, 0.35);
    border-radius: 3px;
}

.catalogue-notebook-modal #catalogue-reaction-description {
    font-size: 26px;
    line-height: 52px;
    color: #2b2017;
    margin: 0 auto;
    padding: 0;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    letter-spacing: 0.2px;
}

/* Page Footers (Symmetric 88px height, +30% Scaling) */
.notebook-page-footer {
    display: flex;
    align-items: center;
    width: 100%;
    height: 88px;
    min-height: 88px;
    border-top: 1px dashed rgba(140, 110, 85, 0.35);
    margin-top: 10px;
    box-sizing: border-box;
}

.notebook-left-page .notebook-page-footer {
    border-top: 1px dashed rgba(220, 195, 165, 0.25);
}

.notebook-left-footer {
    justify-content: center;
    gap: 18px;
    padding: 0 4px;
}

.specimen-caption {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 23.5px;
    letter-spacing: 1.5px;
    color: #d1b899;
    font-weight: 700;
}

.specimen-caption-sub {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 21.5px;
    letter-spacing: 1px;
    color: #9e8467;
    font-weight: 600;
}

.notebook-nav {
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0 2px;
    user-select: none;
}

.catalogue-pagination-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    max-width: 500px;
    box-sizing: border-box;
}

.notebook-page-btn {
    background: #f4ecdf;
    border: 1.5px solid #c9b49b;
    color: #523b29;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 31px;
    font-weight: 800;
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    height: 75px;
    padding: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
    flex-shrink: 0;
}

.notebook-page-btn:hover {
    background: #eddcc6;
    border-color: #8b6b4e;
    color: #24160d;
    box-shadow: 0 2px 6px rgba(100, 70, 45, 0.2);
    transform: translateY(-1px);
}

.notebook-page-btn.active {
    background: #8b3a22;
    border-color: #6e2a16;
    color: #fff8f0;
    font-weight: 800;
    box-shadow: 0 2px 7px rgba(139, 58, 34, 0.45);
}

.notebook-page-ellipsis {
    color: #876d54;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 31px;
    font-weight: 800;
    letter-spacing: 1px;
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    height: 75px;
    padding: 0;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    box-sizing: border-box;
    flex-shrink: 0;
}

.notebook-page-ellipsis:hover {
    color: #8b3a22;
}

.notebook-page-ellipsis.hidden {
    visibility: hidden;
    pointer-events: none;
}

.notebook-nav-btn {
    background: #f4ecdf;
    border: 1.5px solid #c9b49b;
    color: #614530;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 32px;
    font-weight: 800;
    width: 69px;
    min-width: 69px;
    height: 75px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.notebook-nav-btn:hover {
    background: #8b3a22;
    border-color: #6e2a16;
    color: #ffffff;
    transform: translateY(-1px);
}

.notebook-nav-btn:active {
    transform: translateY(0) scale(0.95);
}

.modal-atom-visual {
    flex-shrink: 0;
    width: 250px;
    height: 250px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 15%;
}

.modal-atom-visual .atom {
    width: 100%;
    height: 100%;
    animation: none;
    /* Disable the simple pulse */
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
}

.modal-atom-visual .nucleus {
    width: 80px;
    height: 80px;
    animation: pulse-nucleus 3s infinite ease-in-out;
}

.modal-atom-visual .neutron {
    width: 20px;
    height: 20px;
    margin: -10px;
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.modal-atom-visual .proton {
    width: 20px;
    height: 20px;
    margin: -10px;
    background: radial-gradient(circle at 6px 6px, #ff8080, #ff4d4d);
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.5), 0 0 5px rgba(255, 77, 77, 0.5);
    z-index: 5;
    /* Ensure protons render on top of neutrons */
}

.shell-1 .electron {
    animation-name: orbit1;
}

.shell-2 .electron {
    animation-name: orbit2;
}

.shell-3 .electron {
    animation-name: orbit3;
}

.shell-4 .electron {
    animation-name: orbit4;
}

.hydrogen .electron {
    animation-name: orbit-hydrogen;
}

/* Specific animation for Hydrogen */

@keyframes orbit1 {
    0% {
        transform: translateX(50px) scale(1.2);
        z-index: 10;
    }

    25% {
        transform: translateY(-20px) scale(0.8);
    }

    50% {
        transform: translateX(-50px) scale(0.6);
        z-index: -10;
    }

    75% {
        transform: translateY(20px) scale(0.8);
    }

    100% {
        transform: translateX(50px) scale(1.2);
        z-index: 10;
    }
}

@keyframes orbit2 {
    0% {
        transform: translateX(110px) scale(1.2);
        z-index: 10;
    }

    25% {
        transform: translateY(-45px) scale(0.7);
    }

    50% {
        transform: translateX(-110px) scale(0.5);
        z-index: -10;
    }

    75% {
        transform: translateY(45px) scale(0.7);
    }

    100% {
        transform: translateX(110px) scale(1.2);
        z-index: 10;
    }
}

@keyframes orbit3 {
    0% {
        transform: translateX(160px) scale(1.2);
        z-index: 10;
    }

    25% {
        transform: translateY(-65px) scale(0.7);
    }

    50% {
        transform: translateX(-160px) scale(0.5);
        z-index: -10;
    }

    75% {
        transform: translateY(65px) scale(0.7);
    }

    100% {
        transform: translateX(160px) scale(1.2);
        z-index: 10;
    }
}

@keyframes orbit4 {
    0% {
        transform: translateX(210px) scale(1.2);
        z-index: 10;
    }

    25% {
        transform: translateY(-85px) scale(0.7);
    }

    50% {
        transform: translateX(-210px) scale(0.5);
        z-index: -10;
    }

    75% {
        transform: translateY(85px) scale(0.7);
    }

    100% {
        transform: translateX(210px) scale(1.2);
        z-index: 10;
    }
}

@keyframes orbit-hydrogen {
    0% {
        transform: translateX(90px) translateY(0px) scale(1.2);
        z-index: 10;
        /* In front of nucleus */
    }

    25% {
        transform: translateX(0px) translateY(-25px) scale(0.7);
    }

    50% {
        transform: translateX(-90px) translateY(0px) scale(0.5);
        z-index: -10;
        /* Behind nucleus */
    }

    75% {
        transform: translateX(0px) translateY(25px) scale(0.7);
    }

    100% {
        transform: translateX(90px) translateY(0px) scale(1.2);
        z-index: 10;
    }
}

@keyframes pulse-nucleus {
    0% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
    }
}

.modal-atom-description {
    color: #ccc;
    font-size: 15px;
    line-height: 1.6;
}

.modal-atom-description h3 {
    font-size: 24px;
    color: #fff;
    margin-top: 0;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.modal-atom-description p {
    margin-bottom: 1em;
}

.modal-atom-description strong {
    color: #87cefa;
}

.void-ground>.atom {
    transform: scale(1.07);
    transform-origin: center center;
}

.void-ground .shell-1 .electron {
    animation-name: orbit-live-1;
}

.void-ground .shell-2 .electron {
    animation-name: orbit-live-2;
}

.void-ground .shell-3 .electron {
    animation-name: orbit-live-3;
}

@keyframes orbit-live-3 {
    0% {
        transform: translateX(50px) scale(1.2);
        z-index: 10;
    }

    25% {
        transform: translateY(-20px) scale(0.7);
    }

    50% {
        transform: translateX(-50px) scale(0.5);
        z-index: -10;
    }

    75% {
        transform: translateY(20px) scale(0.7);
    }

    100% {
        transform: translateX(50px) scale(1.2);
        z-index: 10;
    }
}

@keyframes orbit-live-1 {
    0% {
        transform: translateX(20px) scale(1.2);
        z-index: 10;
    }

    25% {
        transform: translateY(-8px) scale(0.8);
    }

    50% {
        transform: translateX(-20px) scale(0.6);
        z-index: -10;
    }

    75% {
        transform: translateY(8px) scale(0.8);
    }

    100% {
        transform: translateX(20px) scale(1.2);
        z-index: 10;
    }
}

@keyframes orbit-live-2 {
    0% {
        transform: translateX(40px) scale(1.2);
        z-index: 10;
    }

    25% {
        transform: translateY(-16px) scale(0.7);
    }

    50% {
        transform: translateX(-40px) scale(0.5);
        z-index: -10;
    }

    75% {
        transform: translateY(16px) scale(0.7);
    }

    100% {
        transform: translateX(40px) scale(1.2);
        z-index: 10;
    }
}

/* --- Black Hole Effect --- */
.black-hole {
    position: absolute;
    width: 0px;
    height: 0px;
    background: radial-gradient(circle, #000000 30%, #220033 60%, rgba(75, 0, 130, 0) 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 50px 20px rgba(0, 0, 0, 0.9), 0 0 100px 40px rgba(75, 0, 130, 0.5);
    /* Purple glow */
    pointer-events: none;
    z-index: 50;
    transition: width 0.5s ease-out, height 0.5s ease-out;
    animation: black-hole-pulse 2s infinite ease-in-out;
}

.black-hole.active {
    width: 150px;
    height: 150px;
}

@keyframes black-hole-pulse {
    0% {
        box-shadow: 0 0 50px 20px rgba(0, 0, 0, 0.9), 0 0 100px 40px rgba(75, 0, 130, 0.5);
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        box-shadow: 0 0 60px 30px rgba(0, 0, 0, 0.9), 0 0 120px 50px rgba(100, 0, 160, 0.6);
        transform: translate(-50%, -50%) scale(1.05);
    }

    100% {
        box-shadow: 0 0 50px 20px rgba(0, 0, 0, 0.9), 0 0 100px 40px rgba(75, 0, 130, 0.5);
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Accretion Disk Ring */
.black-hole::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140%;
    height: 140%;
    border-radius: 50%;
    border: 4px solid rgba(200, 100, 255, 0.6);
    border-top-color: transparent;
    border-bottom-color: transparent;
    transform: translate(-50%, -50%) rotate(0deg);
    box-shadow: 0 0 20px 5px rgba(200, 100, 255, 0.3);
    animation: spin-disk 0.5s linear infinite;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.black-hole.active::before {
    opacity: 1;
}

@keyframes spin-disk {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* TV Turn Off Animation */
@keyframes tv-turn-off {
    0% {
        width: 150px;
        height: 150px;
        opacity: 1;
    }

    40% {
        width: 150px;
        height: 4px;
        opacity: 1;
    }

    80% {
        width: 0px;
        height: 4px;
        opacity: 1;
    }

    100% {
        width: 0px;
        height: 0px;
        opacity: 0;
    }
}

.black-hole.closing {
    animation: tv-turn-off 0.4s ease-out forwards;
    box-shadow: none !important;
    /* Override pulse shadow */
}

.black-hole.closing::before {
    opacity: 0;
    transition: opacity 0.1s ease-out;
}

/* --- Waterdrop Ripple Effect (GPU-Accelerated, Zero-Reflow) --- */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 255, 0.85);
    background: radial-gradient(circle, rgba(0, 255, 255, 0.18) 0%, rgba(0, 255, 255, 0) 70%);
    pointer-events: none;
    transform-origin: center center;
    will-change: transform, opacity;
    animation: ripple-animation 0.75s cubic-bezier(0.12, 0.8, 0.32, 1) forwards;
    z-index: 1000;
}

@keyframes ripple-animation {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* --- Section Tools Carousel (Perkakas & Bola Reaksi - 1 Baris dengan Paginasi) --- */
.tools-carousel-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
    flex-shrink: 0;
    margin-top: auto;
    margin-bottom: 4px;
}

.tools-carousel-viewport {
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    flex-shrink: 0;
    touch-action: pan-y;
}

.tools-carousel-track {
    display: flex;
    width: 100%;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    box-sizing: border-box;
}

.tools-page {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px;
    align-items: stretch;
}

.tools-carousel-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 8px 0 2px 0;
    padding: 8px 16px;
    background: #eddcb9;
    border: 1px solid #bda277;
    border-radius: 6px;
    box-sizing: border-box;
    user-select: none;
    box-shadow: 0 1px 3px #120904;
    flex-shrink: 0;
}

/* --- Perkakas (Apparatus & Containment Chambers) --- */
.apparatus-section {
    display: contents;
}

.apparatus-section-header,
.reaction-ball-section-header {
    display: none !important;
}

.apparatus-section-title,
.reaction-ball-section-title {
    display: none !important;
}

.apparatus-grid {
    display: contents;
}

.apparatus-item {
    background: #f4ead2;
    border: 1.5px solid #bfa478;
    border-radius: 8px;
    padding: 16px 6px 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    user-select: none;
    position: relative;
    box-shadow: 0 2px 4px #120904;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
    min-height: 165px;
    touch-action: none !important;
    -webkit-touch-callout: none !important;
}

.apparatus-item:hover {
    background: #faeed8;
    border-color: #8a6a42;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px #120904;
}

.apparatus-item:active,
.apparatus-item.dragging {
    cursor: grabbing;
    opacity: 0.85;
    transform: scale(0.96);
}

.apparatus-preview {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.apparatus-preview-svg {
    width: 58px;
    height: 58px;
    color: #2e1708;
    stroke: currentColor;
    fill: none;
    transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2), color 0.15s ease;
}

.apparatus-item:hover .apparatus-preview-svg {
    transform: scale(1.12);
    color: #120803;
}

.apparatus-label {
    font-size: 15px;
    color: #1a0902;
    font-weight: 800;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    line-height: 1.18;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 2px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0.2px;
}

.apparatus-active-badge {
    position: absolute;
    top: -5px;
    right: -4px;
    background: #7c1f15;
    color: #fff7eb;
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #4a0d06;
    box-shadow: 0 1px 3px #100603;
    pointer-events: none;
}

.apparatus-item.is-active-in-void {
    background: #edd6af;
    border: 2px solid #7c1f15;
    box-shadow: 0 2px 4px #120904;
}

.apparatus-stock-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    bottom: auto;
    background: linear-gradient(180deg, #1b5e32 0%, #113f21 100%);
    color: #ffffff;
    font-size: 15px;
    /* Diperbesar +60% dari 9px agar sangat terbaca dan jelas */
    font-weight: 800;
    padding: 3px 8px;
    min-width: 20px;
    text-align: center;
    border-radius: 5px;
    border: 1.5px solid #22c55e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.65), 0 0 6px rgba(34, 197, 94, 0.3);
    pointer-events: none;
    line-height: 1.1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    z-index: 3;
}

.apparatus-item.is-out-of-stock {
    opacity: 0.45;
    filter: grayscale(0.85);
    cursor: not-allowed !important;
}

.apparatus-item.is-out-of-stock .apparatus-stock-badge {
    background: linear-gradient(180deg, #7f1d1d 0%, #450a0a 100%);
    border-color: #ef4444;
    color: #fecaca;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.65);
}

/* --- Perkakas Di Dalam Void-Ground (Active Apparatus in Voidbox) --- */
.void-apparatus {
    position: absolute;
    z-index: 8;
    user-select: none;
    touch-action: none;
    cursor: move;
}

.apparatus-frame {
    position: relative;
    width: 100%;
    height: 100%;
}

.apparatus-svg-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.apparatus-wall-bg {
    fill: rgba(0, 210, 255, 0.03);
    transition: fill 0.3s;
}

.void-apparatus:hover .apparatus-wall-bg {
    fill: rgba(0, 210, 255, 0.07);
}

.apparatus-wall-stroke {
    fill: none;
    stroke: #00d2ff;
    stroke-width: 3.5px;
    stroke-dasharray: 6 3;
    stroke-linecap: round;
    animation: apparatusEnergyFlow 20s linear infinite;
    filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.65));
}

.apparatus-divider-stroke {
    stroke: #00d2ff;
    stroke-width: 3px;
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.6));
}

@keyframes apparatusEnergyFlow {
    from {
        stroke-dashoffset: 0;
    }

    to {
        stroke-dashoffset: 200;
    }
}

/* Header bar di atas perkakas hanya untuk tombol close X */
.apparatus-header-bar {
    position: absolute;
    top: -38px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    opacity: 0.75;
    transition: opacity 0.2s, transform 0.2s;
    white-space: nowrap;
    z-index: 10;
}

.void-apparatus:hover .apparatus-header-bar,
.void-apparatus.is-dragging .apparatus-header-bar {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.apparatus-btn-recall {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #2b180d;
    border: 2px solid #8c2a20;
    color: #fca5a5;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    transition: all 0.15s ease;
    padding: 0;
}

.apparatus-btn-recall:hover {
    background: #8c2a20;
    border-color: #ef4444;
    color: #ffffff;
    transform: scale(1.15);
}

.apparatus-btn-recall:active {
    transform: scale(0.95);
}

.recall-icon {
    font-size: 18px;
    line-height: 1;
}

/* Animasi Spawn & Recall */
@keyframes apparatusSpawn {
    0% {
        transform: scale(0.4);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.void-apparatus.is-recalling {
    animation: apparatusRecall 0.25s ease-in forwards !important;
}

@keyframes apparatusRecall {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.2);
        opacity: 0;
    }
}

.void-apparatus.is-dragging {
    filter: brightness(1.2);
    cursor: grabbing;
}

/* ==========================================================================
   REACTION BALL SYSTEM (BOLA REAKSI SPASIAL)
   Skeuomorphic Metal Spheres, Energy Cores, Dynamic AoE Fields & VFX
   ========================================================================== */

/* --- Toolbox Section: Reaction Ball --- */
.reaction-ball-section {
    display: contents;
}

.reaction-ball-grid {
    display: contents;
}

.reaction-ball-item {
    background: #f4ead2;
    border: 1.5px solid #bfa478;
    border-radius: 8px;
    padding: 16px 6px 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    user-select: none;
    position: relative;
    box-shadow: 0 2px 4px #120904;
    min-height: 165px;
    box-sizing: border-box;
    touch-action: none !important;
    -webkit-touch-callout: none !important;
}

.reaction-ball-item:hover {
    background: #faeed8;
    border-color: #8a6a42;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px #120904;
}

.reaction-ball-item:active,
.reaction-ball-item.dragging {
    cursor: grabbing;
    opacity: 0.85;
    transform: scale(0.96);
}

.reaction-ball-preview {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.reaction-ball-preview-svg {
    width: 58px;
    height: 58px;
    color: #2e1708;
    stroke: currentColor;
    fill: none;
    transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2), color 0.15s ease;
}

.reaction-ball-label {
    font-size: 15px;
    color: #1a0902;
    font-weight: 800;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    line-height: 1.18;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 2px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0.2px;
}

.reaction-ball-active-badge {
    position: absolute;
    top: -5px;
    right: -4px;
    background: #7c1f15;
    color: #fff7eb;
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    border: 1px solid #4a0d06;
    box-shadow: 0 1px 3px #100603;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 3px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.active-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff7eb;
}

.reaction-ball-item.is-active-in-void {
    background: #edd6af;
    border: 2px solid #7c1f15;
    box-shadow: 0 2px 4px #120904;
}

.reaction-ball-item:hover .reaction-ball-preview-svg {
    transform: scale(1.12);
    color: #120803;
}

/* --- Lab Drag & Drop Unified Feedback & Ghost --- */
.lab-drag-ghost {
    pointer-events: none;
    user-select: none;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, #fff7eb 0%, #ecdcb8 55%, #caa472 100%);
    border: 2px solid #8e6236;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85), 0 0 20px rgba(212, 163, 72, 0.5);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform, left, top;
}

.void-ground.void-ground-drop-active {
    box-shadow: inset 0 0 40px rgba(212, 163, 72, 0.12);
}

.void-ground.void-ground-hovered {
    box-shadow: inset 0 0 70px rgba(212, 163, 72, 0.25), inset 0 0 10px #d4a348;
}

.atom-source.is-being-dragged,
.apparatus-item.is-being-dragged,
.reaction-ball-item.is-being-dragged {
    opacity: 0.55;
    transform: scale(0.96);
    filter: grayscale(0.2);
}

/* --- VOID-GROUND ACTIVE REACTION BALL --- */
.void-reaction-ball {
    position: absolute;
    z-index: 9;
    user-select: none;
    touch-action: none;
    transform: translate(-50%, -50%);
    cursor: move;
}

/* Bodi Bola Logam Utama 75px (+25% Scaling) */
.reaction-ball-sphere {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), inset 0 -6px 12px rgba(0, 0, 0, 0.8), inset 0 4px 8px rgba(255, 255, 255, 0.4);
    cursor: grab;
    transition: transform 0.15s ease;
}

.reaction-ball-sphere:active {
    cursor: grabbing;
    transform: scale(0.96);
}

.sphere-specular {
    position: absolute;
    top: 6px;
    left: 15px;
    width: 28px;
    height: 15px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 70%);
    transform: rotate(-25deg);
    pointer-events: none;
    z-index: 5;
}

.sphere-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

/* Theme 1: FIRE BALL (Magma Thermite) */
.ball-fire .reaction-ball-sphere {
    background: radial-gradient(circle at 18px 18px, #ffbb00 0%, #ff3b00 45%, #5a0d00 85%, #1f0400 100%);
    border: 2px solid #ff7700;
    box-shadow: 0 0 20px rgba(255, 69, 0, 0.6), inset 0 -6px 14px #000;
}

.ball-fire .sphere-core {
    position: absolute;
    inset: 16px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #ffea79 40%, #ff3700 100%);
    box-shadow: 0 0 16px #ff3700;
    animation: pulseMagmaCore 1.5s infinite ease-in-out;
}

@keyframes pulseMagmaCore {

    0%,
    100% {
        transform: scale(0.92);
        opacity: 0.85;
        filter: drop-shadow(0 0 8px #ff4500);
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
        filter: drop-shadow(0 0 16px #ffaa00);
    }
}

/* Theme 2: COLD BALL (Cryogenic Absolute Zero) */
.ball-cold .reaction-ball-sphere {
    background: radial-gradient(circle at 18px 18px, #ffffff 0%, #a5f3fc 35%, #0891b2 75%, #083344 100%);
    border: 2px solid #00d2ff;
    box-shadow: 0 0 22px rgba(0, 210, 255, 0.6), inset 0 -6px 14px #000;
}

.ball-cold .sphere-core {
    position: absolute;
    inset: 16px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #67e8f9 50%, #0284c7 100%);
    box-shadow: 0 0 16px #00d2ff;
    animation: pulseCryoCore 2s infinite ease-in-out;
}

@keyframes pulseCryoCore {

    0%,
    100% {
        transform: scale(0.95);
        opacity: 0.85;
        filter: drop-shadow(0 0 10px #00d2ff);
    }

    50% {
        transform: scale(1.06);
        opacity: 1;
        filter: drop-shadow(0 0 20px #e0f2fe);
    }
}

/* Theme 3: ELECTRIC BALL (High-Voltage Tesla) */
.ball-electric .reaction-ball-sphere {
    background: radial-gradient(circle at 18px 18px, #fae8ff 0%, #c084fc 35%, #581c87 75%, #1e0538 100%);
    border: 2px solid #c084fc;
    box-shadow: 0 0 22px rgba(168, 85, 247, 0.6), inset 0 -6px 14px #000;
}

.ball-electric .sphere-core {
    position: absolute;
    inset: 16px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #00f0ff 40%, #9333ea 100%);
    box-shadow: 0 0 16px #00f0ff;
    animation: pulseTeslaCore 0.8s infinite alternate ease-in-out;
}

@keyframes pulseTeslaCore {
    0% {
        transform: scale(0.9);
        filter: drop-shadow(0 0 8px #9333ea);
    }

    100% {
        transform: scale(1.12);
        filter: drop-shadow(0 0 18px #00f0ff);
    }
}

/* Theme 4: MAGNETIC BALL (Neodymium Dipole N/S) */
.ball-magnetic .reaction-ball-sphere {
    background: linear-gradient(135deg, #dc2626 47%, #cbd5e1 48%, #ffffff 50%, #cbd5e1 52%, #2563eb 53%);
    border: 2px solid #94a3b8;
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.45), inset 0 -6px 14px #000;
}

.ball-magnetic .sphere-core {
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #e2e8f0 70%, #64748b 100%);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
}

/* Theme 5: GRAVITY BALL (Cosmic Singularity & Event Horizon) */
.ball-gravity .reaction-ball-sphere {
    background: radial-gradient(circle at 18px 18px, #f3e8ff 0%, #8b5cf6 35%, #3b0764 75%, #090214 100%);
    border: 2px solid #a855f7;
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.65), inset 0 -6px 14px #000;
}

.ball-gravity .sphere-core {
    position: absolute;
    inset: 15px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #a855f7 40%, #18032e 100%);
    box-shadow: 0 0 18px #8b5cf6;
    animation: pulseSingularityCore 1.6s infinite ease-in-out;
}

@keyframes pulseSingularityCore {

    0%,
    100% {
        transform: scale(0.92);
        opacity: 0.85;
        filter: drop-shadow(0 0 10px #8b5cf6);
    }

    50% {
        transform: scale(1.08);
        opacity: 1;
        filter: drop-shadow(0 0 20px #c084fc);
    }
}

/* Theme 6: RADIOACTIVE BALL (Cherenkov / Radium Glow) */
.ball-radioactive .reaction-ball-sphere {
    background: radial-gradient(circle at 18px 18px, #ecfdf5 0%, #34d399 35%, #047857 75%, #022c22 100%);
    border: 2px solid #10b981;
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.65), inset 0 -6px 14px #000;
}

.ball-radioactive .sphere-core {
    position: absolute;
    inset: 15px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #10b981 40%, #064e3b 100%);
    box-shadow: 0 0 18px #34d399;
    animation: pulseRadioactiveCore 1.2s infinite ease-in-out;
}

@keyframes pulseRadioactiveCore {

    0%,
    100% {
        transform: scale(0.9);
        opacity: 0.85;
        filter: drop-shadow(0 0 8px #10b981);
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
        filter: drop-shadow(0 0 22px #6ee7b7);
    }
}

/* Theme 7: VACUUM BALL (Void Singularity Event Horizon) */
.ball-vacuum .reaction-ball-sphere {
    background: radial-gradient(circle at 18px 18px, #3f3f46 0%, #18181b 45%, #09090b 80%, #000000 100%);
    border: 2px solid #6366f1;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.95), inset 0 0 16px #000000;
}

.ball-vacuum .sphere-core {
    position: absolute;
    inset: 15px;
    border-radius: 50%;
    background: radial-gradient(circle, #000000 0%, #18181b 55%, #312e81 100%);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.8), inset 0 0 10px #000;
    animation: pulseVacuumCore 1.4s infinite ease-in-out;
}

@keyframes pulseVacuumCore {

    0%,
    100% {
        transform: scale(0.9) rotate(0deg);
        filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.8));
    }

    50% {
        transform: scale(1.1) rotate(180deg);
        filter: drop-shadow(0 0 18px rgba(129, 140, 248, 0.9));
    }
}

/* Theme 8: SONIC BALL (Ultrasonic Resonance & Cymatics) */
.ball-sonic .reaction-ball-sphere {
    background: radial-gradient(circle at 18px 18px, #f0fdf4 0%, #38bdf8 35%, #0284c7 75%, #082f49 100%);
    border: 2px solid #38bdf8;
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.65), inset 0 -6px 14px #000;
}

.ball-sonic .sphere-core {
    position: absolute;
    inset: 16px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #bae6fd 40%, #0284c7 100%);
    box-shadow: 0 0 16px #38bdf8;
    animation: pulseSonicCore 0.9s infinite alternate ease-in-out;
}

@keyframes pulseSonicCore {
    0% {
        transform: scale(0.88);
        filter: drop-shadow(0 0 8px #0284c7);
    }

    100% {
        transform: scale(1.14);
        filter: drop-shadow(0 0 20px #e0f2fe);
    }
}

/* --- Area of Effect (AoE) Fields --- */
.reaction-ball-aoe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.aoe-fire {
    width: 330px;
    height: 330px;
    border: 2px dashed rgba(255, 77, 0, 0.4);
    background: radial-gradient(circle, rgba(255, 69, 0, 0.12) 0%, rgba(255, 110, 0, 0.04) 60%, rgba(255, 69, 0, 0) 75%);
    animation: aoeFirePulse 4s infinite ease-in-out;
}

@keyframes aoeFirePulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.03);
        opacity: 1;
        filter: drop-shadow(0 0 14px rgba(255, 77, 0, 0.4));
    }
}

.aoe-cold {
    width: 330px;
    height: 330px;
    border: 2px dashed rgba(0, 210, 255, 0.4);
    background: radial-gradient(circle, rgba(0, 210, 255, 0.12) 0%, rgba(6, 182, 212, 0.04) 60%, rgba(0, 210, 255, 0) 75%);
    animation: aoeColdPulse 5s infinite ease-in-out;
}

@keyframes aoeColdPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.02);
        opacity: 1;
        filter: drop-shadow(0 0 14px rgba(0, 210, 255, 0.4));
    }
}

.aoe-electric {
    width: 330px;
    height: 330px;
    border: 2px dashed rgba(168, 85, 247, 0.4);
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, rgba(0, 240, 255, 0.05) 60%, rgba(168, 85, 247, 0) 75%);
    animation: aoeElectricPulse 2.5s infinite ease-in-out;
}

@keyframes aoeElectricPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.04);
        opacity: 1;
        filter: drop-shadow(0 0 16px rgba(0, 240, 255, 0.45));
    }
}

.aoe-magnetic {
    width: 370px;
    height: 370px;
    border: 2px dashed rgba(236, 72, 153, 0.35);
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, rgba(59, 130, 246, 0.06) 60%, rgba(236, 72, 153, 0) 75%);
    animation: aoeMagneticPulse 4s infinite linear;
}

@keyframes aoeMagneticPulse {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.aoe-gravity {
    width: 380px;
    height: 380px;
    border: 2px dashed rgba(168, 85, 247, 0.45);
    background: radial-gradient(circle, rgba(147, 51, 234, 0.15) 0%, rgba(91, 33, 182, 0.05) 60%, rgba(147, 51, 234, 0) 75%);
    animation: aoeGravityPulse 3.5s infinite ease-in-out;
}

@keyframes aoeGravityPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(0.97) rotate(180deg);
        opacity: 1;
        filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.5));
    }
}

.aoe-radioactive {
    width: 350px;
    height: 350px;
    border: 2px dashed rgba(16, 185, 129, 0.45);
    background: radial-gradient(circle, rgba(16, 185, 129, 0.14) 0%, rgba(5, 150, 105, 0.04) 60%, rgba(16, 185, 129, 0) 75%);
    animation: aoeRadioactivePulse 2.8s infinite ease-in-out;
}

@keyframes aoeRadioactivePulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.03);
        opacity: 1;
        filter: drop-shadow(0 0 18px rgba(16, 185, 129, 0.5));
    }
}

.aoe-vacuum {
    width: 260px;
    height: 260px;
    border: 2px dashed rgba(99, 102, 241, 0.55);
    background: radial-gradient(circle, rgba(15, 23, 42, 0.38) 0%, rgba(30, 27, 75, 0.14) 55%, rgba(0, 0, 0, 0) 75%);
    animation: aoeVacuumPulse 3s infinite linear;
}

@keyframes aoeVacuumPulse {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) rotate(-180deg) scale(0.97);
    }

    100% {
        transform: translate(-50%, -50%) rotate(-360deg) scale(1);
    }
}

.aoe-sonic {
    width: 360px;
    height: 360px;
    border: 2px dashed rgba(56, 189, 248, 0.45);
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, rgba(14, 165, 233, 0.04) 60%, rgba(56, 189, 248, 0) 75%);
    animation: aoeSonicPulse 2s infinite ease-in-out;
}

@keyframes aoeSonicPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.04);
        opacity: 1;
        filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.5));
    }
}

/* Header Bar & Recall Close Button Centered Inside Reaction Ball */
.reaction-ball-header {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    opacity: 0.88;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
    z-index: 10;
    pointer-events: auto;
}

.void-reaction-ball:hover .reaction-ball-header,
.void-reaction-ball.is-dragging .reaction-ball-header {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.reaction-ball-btn-recall {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(43, 24, 13, 0.88);
    border: 2px solid #ef4444;
    color: #fca5a5;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.75), 0 0 8px rgba(239, 68, 68, 0.45);
    transition: all 0.15s ease;
    padding: 0;
}

.reaction-ball-btn-recall:hover {
    background: #8c2a20;
    border-color: #ef4444;
    color: #ffffff;
    transform: scale(1.15);
}

.reaction-ball-btn-recall:active {
    transform: scale(0.95);
}

/* SVG Arc Overlay */
.reaction-ball-svg-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 8;
    overflow: visible;
}

.tesla-lightning-arc {
    stroke: #00ffff;
    stroke-width: 3.5px;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    filter: drop-shadow(0 0 6px #a855f7) drop-shadow(0 0 12px #00ffff);
    animation: teslaArcFlash 0.14s ease-out forwards;
}

@keyframes teslaArcFlash {
    0% {
        opacity: 0;
    }

    40% {
        opacity: 1;
        stroke-width: 4px;
    }

    100% {
        opacity: 0;
        stroke-width: 1.5px;
    }
}

/* Flash Pembakaran Visual (Combustion Fire Burst) */
.combustion-fire-burst {
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #ffea00 30%, #ff3b00 70%, rgba(255, 59, 0, 0) 100%);
    pointer-events: none;
    z-index: 12;
    animation: combustionBurst 0.4s ease-out forwards;
}

@keyframes combustionBurst {
    0% {
        transform: scale(0.2);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: 0.9;
    }

    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

/* In-Field Particle Dynamic Effects */
.particle-fire-excited {
    filter: drop-shadow(0 0 8px #ff4500) brightness(1.25) !important;
}

.particle-cold-frozen {
    filter: drop-shadow(0 0 8px #00d2ff) brightness(1.15) !important;
    opacity: 0.85;
}

.particle-electric-shocked {
    filter: drop-shadow(0 0 10px #00ffff) drop-shadow(0 0 4px #a855f7) brightness(1.3) !important;
}

.particle-gravity-pulled {
    filter: drop-shadow(0 0 9px #c084fc) brightness(1.25) !important;
}

.particle-radioactive-irradiated {
    filter: drop-shadow(0 0 9px #34d399) brightness(1.3) !important;
}

.particle-vacuum-pulled {
    filter: drop-shadow(0 0 9px #818cf8) brightness(1.25) !important;
    transition: transform 0.06s linear;
}

.particle-sonic-vibrating {
    filter: drop-shadow(0 0 9px #38bdf8) brightness(1.3) !important;
}

/* Radiolisis Cherenkov Green Burst VFX */
.radiolysis-burst {
    position: absolute;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #6ee7b7 35%, #059669 70%, rgba(5, 150, 105, 0) 100%);
    pointer-events: none;
    z-index: 12;
    animation: combustionBurst 0.35s ease-out forwards;
}

/* Vacuum Annihilation Singularity Burst */
.vacuum-annihilation-burst {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #818cf8 35%, #1e1b4b 70%, transparent 100%);
    pointer-events: none;
    z-index: 12;
    animation: vacuumBurst 0.3s ease-in forwards;
}

@keyframes vacuumBurst {
    0% {
        transform: scale(1.2) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: scale(0.1) rotate(180deg);
        opacity: 0;
    }
}

/* Sonic Ultrasonic Shockwave Ripple Ring */
.sonic-wave-ripple {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(56, 189, 248, 0.85);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.7);
    pointer-events: none;
    z-index: 10;
    animation: sonicRippleExpand 0.7s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes sonicRippleExpand {
    0% {
        width: 20px;
        height: 20px;
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    100% {
        width: 360px;
        height: 360px;
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* Animasi Spawn & Recall Reaction Ball */
@keyframes reactionBallSpawn {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.void-reaction-ball.is-recalling {
    animation: reactionBallRecall 0.22s ease-in forwards !important;
}

@keyframes reactionBallRecall {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.15);
        opacity: 0;
    }
}

.void-reaction-ball.is-dragging {
    filter: brightness(1.2);
    cursor: grabbing;
}

/* --- Batch 13: Barium, Krypton, Lithium & Xenon Atoms --- */

.barium {
    background-color: rgba(190, 230, 90, 0.28);
    animation: pulse-barium 2s infinite ease-in-out;
}

.krypton {
    background-color: rgba(180, 220, 255, 0.25);
    animation: pulse-krypton 2s infinite ease-in-out;
}

.lithium {
    background-color: rgba(220, 60, 80, 0.30);
    animation: pulse-lithium 2s infinite ease-in-out;
}

.xenon {
    background-color: rgba(140, 100, 220, 0.28);
    animation: pulse-xenon 2s infinite ease-in-out;
}

@keyframes pulse-barium {
    70% {
        box-shadow: 0 0 10px 10px rgba(190, 230, 90, 0);
    }
}

@keyframes pulse-krypton {
    70% {
        box-shadow: 0 0 10px 10px rgba(180, 220, 255, 0);
    }
}

@keyframes pulse-lithium {
    70% {
        box-shadow: 0 0 10px 10px rgba(220, 60, 80, 0);
    }
}

@keyframes pulse-xenon {
    70% {
        box-shadow: 0 0 10px 10px rgba(140, 100, 220, 0);
    }
}

/* --- Molecule Atom-Part: New Atoms --- */

.molecule .barium {
    width: 44px;
    height: 44px;
    background: radial-gradient(circle at 12px 12px, #f0ffc0, #7cb342);
}

.molecule .krypton {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 10px 10px, #e8f4fd, #64b5f6);
}

.molecule .lithium {
    width: 26px;
    height: 26px;
    background: radial-gradient(circle at 8px 8px, #fca5a5, #dc2626);
}

.molecule .xenon {
    width: 42px;
    height: 42px;
    background: radial-gradient(circle at 12px 12px, #ddd6fe, #7c3aed);
}

/* --- Fusing Glows: New --- */

.fusing-ice-blue {
    animation: pulse-fusing-ice-blue 0.5s infinite ease-in-out !important;
}

@keyframes pulse-fusing-ice-blue {

    0%,
    100% {
        box-shadow: 0 0 10px 4px rgba(180, 220, 255, 0.7);
    }

    50% {
        box-shadow: 0 0 18px 8px rgba(180, 220, 255, 0.95);
    }
}

.fusing-violet {
    animation: pulse-fusing-violet 0.5s infinite ease-in-out !important;
}

@keyframes pulse-fusing-violet {

    0%,
    100% {
        box-shadow: 0 0 10px 4px rgba(140, 100, 220, 0.7);
    }

    50% {
        box-shadow: 0 0 18px 8px rgba(140, 100, 220, 0.95);
    }
}

/* --- Molecule Layouts: BaCl2 --- */
.bacl2-molecule .chlorine:first-child {
    transform: translateX(-22px);
}

.bacl2-molecule .barium {
    transform: translateX(0);
}

.bacl2-molecule .chlorine:last-child {
    transform: translateX(22px);
}

/* BaO */
.bao-molecule .barium {
    transform: translateX(-16px);
}

.bao-molecule .oxygen {
    transform: translateX(16px);
}

/* BaSO4 */
.baso4-molecule {
    width: 110px;
    height: 60px;
}

.baso4-molecule .barium {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.baso4-molecule .sulfur {
    position: absolute;
    left: 38px;
    top: 50%;
    transform: translateY(-50%);
}

.baso4-molecule .oxygen.o1 {
    position: absolute;
    left: 62px;
    top: 0;
}

.baso4-molecule .oxygen.o2 {
    position: absolute;
    left: 80px;
    top: 18px;
}

.baso4-molecule .oxygen.o3 {
    position: absolute;
    left: 62px;
    top: 36px;
}

.baso4-molecule .oxygen.o4 {
    position: absolute;
    left: 44px;
    top: 18px;
}

/* KrF2 */
.krf2-molecule .fluorine:first-child {
    transform: translateX(-20px);
}

.krf2-molecule .krypton {
    transform: translateX(0);
}

.krf2-molecule .fluorine:last-child {
    transform: translateX(20px);
}

/* LiH */
.lih-molecule .lithium {
    transform: translateX(-12px);
}

.lih-molecule .hydrogen {
    transform: translateX(12px);
}

/* Li2O */
.li2o-molecule .lithium.li1 {
    transform: translateX(-18px);
}

.li2o-molecule .oxygen {
    transform: translateX(0);
}

.li2o-molecule .lithium.li2 {
    transform: translateX(18px);
}

/* LiF */
.lif-molecule .lithium {
    transform: translateX(-12px);
}

.lif-molecule .fluorine {
    transform: translateX(12px);
}

/* LiCl */
.licl-molecule .lithium {
    transform: translateX(-14px);
}

.licl-molecule .chlorine {
    transform: translateX(14px);
}

/* LiOH */
.lioh-molecule .lithium {
    transform: translateX(-20px);
}

.lioh-molecule .oxygen {
    transform: translateX(0);
}

.lioh-molecule .hydrogen {
    transform: translateX(16px);
}

/* XeF2 */
.xef2-molecule .fluorine:first-child {
    transform: translateX(-22px);
}

.xef2-molecule .xenon {
    transform: translateX(0);
}

.xef2-molecule .fluorine:last-child {
    transform: translateX(22px);
}

/* XeO3 */
.xeo3-molecule .xenon {
    transform: translate(0, -8px);
}

.xeo3-molecule .oxygen.o1 {
    transform: translate(-18px, 12px);
}

.xeo3-molecule .oxygen.o2 {
    transform: translate(0px, 18px);
}

.xeo3-molecule .oxygen.o3 {
    transform: translate(18px, 12px);
}

/* XeF4 */
.xef4-molecule {
    width: 80px;
    height: 80px;
}

.xef4-molecule .fluorine.f1 {
    position: absolute;
    left: 4px;
    top: 4px;
}

.xef4-molecule .fluorine.f2 {
    position: absolute;
    right: 4px;
    top: 4px;
}

.xef4-molecule .xenon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.xef4-molecule .fluorine.f3 {
    position: absolute;
    left: 4px;
    bottom: 4px;
}

.xef4-molecule .fluorine.f4 {
    position: absolute;
    right: 4px;
    bottom: 4px;
}

/* ==========================================================================
   REACTION BALL MOBILE INFO MODAL / TOOLTIP SYSTEM
   High-contrast Renaissance parchment & dark leather aesthetic, large font
   ========================================================================== */

.reaction-ball-info-overlay {
    position: absolute;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s;
}

.reaction-ball-info-overlay.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.reaction-ball-info-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 7, 4, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.reaction-ball-info-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 540px;
    max-height: min(90vh, 520px);
    background: linear-gradient(175deg, #241a12 0%, #18120b 100%);
    border: 2px solid #c9a759;
    box-shadow: inset 0 0 0 1px rgba(201, 167, 89, 0.35), 0 16px 40px rgba(0, 0, 0, 0.88);
    border-radius: 14px;
    padding: 22px 24px 18px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: reactionBallCardPop 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes reactionBallCardPop {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.reaction-ball-info-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(45, 30, 18, 0.75);
    border: 1.5px solid #c9a759;
    color: #f5eedb;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    padding: 0;
    transition: transform 0.15s ease, background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.reaction-ball-info-close:hover {
    background: #7c221a;
    border-color: #ef4444;
    transform: scale(1.08);
}

.reaction-ball-info-close:active {
    transform: scale(0.92);
}

.reaction-ball-info-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(201, 167, 89, 0.3);
    flex-shrink: 0;
}

.reaction-ball-info-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: #f4ead2;
    border: 2px solid #bfa478;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reaction-ball-info-icon-preview {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reaction-ball-info-icon-preview svg {
    width: 46px;
    height: 46px;
    color: #1a0902;
}

.reaction-ball-info-title-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.reaction-ball-info-category {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: #c9a759;
}

.reaction-ball-info-title {
    font-family: 'Cinzel', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
    font-size: 24px;
    font-weight: 800;
    color: #faf5eb;
    margin: 0;
    line-height: 1.25;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    letter-spacing: 0.5px;
}

.reaction-ball-info-status-badge {
    align-self: flex-start;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.4px;
    margin-top: 2px;
}

.reaction-ball-info-status-badge.is-active {
    background: #133a24;
    border: 1px solid #10b981;
    color: #aee5cb;
}

.reaction-ball-info-status-badge.is-idle {
    background: #2e2014;
    border: 1px solid #8c6a40;
    color: #faeed8;
}

.reaction-ball-info-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 2px 12px 0;
}

.reaction-ball-info-body::-webkit-scrollbar {
    width: 5px;
}
.reaction-ball-info-body::-webkit-scrollbar-thumb {
    background: #8a6a42;
    border-radius: 4px;
}

.reaction-ball-info-desc {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 19px;
    font-weight: 500;
    line-height: 1.65;
    color: #faf5eb;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.reaction-ball-info-footer {
    padding-top: 14px;
    border-top: 1px solid rgba(201, 167, 89, 0.2);
    text-align: center;
    flex-shrink: 0;
}

.reaction-ball-info-footer .dismiss-hint {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    color: #c9a759;
    letter-spacing: 0.3px;
}

@media (max-width: 600px) {
    .reaction-ball-info-card {
        width: 92vw;
        max-width: 480px;
        padding: 18px 18px 14px;
        border-radius: 12px;
        max-height: 92vh;
    }
    .reaction-ball-info-icon-wrapper {
        width: 52px;
        height: 52px;
    }
    .reaction-ball-info-icon-preview {
        width: 44px;
        height: 44px;
    }
    .reaction-ball-info-icon-preview svg {
        width: 40px;
        height: 40px;
    }
    .reaction-ball-info-category {
        font-size: 12px;
    }
    .reaction-ball-info-title {
        font-size: 22px;
    }
    .reaction-ball-info-status-badge {
        font-size: 11px;
        padding: 2px 8px;
    }
    .reaction-ball-info-body {
        padding: 14px 0 10px 0;
    }
    .reaction-ball-info-desc {
        font-size: 18px;
        line-height: 1.6;
    }
    .reaction-ball-info-footer .dismiss-hint {
        font-size: 12.5px;
    }
}