:root {
    --bg-color: #050510;
    --text-color: #e0e0e0;
    --neon-blue: #00f3ff;
    --neon-green: #00ff41;
    --neon-pink: #ff00de;
    --neon-yellow: #ffee00;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    user-select: none;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Roboto Mono', monospace;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    width: 100%;
    height: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    position: relative;
    background: radial-gradient(circle at center, #1a1a2e 0%, #000000 100%);
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.1);
}

/* HUD */
#hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--glass-border);
}

.hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.assistant-panel {
    flex: 2;
    /* Take up more space */
    margin: 0 1rem;
    border: 1px solid var(--neon-blue);
    background: rgba(0, 243, 255, 0.05);
    border-radius: 5px;
    padding: 5px;
    height: 120px;
    /* Fixed height to prevent jumping */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.assistant-text {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8rem;
    color: #fff;
    text-align: center;
    line-height: 1.2;
    overflow-y: auto;
}

.label {
    font-size: 0.7rem;
    color: var(--neon-blue);
    opacity: 0.8;
    margin-bottom: 2px;
}

.value {
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 0 10px var(--neon-blue);
}

/* Game Area */
#game-area {
    flex: 1;
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 1rem;
}

#virus-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pulse 4s infinite ease-in-out;
}

.virus-core {
    font-size: 120px;
    z-index: 1;
    filter: drop-shadow(0 0 20px var(--neon-green));
}

@keyframes pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px var(--neon-green));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 40px var(--neon-green));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px var(--neon-green));
    }
}

/* Binding Pockets */
.binding-pocket {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
    font-size: 24px;
    transition: all 0.3s;
}

.binding-pocket.active-target {
    border-color: var(--neon-yellow);
    box-shadow: 0 0 15px var(--neon-yellow);
    animation: pulse-fast 1s infinite;
}

.binding-pocket.filled {
    border-style: solid;
    border-color: var(--neon-green);
    background: rgba(0, 255, 65, 0.2);
    box-shadow: 0 0 20px var(--neon-green);
}

@keyframes pulse-fast {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

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

/* Workbench */
#workbench-container {
    width: 300px;
    height: 350px;
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid var(--neon-blue);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    position: relative;
}

.workbench-header {
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-blue);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

#scaffold {
    position: relative;
    width: 180px;
    height: 180px;
    min-width: 180px;
    min-height: 180px;
    flex-shrink: 0;
    background: rgba(0, 243, 255, 0.2);
    border: 4px dashed rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex !important;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #fff;
    text-align: center;
    font-weight: bold;
    transition: all 0.2s;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
    z-index: 50;
}

.scaffold.hovered {
    border-color: var(--neon-blue);
    background: rgba(0, 243, 255, 0.2);
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--neon-blue);
}

/* When an icon is dropped */
/* When an icon is dropped */
.scaffold[data-group-id] {
    font-size: 80px;
    /* Large icon */
    border-style: solid;
    border-color: var(--neon-blue);
    text-shadow: 0 0 20px currentColor;
}

/* Functional Groups */
.func-group {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    cursor: grab;
    border: 2px solid transparent;
    transition: transform 0.2s;
    background: #222;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Inventory */
#inventory {
    height: 160px;
    /* Increased from 120px to prevent scrollbar */
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
}

.inventory-label {
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-blue);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

#group-tray {
    display: flex;
    justify-content: center;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem;
    align-items: center;
}

/* Property Colors */
.prop-positive {
    border-color: #3366ff;
    color: #3366ff;
    box-shadow: 0 0 5px #3366ff;
}

.prop-negative {
    border-color: #ff3333;
    color: #ff3333;
    box-shadow: 0 0 5px #ff3333;
}

.prop-hydrophobic {
    border-color: #ffff33;
    color: #ffff33;
    box-shadow: 0 0 5px #ffff33;
}

.prop-polar {
    border-color: #33ff33;
    color: #33ff33;
    box-shadow: 0 0 5px #33ff33;
}

.small-btn {
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

.info-panel {
    position: absolute;
    bottom: 20px;
    left: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border: 1px solid var(--neon-blue);
    border-radius: 5px;
    text-align: center;
    width: 200px;
    z-index: 10;
}

.info-panel h3 {
    margin: 0 0 5px 0;
    font-size: 0.8rem;
    color: var(--neon-blue);
}

.info-panel p {
    margin: 0;
    font-size: 0.7rem;
    color: #fff;
}

/* Overlays */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 16, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    text-align: center;
    padding: 2rem;
}

.hidden {
    display: none !important;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: var(--neon-blue);
    text-shadow: 0 0 20px var(--neon-blue);
    margin-bottom: 1rem;
}

.mission-brief {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.instructions {
    font-size: 1rem;
    margin-bottom: 3rem;
    color: #aaa;
}

.highlight {
    color: var(--neon-yellow);
    font-weight: bold;
}

.neon-btn {
    background: transparent;
    color: var(--neon-blue);
    border: 2px solid var(--neon-blue);
    padding: 1rem 2rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 10px var(--neon-blue);
    text-transform: uppercase;
}

.neon-btn:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 30px var(--neon-blue);
}

.shake {
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.particle {
    position: absolute;
    pointer-events: none;
    animation: float-up 1s ease-out forwards;
    font-size: 20px;
    z-index: 10;
}

@keyframes float-up {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-50px) scale(0);
        opacity: 0;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(10, 10, 25, 0.95);
    border: 1px solid var(--neon-blue);
    border-radius: 10px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    text-align: left;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
    position: relative;
    animation: slide-in 0.3s ease-out;
}

@keyframes slide-in {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#edu-title {
    color: var(--neon-blue);
    font-family: 'Orbitron', sans-serif;
    margin-top: 0;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

#edu-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #ddd;
    font-size: 0.9rem;
}

.learn-more-btn {
    background: none;
    border: none;
    color: var(--neon-yellow);
    text-decoration: underline;
    cursor: pointer;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8rem;
    margin-top: 5px;
    padding: 0;
}

.learn-more-btn:hover {
    color: #fff;
    text-shadow: 0 0 5px var(--neon-yellow);
}

#all-games-btn {
    font-size: 0.7rem;
    padding: 0.5rem;
    white-space: nowrap;
    margin-right: 1rem;
}