* {
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #007ced 0%, #005bb5 100%);
    font-family: Arial, sans-serif;
    min-height: 100vh;
    margin: 0;
}

h1 {
    color: #007ced;
    font-style: italic;
    margin-bottom: 24px;
    font-size: 1.5rem;
    text-align: center;
}

h1 i {
    margin-right: 8px;
}

.container {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    max-width: 920px;
    width: 100%;
    flex-wrap: wrap;
}

.controls {
    flex: 1;
    min-width: 260px;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.input-group label i {
    color: #007ced;
    margin-right: 6px;
    width: 16px;
    text-align: center;
}

.input-group input[type="text"],
.input-group input[type="number"],
.input-group select {
    padding: 10px 12px;
    font-size: 15px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    color: #333;
}

.input-group input[type="text"]:focus,
.input-group input[type="number"]:focus,
.input-group select:focus {
    border-color: #007ced;
    box-shadow: 0 0 0 3px rgba(0, 124, 237, 0.15);
}

.input-group input[type="color"] {
    padding: 4px;
    height: 46px;
    width: 100%;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.input-group input[type="color"]:hover {
    border-color: #007ced;
}

.size-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f7ff;
    border: 1px solid #c8e0ff;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    color: #007ced;
    font-size: 14px;
    font-weight: bold;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    background-color: #007ced;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0, 124, 237, 0.35);
}

.btn:hover {
    background-color: #005bb5;
    box-shadow: 0 6px 18px rgba(0, 91, 181, 0.4);
}

.btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 6px rgba(0, 124, 237, 0.3);
}

.preview-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 200px;
}

.canvas-label {
    font-size: 14px;
    color: #666;
    font-weight: bold;
}

.canvas-label i {
    color: #007ced;
    margin-right: 6px;
}

#canvas {
    border: 2px dashed #c8e0ff;
    border-radius: 10px;
    max-width: 100%;
    max-height: 68vh;
    display: block;
    background-color: transparent;
}

@media (max-width: 640px) {
    .container {
        flex-direction: column;
        align-items: center;
        padding: 20px;
        gap: 20px;
    }

    .controls {
        width: 100%;
    }

    .preview-area {
        width: 100%;
    }

    #canvas {
        max-height: 60vw;
    }
}
