/* Code Genesis Cube 🍓 - Futuristic Dark Theme */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;700&family=Orbitron:wght@400;700;900&display=swap');

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

body {
    font-family: 'Fira Code', 'Courier New', monospace;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

#container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    z-index: 10;
}

.title {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    color: #00ffff;
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 40px #00ffff;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.2rem;
    color: #20b2aa;
    opacity: 0.8;
    font-weight: 300;
}

/* Input Section */
.input-section {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.prompt-input {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #333;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 1rem;
    color: #ffffff;
    font-family: 'Fira Code', monospace;
    min-width: 300px;
    max-width: 500px;
    transition: all 0.3s ease;
    outline: none;
}

.prompt-input:focus {
    border-color: #00ffff;
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 0.3),
        inset 0 0 10px rgba(0, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.9);
}

.prompt-input::placeholder {
    color: #666;
    font-style: italic;
}

.generate-btn {
    background: linear-gradient(45deg, #ff1493, #ff6b9d);
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 1rem;
    color: white;
    font-family: 'Fira Code', monospace;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.generate-btn:hover:not(:disabled) {
    background: linear-gradient(45deg, #00ffff, #20b2aa);
    color: #000;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.6),
        0 5px 15px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    animation: pulse 2s infinite;
}

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

/* 3D Scene Container */
.scene-container {
    width: 100%;
    max-width: 800px;
    height: 500px;
    border: 2px solid #00ffff;
    border-radius: 15px;
    background: radial-gradient(circle at center, rgba(0, 255, 255, 0.05), rgba(0, 0, 0, 0.9));
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 0 30px rgba(0, 255, 255, 0.1);
}

.scene-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 20, 147, 0.1), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 255, 255, 0.1), transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.scene-container canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
}

/* Controls */
.controls {
    margin: 20px 0;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.control-label {
    color: #20b2aa;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.speed-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 150px;
    height: 6px;
    border-radius: 3px;
    background: #333;
    outline: none;
    transition: all 0.3s ease;
}

.speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00ffff;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.speed-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    transform: scale(1.1);
}

.speed-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00ffff;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Download Section */
.download-section {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    transition: all 0.3s ease;
}

.download-section.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.download-btn, .generate-again-btn {
    background: linear-gradient(45deg, #00ffff, #20b2aa);
    border: none;
    border-radius: 10px;
    padding: 12px 25px;
    font-size: 0.9rem;
    color: #000;
    font-family: 'Fira Code', monospace;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.download-btn:hover, .generate-again-btn:hover {
    background: linear-gradient(45deg, #ff1493, #ff6b9d);
    color: white;
    box-shadow: 
        0 0 15px rgba(255, 20, 147, 0.6),
        0 3px 10px rgba(255, 20, 147, 0.3);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.footer a {
    color: #00ffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: #ff1493;
    text-shadow: 0 0 5px #ff1493;
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .input-section {
        flex-direction: column;
        width: 100%;
    }
    
    .prompt-input {
        min-width: 250px;
        width: 100%;
        max-width: 100%;
    }
    
    .scene-container {
        height: 400px;
    }
    
    .controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .download-section {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .scene-container {
        height: 300px;
    }
    
    .prompt-input {
        min-width: 200px;
        padding: 12px 15px;
    }
    
    .generate-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* Glowing particles effect (optional enhancement) */
.scene-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="%2300ffff" opacity="0.3"><animate attributeName="opacity" values="0.3;1;0.3" dur="3s" repeatCount="indefinite"/></circle><circle cx="80" cy="30" r="0.5" fill="%23ff1493" opacity="0.5"><animate attributeName="opacity" values="0.5;1;0.5" dur="2s" repeatCount="indefinite"/></circle><circle cx="30" cy="70" r="0.8" fill="%2300ffff" opacity="0.4"><animate attributeName="opacity" values="0.4;1;0.4" dur="4s" repeatCount="indefinite"/></circle><circle cx="70" cy="80" r="0.6" fill="%23ff1493" opacity="0.3"><animate attributeName="opacity" values="0.3;1;0.3" dur="3.5s" repeatCount="indefinite"/></circle></svg>') repeat;
    background-size: 200px 200px;
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
    animation: floatParticles 20s linear infinite;
}

@keyframes floatParticles {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-200px, -200px); }
}