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

body {
    background-color: #2a2a2a;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#canvas {
    display: block;
}

/* Hamburger Menu Toggle */
.hamburger {
    position: fixed;
    top: 15px;
    left: 15px;
    width: 24px;
    height: 20px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Side Menu */
.menu {
    position: fixed;
    top: 0;
    left: -240px;
    width: 220px;
    height: 100vh;
    background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 50px 15px 15px;
    transition: left 0.3s ease;
    z-index: 999;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.menu.active {
    left: 0;
}

.menu h2 {
    color: #ffffff;
    margin-bottom: 18px;
    font-size: 16px;
    text-align: center;
}

.control-group {
    margin-bottom: 14px;
}

.control-group label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    color: #e0e0e0;
    margin-bottom: 6px;
    font-size: 11px;
}

.control-group label span {
    color: #00ffff;
    font-weight: bold;
}

/* Info Icon */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    font-size: 10px;
    color: #888 !important;
    font-weight: normal !important;
    cursor: help;
    position: relative;
    transition: color 0.2s ease;
}

.info-icon:hover {
    color: #00ffff !important;
}

.info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #e0e0e0;
    padding: 8px 10px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: normal;
    line-height: 1.4;
    width: 160px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.info-icon::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 2px);
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.info-icon:hover::after,
.info-icon:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 3px;
    background: linear-gradient(90deg, #00ffff, #8b00ff, #ff6600);
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.7);
    transition: transform 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.7);
}

/* Button Group */
.button-group {
    display: flex;
    gap: 8px;
}

/* Reset Button */
#resetBtn, #dynamicBtn {
    flex: 1;
    padding: 8px 10px;
    border: none;
    border-radius: 20px;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#resetBtn {
    background: linear-gradient(135deg, #00ffff 0%, #8b00ff 100%);
}

#dynamicBtn {
    background: linear-gradient(135deg, #555 0%, #333 100%);
}

#dynamicBtn.active {
    background: linear-gradient(135deg, #ff6600 0%, #ff0066 100%);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

#resetBtn:hover, #dynamicBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#resetBtn:active, #dynamicBtn:active {
    transform: translateY(0);
}

/* Instructions hint */
.menu::after {
    content: 'Drag to rotate • Scroll to zoom';
    display: block;
    color: #888;
    font-size: 9px;
    text-align: center;
    margin-top: 18px;
    font-style: italic;
}
