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

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    overflow: hidden;
    background: #000;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><text y="20" font-size="20">👆</text></svg>'), auto;
}

#canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

#controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.control-panel {
    background: linear-gradient(135deg, #ECE9D8 0%, #C0C0C0 100%);
    border: 3px outset #FFFFFF;
    border-radius: 0;
    padding: 10px;
    width: 280px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.5);
    font-family: 'MS Sans Serif', sans-serif;
}

.control-header {
    background: linear-gradient(180deg, #0A246A 0%, #0A55AA 100%);
    color: #FFFFFF;
    padding: 8px;
    font-weight: bold;
    text-align: center;
    font-size: 14px;
    border: 2px outset #FFFFFF;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px #000;
}

.control-section {
    background: #FFFFFF;
    border: 2px inset #808080;
    padding: 10px;
    margin-bottom: 10px;
}

.control-section h3 {
    color: #000080;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: bold;
}

.retro-select {
    width: 100%;
    padding: 5px;
    border: 2px inset #808080;
    background: #FFFFFF;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 12px;
    margin-bottom: 5px;
}

.retro-checkbox {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    cursor: pointer;
}

.retro-checkbox input[type="checkbox"] {
    margin-right: 5px;
    vertical-align: middle;
}

.retro-slider {
    display: block;
    font-size: 12px;
    margin-bottom: 8px;
}

.retro-slider input[type="range"] {
    width: 100%;
    margin-top: 5px;
}

.retro-button {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    background: #ECE9D8;
    border: 2px outset #FFFFFF;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: all 0.1s;
}

.retro-button:hover {
    background: #DCDAD5;
}

.retro-button:active {
    border-style: inset;
    background: #C0C0C0;
}

.footer-link {
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px groove #808080;
}

.footer-link a {
    color: #0000EE;
    text-decoration: underline;
    font-size: 11px;
    font-family: 'MS Sans Serif', sans-serif;
}

.footer-link a:visited {
    color: #551A8B;
}

.footer-link a:hover {
    color: #FF0000;
}

/* Custom scrollbar for retro feel */
#controls::-webkit-scrollbar {
    width: 16px;
}

#controls::-webkit-scrollbar-track {
    background: #ECE9D8;
    border: 1px solid #808080;
}

#controls::-webkit-scrollbar-thumb {
    background: #C0C0C0;
    border: 2px outset #FFFFFF;
}

#controls::-webkit-scrollbar-thumb:hover {
    background: #B0B0B0;
}

/* Blinking animation for text */
@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.3; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #controls {
        top: 10px;
        right: 10px;
        max-height: 50vh;
    }
    
    .control-panel {
        width: 240px;
        font-size: 11px;
    }
    
    .retro-button {
        padding: 6px;
        font-size: 11px;
    }
}

/* Loading animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Sparkle effect */
.sparkle {
    pointer-events: none;
    position: absolute;
    animation: sparkle 0.5s ease-out forwards;
}

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