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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
    background: #0a0a0f;
    color: white;
}

#scene-container {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

/* Control Panel */
.panel {
    position: fixed;
    background: rgba(20, 20, 30, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#control-panel {
    top: 20px;
    right: 20px;
    width: 280px;
    max-height: 90vh;
    overflow-y: auto;
}

#control-panel h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    margin-bottom: 15px;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

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

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #ccc;
}

select {
    width: 100%;
    padding: 8px;
    background: rgba(40, 40, 50, 0.8);
    border: 1px solid rgba(160, 32, 240, 0.5);
    border-radius: 6px;
    color: white;
    font-size: 13px;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #a020f0;
    box-shadow: 0 0 10px rgba(160, 32, 240, 0.3);
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #0080ff, #a020f0);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #00ffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

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

input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.primary-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #a020f0, #0080ff);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(160, 32, 240, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(160, 32, 240, 0.5);
}

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

/* Theme Gallery */
.gallery-panel {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    max-width: 90vw;
    transition: all 0.3s;
}

.gallery-panel.collapsed {
    height: 60px;
    overflow: hidden;
}

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

.gallery-header h3 {
    font-size: 16px;
    color: #00ffff;
}

#toggle-gallery {
    background: rgba(40, 40, 50, 0.8);
    border: 1px solid rgba(160, 32, 240, 0.5);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.theme-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px;
}

.theme-scroll::-webkit-scrollbar {
    height: 8px;
}

.theme-scroll::-webkit-scrollbar-track {
    background: rgba(40, 40, 50, 0.5);
    border-radius: 4px;
}

.theme-scroll::-webkit-scrollbar-thumb {
    background: rgba(160, 32, 240, 0.5);
    border-radius: 4px;
}

.theme-thumb {
    min-width: 80px;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.theme-thumb:hover {
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    transform: scale(1.05);
}

/* Info Button */
.info-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(20, 20, 30, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #00ffff;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.info-btn:hover {
    background: rgba(160, 32, 240, 0.3);
    box-shadow: 0 0 20px rgba(160, 32, 240, 0.5);
    transform: scale(1.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(20, 20, 30, 0.95);
    margin: 10% auto;
    padding: 30px;
    border: 1px solid rgba(160, 32, 240, 0.5);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    color: #00ffff;
    margin-bottom: 20px;
    font-family: 'Orbitron', sans-serif;
}

.modal-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #ccc;
}

.modal-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
    color: #ccc;
}

.modal-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.made-by {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 13px;
}

.made-by a {
    color: #00ffff;
    text-decoration: none;
    font-weight: 600;
}

.made-by a:hover {
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #00ffff;
}

/* Loading */
.loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 30, 0.95);
    padding: 20px 40px;
    border-radius: 12px;
    border: 1px solid rgba(160, 32, 240, 0.5);
    color: #00ffff;
    font-size: 16px;
    z-index: 999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(40, 40, 50, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(160, 32, 240, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(160, 32, 240, 0.7);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #control-panel {
        width: 90%;
        left: 5%;
        right: auto;
        top: auto;
        bottom: 120px;
        max-height: 60vh;
    }
    
    .gallery-panel {
        width: 90%;
        bottom: 10px;
    }
    
    .info-btn {
        bottom: 10px;
        left: 10px;
    }
}