/* Define global styles */
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    color: #ffffff;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #f0f8ff;
    margin-bottom: 10px;
}

header p {
    font-size: 1rem;
    color: #d7e3fc;
    margin: 0;
}

main {
    width: 100%;
    max-width: 960px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#controls {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-sizing: border-box;
}

label {
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 2px solid #cccccc;
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: #6c63ff;
    outline: none;
}

input[type="range"] {
    width: 100%;
    margin-top: 5px;
    appearance: none;
    height: 10px;
    background: #555555;
    border-radius: 5px;
    outline: none;
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background 0.3s;
}

input[type="range"]:hover::-webkit-slider-thumb {
    background: #d7e3fc;
}

button {
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

button:active {
    transform: scale(0.95);
}

button#generate {
    background-color: #6c63ff;
    color: #ffffff;
}

button#generate:hover,
button#generate:focus {
    background-color: #524ecc;
    transform: scale(1.05);
    outline: none;
}

button#reset {
    background-color: #ff6f61;
    color: #ffffff;
}

button#reset:hover,
button#reset:focus {
    background-color: #cc574d;
    transform: scale(1.05);
    outline: none;
}

#canvas-container {
    width: 100%;
    background-color: #000;
    border: 3px solid #f0f8ff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

canvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #d7e3fc;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation-duration: 0.01ms !important;
    }
}