/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
    background: #000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Canvas */
#fireworks-canvas {
    display: block;
    width: 100vw;
    height: 100vh;
    cursor: crosshair;
}

/* Control Panel */
.control-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    min-width: 200px;
    z-index: 100;
    transition: all 0.3s ease;
}

.control-panel.collapsed .panel-content {
    display: none;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-title {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
}

.toggle-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toggle-btn:hover {
    opacity: 1;
}

.panel-content {
    padding: 16px;
}

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

.control-group:last-of-type {
    margin-bottom: 16px;
}

.control-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.control-group select {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.control-group select:hover {
    background: rgba(255, 255, 255, 0.15);
}

.control-group select:focus {
    border-color: rgba(255, 255, 255, 0.4);
}

.control-group select option {
    background: #1a1a2e;
    color: #fff;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    font-size: 13px !important;
    text-transform: none !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #ff6b6b;
}

.clear-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-btn:hover {
    background: linear-gradient(135deg, #ff5252, #e04545);
    transform: translateY(-1px);
}

.clear-btn:active {
    transform: translateY(0);
}

/* Instructions */
.instructions {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    z-index: 50;
    pointer-events: none;
    transition: opacity 0.5s;
}

.instructions p {
    margin-bottom: 8px;
}

.instructions .shortcuts {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
}

.instructions.hidden {
    opacity: 0;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-text {
    color: #fff;
    font-size: 18px;
    letter-spacing: 2px;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .control-panel {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
    }

    .instructions {
        bottom: 20px;
        font-size: 13px;
        padding: 0 20px;
    }

    .instructions .shortcuts {
        font-size: 10px;
    }
}

/* Theme Colors for Panel Border Glow */
.control-panel.theme-spring {
    border-color: rgba(255, 50, 50, 0.3);
    box-shadow: 0 0 20px rgba(255, 50, 50, 0.1);
}

.control-panel.theme-christmas {
    border-color: rgba(0, 200, 100, 0.3);
    box-shadow: 0 0 20px rgba(0, 200, 100, 0.1);
}

.control-panel.theme-romantic {
    border-color: rgba(255, 100, 150, 0.3);
    box-shadow: 0 0 20px rgba(255, 100, 150, 0.1);
}
