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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

header {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1.5rem 0;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1rem;
    font-style: italic;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

#controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 500px;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease-in-out;
}

#controls:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#controls h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #555;
}

label {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: block;
}

input[type="range"], select, input[type="color"] {
    width: 100%;
    margin-bottom: 1.5rem;
    padding: 0.3rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    transition: border 0.2s ease-in-out;
}

input[type="range"], input[type="color"], select:hover {
    border-color: #007bff;
}

button {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

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

#recursion-depth-value {
    font-weight: bold;
    color: #007bff;
}

#canvas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.2s ease-in-out;
}

#canvas-container:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

canvas {
    display: block;
    border: 1px solid #333;
    background: #eaeaea;
    max-width: 100%;
    height: auto;
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: #333;
    color: #fff;
    margin-top: 2rem;
}

footer p {
    font-size: 0.9rem;
}

:focus {
    outline: 2px dashed #007bff;
    outline-offset: 2px;
}
