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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #000;
    position: relative;
}

/* Fullscreen canvas container */
.canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 1;
}

#threejs-container {
    width: 100%;
    height: 100%;
}

#threejs-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Controls Panel */
.controls-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    z-index: 1000;
    min-width: 280px;
    max-width: 320px;
    max-height: calc(100vh - 40px);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.controls-panel h3 {
    color: #fff;
    font-size: 18px;
    margin: 0;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

.minimize-btn {
    background: rgba(74, 158, 255, 0.2);
    border: 1px solid rgba(74, 158, 255, 0.4);
    color: #4a9eff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.minimize-btn:hover {
    background: rgba(74, 158, 255, 0.3);
    border-color: rgba(74, 158, 255, 0.6);
    transform: scale(1.05);
}

.panel-content {
    transition: opacity 0.3s ease, max-height 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    max-height: calc(100vh - 120px);
    padding-right: 4px;
}

/* Custom scrollbar for panel content */
.panel-content::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb {
    background: rgba(74, 158, 255, 0.4);
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 158, 255, 0.6);
}

.controls-panel.minimized .panel-content {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.controls-panel.minimized {
    padding: 12px 20px;
    min-width: auto;
}

.controls-panel.minimized .panel-header {
    margin-bottom: 0;
}


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

.control-group:last-child {
    margin-bottom: 0;
}

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

.control-group label span {
    color: #4a9eff;
    font-weight: 600;
    margin-left: 8px;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a9eff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(74, 158, 255, 0.4);
    transition: all 0.2s ease;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #5fb0ff;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(74, 158, 255, 0.6);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a9eff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(74, 158, 255, 0.4);
    transition: all 0.2s ease;
}

.control-group input[type="range"]::-moz-range-thumb:hover {
    background: #5fb0ff;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(74, 158, 255, 0.6);
}

/* Checkbox styling */
.control-group .checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.control-group .checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #4a9eff;
    border-radius: 4px;
}

.control-group .checkbox-label span {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    margin-left: 0;
}

/* Screenshot button */
.screenshot-btn {
    width: 100%;
    padding: 12px 16px;
    background: rgba(74, 158, 255, 0.2);
    border: 1px solid rgba(74, 158, 255, 0.4);
    border-radius: 8px;
    color: #4a9eff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.screenshot-btn:hover {
    background: rgba(74, 158, 255, 0.3);
    border-color: rgba(74, 158, 255, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.screenshot-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(74, 158, 255, 0.2);
}


