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

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

#scene-container {
    width: 100vw;
    height: 100vh;
}

.top-bar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.top-bar h1 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.help-icon {
    width: 24px;
    height: 24px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    cursor: help;
    transition: all 0.2s;
}

.help-icon:hover {
    transform: scale(1.1);
    background: #2563eb;
}

.control-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    max-width: 320px;
    z-index: 100;
}

.mode-section {
    margin-bottom: 20px;
}

.mode-button {
    width: 100%;
    padding: 14px 20px;
    background: #f3f4f6;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.mode-button.active {
    background: #3b82f6;
    color: white;
    border-color: #2563eb;
}

.mode-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.mode-icon {
    font-size: 20px;
}

.mode-hint {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

.slider-section {
    margin-bottom: 20px;
}

.slider-section label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.slider-section input[type="range"] {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.slider-section input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.slider-section input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #2563eb;
}

.color-section {
    margin-bottom: 20px;
}

.color-section label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.color-palette {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-btn.active {
    border-color: #3b82f6;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.color-btn:hover {
    transform: scale(1.05);
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.action-btn {
    flex: 1;
    padding: 10px 16px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.action-btn.danger {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}

.action-btn.danger:hover {
    background: #fecaca;
}

.preset-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
}

.preset-section label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.preset-buttons {
    display: flex;
    gap: 8px;
}

.preset-btn {
    flex: 1;
    padding: 8px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 9999;
}

.app-footer {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.app-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.app-footer a:hover {
    color: #2563eb;
}

@media (max-width: 768px) {
    .control-panel {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
        padding: 16px;
    }
    
    .top-bar {
        top: 10px;
        padding: 10px 16px;
    }
    
    .top-bar h1 {
        font-size: 16px;
    }
    
    .app-footer {
        bottom: auto;
        top: 60px;
        right: 10px;
        font-size: 11px;
        padding: 8px 12px;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
    
    .action-btn {
        flex: 1 1 calc(50% - 4px);
    }
}