* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, #0a0515 0%, #1a0a2e 50%, #0d0d1a 100%);
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#header {
    background: linear-gradient(90deg, rgba(75, 0, 130, 0.8), rgba(0, 0, 50, 0.8));
    padding: 1rem 1.5rem;
    text-align: center;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
    backdrop-filter: blur(10px);
}

#header h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    background: linear-gradient(90deg, #00D4FF, #FF00FF, #00D4FF);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    to { background-position: 200% center; }
}

.subtitle {
    font-size: 0.85rem;
    color: #8888aa;
    margin-top: 0.25rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

#scene-container {
    flex: 1;
    min-height: 50vh;
    position: relative;
}

#scene-container canvas {
    display: block;
}

#stats-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    z-index: 10;
}

.stat-item {
    background: rgba(10, 5, 21, 0.85);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    backdrop-filter: blur(5px);
}

.stat-label {
    display: block;
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: #00D4FF;
    font-weight: 700;
}

#controls-panel {
    background: rgba(10, 5, 21, 0.95);
    border-top: 2px solid rgba(0, 212, 255, 0.3);
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.control-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
}

.control-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.drug-toggle {
    display: flex;
    gap: 0.5rem;
}

.drug-btn {
    background: rgba(75, 0, 130, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #aaa;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.7rem;
    transition: all 0.3s;
}

.drug-btn:hover {
    background: rgba(75, 0, 130, 0.5);
    border-color: rgba(0, 212, 255, 0.5);
}

.drug-btn.active {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00D4FF;
    color: #00D4FF;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(75, 0, 130, 0.5);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #00D4FF, #0088FF);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #00D4FF, #0088FF);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.button-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.primary-btn {
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(135deg, #00D4FF, #0066CC);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
}

.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.primary-btn.administering {
    animation: pulse 0.5s ease infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.4); }
    50% { box-shadow: 0 0 40px rgba(0, 212, 255, 0.8); }
}

.pill-icon {
    font-size: 1.2rem;
}

.secondary-btn {
    font-family: inherit;
    background: rgba(75, 0, 130, 0.4);
    border: 1px solid rgba(255, 0, 255, 0.4);
    color: #FF00FF;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.secondary-btn:hover {
    background: rgba(255, 0, 255, 0.2);
    border-color: #FF00FF;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

.info-toggle-btn {
    position: fixed;
    top: 5rem;
    right: 1rem;
    background: rgba(10, 5, 21, 0.9);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00D4FF;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    z-index: 20;
    transition: all 0.3s;
}

.info-toggle-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

#info-panel {
    position: fixed;
    top: 8rem;
    right: 1rem;
    width: min(350px, 90vw);
    background: rgba(10, 5, 21, 0.95);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    z-index: 25;
    backdrop-filter: blur(10px);
}

#info-panel.hidden {
    display: none;
}

.close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #FF00FF;
}

#info-panel h3 {
    font-family: 'Orbitron', sans-serif;
    color: #00D4FF;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.mechanism-list {
    list-style: none;
    margin-bottom: 1rem;
}

.mechanism-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(75, 0, 130, 0.3);
    font-size: 0.85rem;
    line-height: 1.5;
}

.mechanism-list li:last-child {
    border-bottom: none;
}

.mechanism-list strong {
    color: #FF00FF;
}

.disclaimer {
    background: rgba(139, 0, 0, 0.2);
    border: 1px solid rgba(255, 69, 0, 0.5);
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.75rem;
    line-height: 1.6;
    color: #ffaa88;
}

.disclaimer strong {
    color: #FF4500;
    display: block;
    margin-bottom: 0.5rem;
}

#completion-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

#completion-modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(135deg, rgba(10, 5, 21, 0.98), rgba(26, 10, 46, 0.98));
    border: 2px solid rgba(0, 212, 255, 0.5);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    margin: 1rem;
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.3);
}

.modal-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: #00FF88;
    margin-bottom: 1rem;
}

.modal-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.modal-disclaimer {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 1.5rem !important;
}

footer {
    background: rgba(5, 2, 10, 0.9);
    padding: 1rem;
    text-align: center;
    border-top: 1px solid rgba(75, 0, 130, 0.3);
}

footer p {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 0.5rem;
}

footer a {
    color: #00D4FF;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s;
}

footer a:hover {
    color: #FF00FF;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #header {
        padding: 0.75rem 1rem;
    }
    
    #stats-overlay {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stat-item {
        padding: 0.4rem 0.75rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    #controls-panel {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-section {
        width: 100%;
    }
    
    .button-row {
        justify-content: center;
    }
    
    .primary-btn, .secondary-btn {
        flex: 1;
        justify-content: center;
    }
    
    .info-toggle-btn {
        top: auto;
        bottom: 1rem;
        right: 1rem;
    }
    
    #info-panel {
        top: auto;
        bottom: 4rem;
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
    }
}

@media (max-width: 480px) {
    .drug-toggle {
        flex-direction: column;
    }
    
    .drug-btn {
        width: 100%;
        text-align: center;
    }
}