@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
    font-family: 'Press Start 2P', monospace;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #eee;
    min-height: 100vh;
    overflow-x: hidden;
}

.header {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid #ff1493;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.3);
}

.header h1 {
    font-size: 24px;
    color: #ff1493;
    text-shadow: 0 0 10px rgba(255, 20, 147, 0.5);
    margin-bottom: 10px;
}

.header p {
    font-size: 12px;
    color: #4169e1;
    text-shadow: 0 0 10px rgba(65, 105, 225, 0.5);
}

.main-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 200px);
}

#scene-container {
    flex: 3;
    border: 2px solid #333;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.2);
    background: #000;
}

.control-panel {
    flex: 1;
    max-width: 300px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #333;
    border-radius: 10px;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.control-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.control-section:last-child {
    border-bottom: none;
}

.control-section h3 {
    color: #ffe135;
    font-size: 12px;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 225, 53, 0.5);
}

.control-btn {
    width: 100%;
    padding: 12px;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    background: linear-gradient(45deg, #333, #555);
    color: white;
    border: 2px solid #666;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.control-btn:hover {
    background: linear-gradient(45deg, #555, #777);
    border-color: #ff1493;
    box-shadow: 0 0 15px rgba(255, 20, 147, 0.3);
    transform: translateY(-2px);
}

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

.control-btn.rainbow {
    background: linear-gradient(45deg, #ff6b35, #f7931e, #ffd23f, #06ffa5, #4dabf7, #5c7cfa, #f06292);
    background-size: 400% 400%;
    animation: rainbow 2s ease infinite;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.slider-container {
    margin: 15px 0;
}

.slider-container label {
    display: block;
    font-size: 8px;
    color: #ccc;
    margin-bottom: 8px;
}

.slider-container input[type="range"] {
    width: 100%;
    height: 20px;
    background: #333;
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ff1493;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 20, 147, 0.5);
}

.color-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.color-option span {
    font-size: 8px;
    color: #ccc;
}

.color-option input[type="color"] {
    width: 50px;
    height: 30px;
    border: 2px solid #666;
    border-radius: 5px;
    cursor: pointer;
    background: transparent;
}

.color-option input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 3px;
}

.color-option input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

.footer {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 2px solid #4169e1;
    box-shadow: 0 0 20px rgba(65, 105, 225, 0.3);
}

.footer p {
    font-size: 8px;
    color: #ccc;
    margin: 5px 0;
}

.footer a {
    color: #ff1493;
    text-decoration: none;
    text-shadow: 0 0 10px rgba(255, 20, 147, 0.5);
}

.footer a:hover {
    color: #ffe135;
    text-shadow: 0 0 10px rgba(255, 225, 53, 0.5);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        height: auto;
    }
    
    .control-panel {
        max-width: none;
        order: -1;
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    .header p {
        font-size: 10px;
    }
    
    #scene-container {
        height: 400px;
    }
}

/* Glowing border animation for the scene */
#scene-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff1493, #4169e1, #ffe135, #ff1493);
    background-size: 400% 400%;
    border-radius: 12px;
    z-index: -1;
    animation: borderGlow 4s ease infinite;
    opacity: 0.7;
}

@keyframes borderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}