* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #121212;
    color: #f0f0f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #00ccff;
    font-size: 2.5rem;
}

.generator-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.controls {
    flex: 1;
    min-width: 300px;
    background-color: #1e1e1e;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.control-group {
    margin-bottom: 1.2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #00ccff;
}

input[type="range"], 
input[type="color"], 
select {
    width: 100%;
    padding: 0.5rem;
    border-radius: 5px;
    border: 1px solid #333;
    background-color: #252525;
    color: white;
    margin-bottom: 0.5rem;
}

input[type="color"] {
    height: 40px;
    cursor: pointer;
}

select {
    height: 40px;
    cursor: pointer;
}

button {
    width: 100%;
    padding: 0.8rem;
    margin-top: 1rem;
    background-color: #00ccff;
    color: #000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #00a6cc;
}

button:disabled {
    background-color: #555;
    color: #999;
    cursor: not-allowed;
}

.preview {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    height: 400px;
    background-color: #1e1e1e;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#diamond-canvas {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

footer {
    margin-top: auto;
    text-align: center;
    padding: 1rem;
    color: #999;
}

.loading-spinner {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 30, 30, 0.8);
    border-radius: 10px;
    z-index: 10;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 204, 255, 0.2);
    border-top-color: #00ccff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .generator-container {
        flex-direction: column;
    }
    
    .controls, .preview {
        min-width: 100%;
    }
}
