* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    background: linear-gradient(135deg, #001a1a 0%, #003333 50%, #005555 100%);
}

.container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* Canvas */
#ecosystem-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* Info Panel */
.info-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 26, 26, 0.7);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
    color: #00ffff;
    z-index: 10;
    min-width: 250px;
    transition: all 0.3s ease;
}

.info-panel.collapsed {
    padding: 10px;
    min-width: auto;
    background: transparent;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
}

.info-panel.collapsed .menu-content {
    display: none;
}

/* Hamburger Menu Toggle */
.menu-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 11;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #00ffff;
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.menu-toggle:hover span {
    background: #00ff99;
    box-shadow: 0 0 10px rgba(0, 255, 153, 0.7);
}

/* Default state is X (when open) */
.menu-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle span:nth-child(2) {
    opacity: 0;
}

.menu-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Collapsed state is hamburger */
.collapsed .menu-toggle span:nth-child(1) {
    transform: translateY(0) rotate(0);
}

.collapsed .menu-toggle span:nth-child(2) {
    opacity: 1;
}

.collapsed .menu-toggle span:nth-child(3) {
    transform: translateY(0) rotate(0);
}

.menu-content {
    transition: opacity 0.3s ease;
}

.info-panel h1 {
    font-size: 1.8em;
    margin-bottom: 5px;
    text-shadow: 0 0 15px #00ffff;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 0.9em;
    color: #00cccc;
    margin-bottom: 15px;
    font-style: italic;
}

.stats {
    margin: 15px 0;
    padding: 10px 0;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.stat {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    font-size: 1.1em;
}

.stat-label {
    color: #00cccc;
}

.stat span:last-child {
    color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 10px #00ffff;
}

.instructions {
    margin-top: 15px;
    font-size: 0.85em;
    color: #00aaaa;
}

.instructions p {
    margin: 5px 0;
}

/* Controls */
.controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.controls button {
    background: rgba(0, 77, 77, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 255, 255, 0.4);
    color: #00ffff;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.controls button:hover {
    background: rgba(0, 102, 102, 0.9);
    border-color: #00ffff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

.controls button:active {
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .info-panel {
        top: 10px;
        left: 10px;
        right: 10px;
        padding: 15px;
        min-width: unset;
    }
    
    .info-panel.collapsed {
        right: auto;
        width: 44px;
    }
    
    .info-panel h1 {
        font-size: 1.4em;
    }
    
    .controls {
        bottom: 10px;
    }
    
    .controls button {
        padding: 10px 18px;
        font-size: 0.9em;
    }
}