.photo-editor {
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f5f5f5;
    font-family: Arial, sans-serif;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.editor-header {
    background: #2c3e50;
    color: white;
    padding: 10px 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-header h3 {
    margin: 0;
    font-size: 16px;
}

.header-controls {
    display: flex;
    gap: 10px;
}

.header-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.header-btn:hover {
    background: #2980b9;
}

.editor-body {
    display: flex;
    height: 600px;
}

.tools-panel {
    width: 60px; /* Еще уже для компактных кнопок */
    background: white;
    border-right: 1px solid #ddd;
    padding: 10px 5px;
    overflow-y: auto;
}

.canvas-container {
    flex: 1;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#editor-canvas {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 100%;
    max-height: 100%;
    cursor: crosshair;
}

.canvas-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 16px;
    text-align: center;
    padding: 20px;
    border: 2px dashed #dee2e6;
    margin: 10px;
}

.properties-panel {
    width: 250px;
    background: white;
    border-left: 1px solid #ddd;
    padding: 10px;
    overflow-y: auto;
}

.editor-footer {
    background: white;
    border-top: 1px solid #ddd;
    padding: 5px 15px;
    border-radius: 0 0 8px 8px;
    font-size: 12px;
    color: #666;
}

.editor-panel {
    margin-bottom: 15px;
}

.panel-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.panel-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Стили для кнопок инструментов */
.tool-btn {
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 2px auto;
    position: relative;
}

.tool-btn:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.tool-btn.active {
    background: #3498db;
    color: white;
    transform: scale(1.05);
}

.tool-btn.active:hover {
    background: #2980b9;
}

/* Всплывающие подсказки */
.tool-btn::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
    margin-left: 5px;
}

.tool-btn:hover::after {
    opacity: 1;
}

/* Стили для слайдеров */
.slider-container {
    margin: 5px 0;
}

.slider-container label {
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
    color: #333;
    font-weight: 500;
}

.editor-slider {
    width: 100%;
    margin: 5px 0;
    height: 4px;
    border-radius: 2px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.editor-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}

.editor-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: none;
}

/* Стили для выбора цвета */
.color-picker-container {
    margin: 5px 0;
}

.color-picker-container label {
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
    color: #333;
    font-weight: 500;
}

.color-picker {
    width: 100%;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

/* Информация о инструменте */
.tool-info {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.tool-info p {
    margin: 0;
}

.panel-loading {
    color: #7f8c8d;
    font-style: italic;
    font-size: 12px;
    text-align: center;
    padding: 10px;
}

/* Убираем стандартные стили кнопок */
button {
    border: none;
    outline: none;
}

button:focus {
    outline: none;
}
/* Стили для кнопок зума */
.zoom-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    padding: 8px;
    flex: 1;
    transition: all 0.2s;
}

.zoom-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.zoom-btn:active {
    background: #dee2e6;
}

.zoom-info {
    background: #e3f2fd;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.zoom-controls {
    margin-bottom: 15px;
}

.zoom-tips {
    background: #fff3cd;
    padding: 8px;
    border-radius: 4px;
    border-left: 4px solid #ffc107;
}

.zoom-tips p {
    margin: 2px 0;
}
/* Стили для верхнего тулбара */
.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.file-menu {
    position: relative;
    display: inline-block;
}

.file-menu-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.file-menu-btn:hover {
    background: rgba(255,255,255,0.2);
}

.file-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 1000;
}

.file-dropdown.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 10px 15px;
    text-align: left;
    cursor: pointer;
    font-size: 12px;
    color: #333;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.header-right {
    display: flex;
    align-items: center;
}

.top-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Стили для контролов зума в верхней панели */
.zoom-controls-top {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.1);
    padding: 5px 10px;
    border-radius: 4px;
}

.zoom-display {
    color: white;
    font-size: 12px;
    min-width: 40px;
    text-align: center;
}

.top-tool-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 5px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.top-tool-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Стили для кисти */
/* Стили для кисти */
.brush-info {
    background: #e8f5e8;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 15px;
    border-left: 4px solid #4caf50;
}

.brush-presets {
    margin: 15px 0;
}

.brush-preset-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.brush-preset-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.brush-preset-btn.active {
    background: #3498db;
    border-color: #2980b9;
    color: white;
}

.brush-tips {
    background: #fff3cd;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #ffc107;
}

.brush-tips p {
    margin: 3px 0;
    line-height: 1.3;
}

/* Улучшаем стили слайдеров */
.slider-container {
    margin: 10px 0;
}

.slider-container label {
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
    color: #333;
    font-weight: 500;
}

.editor-slider {
    width: 100%;
    margin: 5px 0;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.editor-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.editor-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Стили для выбора цвета */
.color-picker-container {
    margin: 15px 0;
}

.color-picker-container label {
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
    color: #333;
    font-weight: 500;
}

.color-picker {
    width: 100%;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.color-picker:hover {
    border-color: #3498db;
}

.color-picker:focus {
    border-color: #3498db;
    outline: none;
}
/* Стили для верхнего меню */
.editor-header {
    background: #2c3e50;
    color: white;
    padding: 0;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 50px;
}

.menu-bar {
    display: flex;
    align-items: center;
    height: 100%;
}

.menu-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.menu-title {
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.2s;
    height: 100%;
    display: flex;
    align-items: center;
}

.menu-title:hover {
    background: #34495e;
}

.menu-item.active .menu-title {
    background: #3498db;
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: none;
    z-index: 1000;
}

.menu-item.active .menu-dropdown {
    display: block;
}

.menu-option {
    padding: 10px 15px;
    cursor: pointer;
    color: #333;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.menu-option:hover {
    background: #f8f9fa;
}

.menu-option:last-child {
    border-bottom: none;
}

.menu-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 5px 0;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
}

.header-title h3 {
    margin: 0;
    font-size: 16px;
}

.document-status {
    font-size: 12px;
    opacity: 0.8;
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Стили для плейсхолдера */
.canvas-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    text-align: center;
    padding: 40px;
}

.placeholder-content {
    max-width: 400px;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.placeholder-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.placeholder-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.placeholder-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.placeholder-btn:hover {
    background: #2980b9;
}

.placeholder-tips {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.5;
}

.placeholder-tips p {
    margin: 5px 0;
}

/* Стили для нижней панели */
.editor-footer {
    background: white;
    border-top: 1px solid #ddd;
    padding: 5px 15px;
    border-radius: 0 0 8px 8px;
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.document-info {
    font-size: 11px;
    color: #999;
}
/* Стили для границ холста */
.canvas-container {
    position: relative;
    flex: 1;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#editor-canvas {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 100%;
    max-height: 100%;
    cursor: crosshair;
}

.canvas-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    border: 2px dashed #3498db;
    display: none;
}

.canvas-border.visible {
    display: block;
}

/* Остальные стили остаются без изменений */
.editor-header {
    background: #2c3e50;
    color: white;
    padding: 0;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 50px;
}

.menu-bar {
    display: flex;
    align-items: center;
    height: 100%;
}

.menu-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.menu-title {
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.2s;
    height: 100%;
    display: flex;
    align-items: center;
}

.menu-title:hover {
    background: #34495e;
}

.menu-item.active .menu-title {
    background: #3498db;
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: none;
    z-index: 1000;
}

.menu-item.active .menu-dropdown {
    display: block;
}

.menu-option {
    padding: 10px 15px;
    cursor: pointer;
    color: #333;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.menu-option:hover {
    background: #f8f9fa;
}

.menu-option:last-child {
    border-bottom: none;
}

.menu-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 5px 0;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
}

.header-title h3 {
    margin: 0;
    font-size: 16px;
}

.document-status {
    font-size: 12px;
    opacity: 0.8;
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.canvas-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    text-align: center;
    padding: 40px;
}

.placeholder-content {
    max-width: 400px;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.placeholder-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.placeholder-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.placeholder-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.placeholder-btn:hover {
    background: #2980b9;
}

.placeholder-tips {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.5;
}

.placeholder-tips p {
    margin: 5px 0;
}

.editor-footer {
    background: white;
    border-top: 1px solid #ddd;
    padding: 5px 15px;
    border-radius: 0 0 8px 8px;
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.document-info {
    font-size: 11px;
    color: #999;
}
/* Стили для контейнера canvas */
.canvas-container {
    position: relative;
    flex: 1;
    background: 
        repeating-linear-gradient(45deg, #f0f0f0 0px, #f0f0f0 10px, #e0e0e0 10px, #e0e0e0 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 20px;
}

.canvas-wrapper {
    display: inline-block;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    border-radius: 4px;
    overflow: hidden;
    background: white;
}

#editor-canvas {
    display: block;
    cursor: crosshair;
    background: white;
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-dialog {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    min-width: 400px;
    max-width: 90vw;
	max-height:400px;
	overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e74c3c;
}

.modal-content {
    padding: 20px;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.setting-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.setting-color {
    width: 100%;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.setting-checkbox {
    margin-right: 8px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Остальные стили остаются */
.editor-header {
    background: #2c3e50;
    color: white;
    padding: 0;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 50px;
}

.menu-bar {
    display: flex;
    align-items: center;
    height: 100%;
}

.menu-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.menu-title {
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.2s;
    height: 100%;
    display: flex;
    align-items: center;
}

.menu-title:hover {
    background: #34495e;
}

.menu-item.active .menu-title {
    background: #3498db;
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: none;
    z-index: 1000;
}

.menu-item.active .menu-dropdown {
    display: block;
}

.menu-option {
    padding: 10px 15px;
    cursor: pointer;
    color: #333;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.menu-option:hover {
    background: #f8f9fa;
}

.menu-option:last-child {
    border-bottom: none;
}

.menu-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 5px 0;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
}

.header-title h3 {
    margin: 0;
    font-size: 16px;
}

.document-status {
    font-size: 12px;
    opacity: 0.8;
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.canvas-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    text-align: center;
    padding: 40px;
}

.placeholder-content {
    max-width: 400px;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.placeholder-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.placeholder-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.placeholder-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.placeholder-btn:hover {
    background: #2980b9;
}

.placeholder-tips {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.5;
}

.placeholder-tips p {
    margin: 5px 0;
}

.editor-footer {
    background: white;
    border-top: 1px solid #ddd;
    padding: 5px 15px;
    border-radius: 0 0 8px 8px;
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.document-info {
    font-size: 11px;
    color: #999;
}
/* Обновляем стили canvas-container */
.canvas-container {
    position: relative;
    flex: 1;
    background: 
        repeating-linear-gradient(45deg, #f0f0f0 0px, #f0f0f0 10px, #e0e0e0 10px, #e0e0e0 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 20px;
}

.canvas-wrapper {
    display: inline-block;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    border-radius: 4px;
    overflow: hidden;
    background: white;
    /* Добавляем трансформацию для масштабирования */
    transform-origin: 0 0;
}

#editor-canvas {
    display: block;
    cursor: crosshair;
    background: white;
}
/* Стили для слоев */
.layers-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 15px;
}

.layer-item {
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.layer-item:hover {
    background: #f8f9fa;
}

.layer-item.active {
    background: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.layer-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.layer-visibility {
    cursor: pointer;
}

.layer-name {
    flex: 1;
    font-size: 12px;
    font-weight: 500;
}

.layer-type {
    font-size: 12px;
    opacity: 0.7;
}

.active-layer-panel {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.layer-btn {
    background: #4caf50;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    width: 100%;
    margin-bottom: 10px;
}

.layer-btn:hover {
    background: #45a049;
}

.layer-control-btn {
    background: #ff9800;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    flex: 1;
}

.layer-control-btn:hover {
    background: #f57c00;
}
/* Стили для слоев */
.layer-actions {
    display: flex;
    gap: 2px;
}

.layer-up, .layer-down {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 10px;
    padding: 2px;
    opacity: 0.6;
}

.layer-up:hover, .layer-down:hover {
    opacity: 1;
}

/* Стили для трансформации */
.transform-info {
    background: #e8f4f8;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* Стили для панели слоев */
.layers-list {
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.layer-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.layer-item:hover {
    background-color: #f5f5f5;
}

.layer-item.active {
    background-color: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.layer-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.layer-visibility {
    cursor: pointer;
    padding: 2px;
}

.layer-name {
    flex: 1;
    font-size: 12px;
    font-weight: 500;
}

.layer-type {
    font-size: 12px;
    opacity: 0.7;
}

.layer-actions {
    display: flex;
    gap: 2px;
}

.layer-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 2px;
    font-size: 10px;
}

.layer-actions button:hover {
    background-color: #e0e0e0;
}

.layer-btn {
    width: 100%;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.layer-btn:hover {
    background-color: #e9ecef;
}

.layer-control-btn {
    flex: 1;
    padding: 6px;
    font-size: 11px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
}

.layer-control-btn:hover {
    background-color: #e9ecef;
}

.active-layer-panel {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.empty-layers-message {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

/* Стили для слоя рисования */
.layer-type.drawing { background-color: #e8f5e8; }
.layer-type.drawing::before { content: '✏️'; }

/* Стили для кисти */
.brush-presets {
    margin: 10px 0;
}

.brush-preset-btn {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.brush-preset-btn:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.brush-preset-btn.active {
    border-color: #3498db;
    background: #3498db;
    color: white;
}
/* Стили для лоадера и уведомлений */
.ai-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.loader-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ai-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    z-index: 10000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
    max-width: 300px;
}

.ai-notification.error {
    background: #f44336;
}

.ai-notification.warning {
    background: #ff9800;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Прогресс бар для длительных операций */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #4CAF50;
    width: 0%;
    transition: width 0.3s ease;
    animation: progressPulse 2s infinite;
}

@keyframes progressPulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Шаблон для прозрачного фона */
.canvas-container {
    background-image: 
        linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
        linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    border-radius: 4px;
}

/* Когда фон прозрачный, показываем шаблон */
.canvas-wrapper {
    background: transparent;
}
/* Стили для модуля фильтров */
.filters-controls {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.filters-controls::-webkit-scrollbar {
    width: 4px;
}

.filters-controls::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.filters-controls::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.filters-controls::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.filter-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.filter-btn:active {
    background: #dee2e6;
}

/* Предустановленные фильтры */
.filter-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 15px 0;
}

.filter-preset-btn {
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 11px;
    text-align: center;
    transition: all 0.2s;
}

.filter-preset-btn:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.filter-preset-btn.active {
    border-color: #3498db;
    background: #3498db;
    color: white;
}