/* Global Styles */
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    color: #ffffff;
    background-color: #121212;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

h1 {
    font-size: 2rem;
    margin: 0.5em 0;
    color: #ff5722;
    text-align: center;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    box-sizing: border-box;
}

header {
    margin-bottom: 20px;
}

/* Main Layout */
main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 800px;
}

.controls {
    background-color: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.7);
}

.control-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

label {
    font-size: 1rem;
    margin-bottom: 5px;
}

input[type="range"], input[type="color"] {
    width: 100%;
    height: 30px; /* Ensure consistent height for inputs */
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: #555;
    height: 6px;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    margin-top: 5px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ff5722;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ff5722;
    cursor: pointer;
}

input[type="color"] {
    border: none;
    border-radius: 5px;
    cursor: pointer;
    outline: none;
    transition: background-color 0.3s;
}

input[type="color"]:hover {
    background-color: #202020; /* Subtle hover effect */
}

button {
    background-color: #ff5722;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    margin-right: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #e64a19;
}

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

.buttons {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

#pattern-canvas {
    display: block;
    border: 2px solid #ff5722;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.7);
    background-color: #000000;
    margin-top: 20px;
    transition: border-color 0.3s; /* Smooth border transition */
}

#pattern-canvas:hover {
    border-color: #ff9800; /* Hover effect for visual feedback */
}

/* Responsive Design */
@media (max-width: 768px) {
    .controls {
        padding: 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    button {
        font-size: 0.9rem;
        padding: 8px 16px;
    }

    .buttons {
        flex-direction: column;
    }

    button {
        margin-right: 0;
        margin-bottom: 10px;
    }
}