/* General styles */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, var(--background-gradient-start), var(--background-gradient-end));
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

header {
    text-align: center;
    margin: 20px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

h1 {
    font-size: 2.5rem;
    color: var(--header-color);
}

main {
    width: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

/* Controls section */
#controls {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--controls-background);
    border-radius: 20px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 800px;
}

.control-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.control-group label {
    flex: 1;
    font-size: 1.1rem;
    margin-right: 10px;
}

.control-group input[type="range"] {
    flex: 2;
    accent-color: var(--slider-color);
}

.control-group span {
    flex: 1;
    text-align: right;
    font-weight: bold;
    color: var(--value-display-color);
}

.control-group select {
    flex: 2;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-background);
    color: var(--text-color);
}

/* Buttons */
.control-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.control-buttons button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: var(--button-background);
    color: var(--button-text-color);
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease-in-out;
}

.control-buttons button:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
}

/* Canvas */
#canvas-wrapper {
    width: 100%;
    max-width: 800px;
    background: var(--canvas-background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

#art-canvas {
    width: 100%;
    height: 500px;
    display: block;
    border: none;
    transition: box-shadow 0.3s ease-in-out;
}

#art-canvas:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Footer */
footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--footer-color);
}

/* Custom properties for light and dark themes */
:root {
    --background-gradient-start: #f9f9f9;
    --background-gradient-end: #e0e0e0;
    --text-color: #333;
    --header-color: #000;
    --controls-background: #ffffff;
    --button-background: #007BFF;
    --button-text-color: #ffffff;
    --button-hover: #0056B3;
    --slider-color: #007BFF;
    --value-display-color: #444;
    --border-color: #ccc;
    --input-background: #f3f3f3;
    --canvas-background: #f4f4f4;
    --footer-color: #555;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background-gradient-start: #121212;
        --background-gradient-end: #1a1a1a;
        --text-color: #eaeaea;
        --header-color: #ffffff;
        --controls-background: #1e1e1e;
        --button-background: #1f73b7;
        --button-text-color: #ffffff;
        --button-hover: #185a9d;
        --slider-color: #1f73b7;
        --value-display-color: #aaaaaa;
        --border-color: #444;
        --input-background: #333;
        --canvas-background: #1a1a1a;
        --footer-color: #a9a9a9;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    #controls {
        width: 100%;
    }

    .control-buttons {
        flex-direction: column;
        gap: 10px;
    }

    #art-canvas {
        height: 300px;
    }
}