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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 28px;
}

#canvas {
    display: block;
    margin: 0 auto 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
    max-width: 100%;
    height: auto;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.control-group label {
    font-weight: 600;
    color: #555;
    min-width: 140px;
}

.control-group select,
.control-group input[type="range"] {
    flex: 1;
    min-width: 150px;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.control-group input[type="range"] {
    cursor: pointer;
}

.control-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

#shapeCountValue {
    font-weight: bold;
    color: #667eea;
    min-width: 30px;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

button {
    flex: 1;
    min-width: 150px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#generateBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#generateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#downloadBtn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

#downloadBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

#clearBtn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

#clearBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 22px;
    }

    #canvas {
        width: 100%;
        height: auto;
    }

    .control-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .control-group label {
        min-width: auto;
    }

    button {
        min-width: 100%;
    }
}
