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

body {
    font-family: 'Padauk', 'Noto Sans Myanmar', 'Myanmar Text', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0px;
}

.main-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.left-panel, .right-panel {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 30px;
    height: fit-content;
}

.left-panel {
    position: sticky;
    top: 20px;
}

.left-panel h1 {
    font-size: 1.8em;
    margin-bottom: 5px;
    text-align: center;
    color: #333;
}

.left-panel .subtitle {
    font-size: 0.95em;
    margin-bottom: 20px;
    text-align: center;
    color: #666;
}

.right-panel {
    position: sticky;
    top: 20px;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.2em;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
    font-size: 0.95em;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 12px;
}

.settings-section-wrapper {
    margin-top: 20px;
    border-top: 2px solid #f0f0f0;
    padding-top: 20px;
}

.settings-section-toggle {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.settings-section-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.settings-section-toggle .toggle-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-section-toggle .toggle-arrow {
    font-size: 12px;
    transition: transform 0.3s;
}

.settings-content {
    display: none;
    margin-top: 15px;
    animation: fadeIn 0.3s ease;
}

.unified-settings {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    overflow-y: auto;
}

.unified-settings .form-group {
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e8e8e8;
}

.unified-settings .form-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.checkbox-row {
    display: flex;
}

.checkbox-row label {
    margin-bottom: 0;
}

.padding-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.padding-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.padding-label {
    font-size: 11px;
    color: #777;
    text-align: center;
    font-weight: 500;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 0.95em;
}

textarea,
input[type="number"],
select {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, 'Myanmar3';
}

input[type="number"]::placeholder {
    color: #999;
    font-size: 12px;
}

textarea {
    resize: vertical;
    min-height: auto;
    padding: 10px 12px;
    font-size: 18px;
}

textarea:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[type="color"] {
    width: 100%;
    height: 38px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s;
    padding: 3px;
}

input[type="color"]:hover {
    border-color: #667eea;
}

input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.form-group label input[type="checkbox"] {
    margin-right: 6px;
}

.form-group label:has(input[type="checkbox"]) {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 5px;
}

.align-buttons {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.align-btn {
    padding: 8px 12px;
    border: 1.5px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
}

.align-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.align-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.align-btn svg {
    display: block;
}

select {
    cursor: pointer;
    background-color: white;
}

.btn-generate {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 8px;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-generate:active {
    transform: translateY(0);
}



canvas {
    border: 1px solid #ddd;
    border-radius: 10px;
    margin: 20px auto;
    display: block;
    max-width: 100%;
    height: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.canvas-wrapper {
    background: #f9f9f9;
    padding: 0px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.image-container {
    padding: 0px;
}

.image-container:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.image-container h3 {
    text-align: center;
    color: #555;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

.result {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.result h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.download-section {
    text-align: center;
    margin-top: 20px;
}

.download-all-wrapper {
    text-align: center;
    margin-bottom: 15px;
}

.btn-download {
    display: inline-block;
    padding: 12px 30px;
    background: #4caf50;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.btn-download:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    
    .right-panel {
        position: static;
    }

    .left-panel {
        position: static;
        top: auto;
    }
}

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

    h1 {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    .form-row {
        flex-direction: column;
    }

    .form-row .form-group {
        width: 100%;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: fadeIn 0.5s ease-out;
}
