 /* Ruler Container */
 .ruler-container {
     background: white;
     border-radius: 8px;
     overflow: auto;
     display: inline-block;
     position: unset;
     width: 100%;
     height: 100%;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .canvas-wrapper {
     display: inline-block;
     position: relative;
     margin-left: 0px;
     margin-top: 50px;
 }

 /* Rulers */
 .ruler-top {
     position: absolute;
     top: -40px;
     left: 0;
     right: 0;
     height: 40px;
     border-bottom: 2px solid #333;
 }

 .slides .slide.active {
     display: block;
 }

 .ruler-left {
     position: absolute;
     left: -40px;
     top: 0;
     bottom: 0;
     width: 40px;
     border-right: 2px solid #333;
 }

 .unit-label {
     position: absolute;
     font-size: 11px;
     font-weight: 700;
     color: #333;
     background: transparent;
     padding: 2px 4px;
     border-radius: 3px;
 }

 .ruler-top .unit-label {
     top: 2px;
     left: -55px;
 }

 .ruler-left .unit-label {
     left: 2px;
     top: -45px;
     writing-mode: vertical-lr;
     transform: rotate(180deg);
 }

 /* Ruler Marks */
 .ruler-mark {
     position: absolute;
     background: #333;
 }

 .ruler-top .ruler-mark {
     bottom: 0;
     width: 1px;
 }

 .ruler-top .ruler-mark.major {
     height: 20px;
     width: 2px;
 }

 .ruler-top .ruler-mark.medium {
     height: 12px;
 }

 .ruler-top .ruler-mark.minor {
     height: 8px;
     background: #666;
 }

 .ruler-left .ruler-mark {
     right: 0;
     height: 1px;
 }

 .ruler-left .ruler-mark.major {
     width: 20px;
     height: 2px;
 }

 .ruler-left .ruler-mark.medium {
     width: 12px;
 }

 .ruler-left .ruler-mark.minor {
     width: 8px;
     background: #666;
 }

 /* Ruler Labels */
 .ruler-label {
     position: absolute;
     font-size: 12px;
     font-weight: 600;
     color: #333;
     user-select: none;
 }

 .ruler-top .ruler-label {
     top: 4px;
     transform: translateX(-50%);
 }

 .ruler-left .ruler-label {
     right: 22px;
     transform: translateY(-50%);
 }

 /* Canvas */
 #imageCanvas {
     display: block;
     background: #fff;
 }


 /* Preview Modal */
 .preview-modal {
     display: none;
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background: rgba(0, 0, 0, 0.9);
     z-index: 10000;
     justify-content: center;
     align-items: center;
 }

 .preview-modal.active {
     display: flex;
 }

 .preview-content {
     position: relative;
     max-width: 90%;
     max-height: 90%;
     display: flex;
     flex-direction: column;
     align-items: center;
 }

 .preview-canvas-wrapper {
     position: relative;
     overflow: hidden;
     max-width: 100%;
     max-height: 80vh;
     background: #fff;
     border-radius: 8px;
 }

 .preview-canvas {
     display: block;
     transform-origin: center;
     transition: transform 0.3s ease;
 }

 .preview-controls {
     display: flex;
     gap: 10px;
     margin-top: 20px;
     background: rgba(255, 255, 255, 0.1);
     padding: 12px 20px;
     border-radius: 8px;
 }

 .preview-btn {
     width: 44px;
     height: 44px;
     border: 2px solid white;
     background: transparent;
     color: white;
     border-radius: 8px;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 20px;
     font-weight: 700;
     transition: all 0.3s ease;
 }

 .preview-btn:hover {
     background: white;
     color: #000;
 }

 .preview-close {
     position: absolute;
     top: -50px;
     right: 0;
     width: 44px;
     height: 44px;
     border: 2px solid white;
     background: transparent;
     color: white;
     border-radius: 50%;
     cursor: pointer;
     font-size: 28px;
     display: flex;
     line-height: 43px;
     justify-content: center;
     transition: all 0.3s ease;
 }
 
 .preview-close:hover {
     background: white;
     color: #000; 
 }

 .preview-zoom-info {
     color: white;
     font-size: 14px;
     margin: 0 15px;
     min-width: 60px;
     text-align: center;
     font-weight: 600;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .text-align-buttons {
     display: flex;
     gap: 1rem;
     justify-content: space-between;
     align-items: center;
 }

 .text-align-buttons button {
     display: flex;
     align-items: center;
     justify-content: center;
     height: 42px;
     width: 52px;
     background-color: #ffffff;
     border: #ccc solid 1px;
     border-radius: 5px;
     cursor: pointer;
 }

 .text-align-buttons button svg {
     width: 30px;
     height: 30px;
 }

 .text-align-buttons button.active {
     border-color: var(--primary);
 }

 .text_layer_box {
     display: none;
 }

 .design_tools .main .layer {
     display: none;
 }

 .table-list-it .list-it {
     display: none;
 }

 .table-list-it .list-it.active {
     display: block;
 }

 /* Upload Area Styles */
 .list-it.upload .upload-title {
     font-size: 16px;
     font-weight: 600;
     margin-bottom: 15px;
     color: #333;
 }

 .list-it.upload .upload-area {
     border: 2px dashed #ccc;
     border-radius: 8px;
     padding: 40px 20px;
     text-align: center;
     background: #f9f9f9;
     cursor: pointer;
     transition: all 0.3s ease;
     margin-bottom: 20px;
 }

 .list-it.upload .upload-area:hover,
 .list-it.upload .upload-area.drag-over {
     border-color: var(--primary);
     background: #f0f8ff;
 }

 .list-it.upload .upload-area .img {
     width: 60px;
     height: 60px;
     margin: 0 auto 15px;
     opacity: 0.6;
 }

 .list-it.upload .upload-area p {
     font-size: 14px;
     color: #666;
     margin: 0;
 }

 .list-it.upload .upload-history {
     margin-top: 20px;
 }

 .list-it.upload .upload-history .history-title {
     font-size: 14px;
     font-weight: 600;
     margin-bottom: 12px;
     color: #666;
 }

 .list-it.upload .upload-history .list ul {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
     gap: 12px;
     padding: 0;
     margin: 0;
     list-style: none;
 }

 .list-it.upload .upload-history .list ul li {
     position: relative;
     aspect-ratio: 1;
     border: 2px solid #e0e0e0;
     border-radius: 8px;
     overflow: hidden;
     cursor: pointer;
     transition: all 0.3s ease;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .list-it.upload .upload-history .list ul li:hover {
     border-color: var(--primary);
     transform: translateY(-2px);
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
 }

 .list-it.upload .upload-history .list ul li .img {
     width: 100%;
     height: auto;
 }

 .list-it.upload .upload-history .list ul li .img img {
     width: 100%;
     border-radius: 5px;
     height: auto;
     object-fit: contain;
 }
 
 /* History Checkbox for Multi-select */
 .list-it.upload .upload-history .list ul li .history-checkbox {
     position: absolute;
     top: 8px;
     left: 8px;
     z-index: 10;
 }
 
 .list-it.upload .upload-history .list ul li .history-checkbox input[type="checkbox"] {
     width: 20px;
     height: 20px;
     cursor: pointer;
     accent-color: var(--primary, #007bff);
 }
 
 /* Insert Selected Button */
 .insert-selected-btn {
     margin-bottom: 15px;
     text-align: left;
 }
 
 .insert-selected-btn .btn-insert-selected {
     background-color: var(--primary, #007bff);
     color: white;
     border: none;
     padding: 10px 24px;
     border-radius: 6px;
     font-size: 12px;
     font-weight: 400;
     cursor: pointer;
     transition: all 0.3s ease;
 }
 
 .insert-selected-btn .btn-insert-selected:hover {
     background-color: var(--primary-dark, #0056b3);
     transform: translateY(-1px);
     box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
 }
 
 .insert-selected-btn .btn-insert-selected:active {
     transform: translateY(0);
 }

 /* Loading Placeholder */
 .loading-placeholder {
     position: relative;
     aspect-ratio: 1;
     border: 2px solid #e0e0e0;
     border-radius: 8px;
     overflow: hidden;
     background: #f9f9f9;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .loading-placeholder .img {
     width: 100%;
     height: 100%;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .loading-placeholder .loading-spinner {
     width: 40px;
     height: 40px;
     border: 4px solid #f3f3f3;
     border-top: 4px solid var(--primary);
     border-radius: 50%;
     animation: spin 1s linear infinite;
 }

 /* Loading Item */
 .loading-item {
     opacity: 1;
     transition: opacity 0.3s ease;
 }

 .loading-item .loading-spinner {
     width: 40px;
     height: 40px;
     border: 4px solid #f3f3f3;
     border-top: 4px solid var(--primary);
     border-radius: 50%;
     animation: spin 1s linear infinite;
     margin: 0 auto;
 }

 @keyframes spin {
     0% {
         transform: rotate(0deg);
     }

     100% {
         transform: rotate(360deg);
     }
 }

 .loading-item .loading-text {
     text-align: center;
     font-size: 12px;
     color: #666;
     margin-top: 8px;
 }

 /* Upload Notification */
 .upload-notification {
     position: fixed;
     top: 20px;
     right: 20px;
     padding: 12px 20px;
     border-radius: 6px;
     background: #fff;
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
     z-index: 10001;
     font-size: 14px;
     animation: slideIn 0.3s ease;
 }

 .upload-notification.fade-out {
     animation: slideOut 0.3s ease;
 }

 .upload-notification-success {
     border-left: 4px solid #4caf50;
     color: #4caf50;
 }

 .upload-notification-error {
     border-left: 4px solid #f44336;
     color: #f44336;
 }

 .upload-notification-info {
     border-left: 4px solid #2196f3;
     color: #2196f3;
 }

 @keyframes slideIn {
     from {
         transform: translateX(400px);
         opacity: 0;
     }

     to {
         transform: translateX(0);
         opacity: 1;
     }
 }

 @keyframes slideOut {
     from {
         transform: translateX(0);
         opacity: 1;
     }

     to {
         transform: translateX(400px);
         opacity: 0;
     }
 }

 /* Image Context Menu */
 .image-context-menu {
     position: fixed;
     background: #fff;
     border: 1px solid #ddd;
     border-radius: 4px;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
     z-index: 9999;
     min-width: 80px;
     overflow: hidden;
 }

 .image-context-menu .menu-item {
     padding: 8px 16px;
     cursor: pointer;
     font-size: 14px;
     color: #333;
     transition: background 0.2s ease;
 }

 .image-context-menu .menu-item:hover {
     background: #f5f5f5;
 }

 .image-context-menu .menu-item[data-action="delete"]:hover {
     background: #ffebee;
     color: #f44336;
 }


 .wordart_box .header {
     background: white;
     padding: 15px 0px;
     padding-top: 0;
     border-bottom: 1px solid #e0e0e0;
 }

 .wordart_box .header h1 {
     font-size: 24px;
     font-weight: 600;
     margin-bottom: 8px;
 }

 .wordart_box .header p {
     color: #666;
     font-size: 14px;
 }

 .wordart_box .container {
     display: flex;
     margin-top: 20px;
     gap: 20px;
 }

 .wordart_box .canvas-area {
     flex: 1;
     background: white;
     border-radius: 8px;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
     position: relative;
     overflow: hidden;
 }

 .wordart_box #wordcloud {
     width: 100%;
     height: 100%;
     background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==') repeat;
 }

 .wordart_box .control-panel {
     width: 320px;
     background: white;
     border-radius: 8px;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
     padding: 24px;
     overflow-y: auto;
 }

 .wordart_box .panel-title {
     font-size: 20px;
     font-weight: 600;
     margin-bottom: 10px;
 }

 .wordart_box .input-group {
     margin-bottom: 16px;
 }

 .wordart_box .input-group input {
     width: 100%;
     padding: 10px 12px;
     border: 2px solid #e0e0e0;
     border-radius: 6px;
     font-size: 14px;
     transition: border-color 0.3s;
 }

 .wordart_box .input-group input:focus {
     outline: none;
 }

 .wordart_box .add-word-btn {
     display: flex;
     align-items: center;
     gap: 8px;
     color: #000000;
     font-size: 14px;
     cursor: pointer;
     padding: 8px 0;
     border: none;
     background: none;
     font-weight: 500;
 }

 .wordart_box .add-word-btn:hover {
     color: #000000;
 }

 .wordart_box .add-word-btn::before {
     content: '+';
     display: inline-flex;
     align-items: center;
     justify-content: center;
     width: 20px;
     height: 20px;
     border: 2px solid #000000;
     border-radius: 50%;
     font-size: 18px;
     font-weight: bold;
 }

 .wordart_box .section {
     margin-top: 15px;
     padding-top: 15px;
     border-top: 1px solid #e0e0e0;
 }

 .wordart_box .section-title {
     font-size: 14px;
     font-weight: 600;
     margin-bottom: 12px;
 }

 .wordart_box .font-select,
 .zoom-control {
     width: 100%;
     padding: 10px 12px;
     border: 2px solid #e0e0e0;
     border-radius: 6px;
     font-size: 14px;
     background: white;
     cursor: pointer;
 }

 .wordart_box .color-picker {
     display: flex;
     gap: 12px;
     flex-wrap: wrap;
     margin-bottom: 12px;
 }

 .wordart_box .color-option {
     width: 36px;
     height: 36px;
     border-radius: 50%;
     cursor: pointer;
     border: 3px solid transparent;
     transition: all 0.3s;
 }

 .wordart_box .color-option:hover {
     transform: scale(1.1);
 }

 .wordart_box .color-option.active {
     border-color: #333;
     box-shadow: 0 0 0 2px white, 0 0 0 4px #333;
 }

 .wordart_box .add-color-btn {
     width: 36px;
     height: 36px;
     border-radius: 50%;
     border: 2px dashed #999;
     background: white;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 20px;
     color: #999;
 }

 .wordart_box .zoom-slider {
     width: 100%;
     margin: 12px 0;
 }

 .wordart_box .action-buttons {
     display: flex;
     gap: 12px;
     margin-top: 20px;
     flex-wrap: wrap;
 }

 .wordart_box .btn {
     flex: 1;
     padding: 12px;
     border-radius: 6px;
     border: none;
     font-size: 14px;
     font-weight: 500;
     line-height: 1.2;
     cursor: pointer;
     transition: all 0.3s;
 }

 .wordart_box .btn-secondary {
     background: white;
     color: #333;
     border: 2px solid #e0e0e0;
 }

 .wordart_box .btn-secondary:hover {
     background: #f5f5f5;
 }

 .wordart_box .btn-primary {
     background: #212121;
     color: white;
 }

 .wordart_box .btn-primary:hover {
     background: #000;
 }

 .wordart_box .mix-button {
     width: 100%;
     padding: 12px;
     background: white;
     border: 2px solid #e0e0e0;
     border-radius: 6px;
     font-size: 14px;
     font-weight: 500;
     cursor: pointer;
     transition: all 0.3s;
 }

 .wordart_box .mix-button:hover {
     background: #f5f5f5;
 }

 .wordart_box .advanced-toggle {
     display: flex;
     align-items: center;
     justify-content: space-between;
     padding: 0px;
     cursor: pointer;
     user-select: none;
 }

 .wordart_box .advanced-content {
     max-height: 0;
     overflow: hidden;
     transition: max-height 0.3s ease;
 }

 .wordart_box .advanced-content.open {
     max-height: 500px;
 }

 .wordart_box input[type="range"] {
     width: 100%;
     height: 6px;
     border-radius: 3px;
     background: #e0e0e0;
     outline: none;
     -webkit-appearance: none;
 }

 .wordart_box input[type="range"]::-webkit-slider-thumb {
     -webkit-appearance: none;
     appearance: none;
     width: 18px;
     height: 18px;
     border-radius: 50%;
     background: #212121;
     cursor: pointer;
 }

 .wordart_box input[type="range"]::-moz-range-thumb {
     width: 18px;
     height: 18px;
     border-radius: 50%;
     background: #212121;
     cursor: pointer;
     border: none;
 }

 .wordart_box .word-list {
     max-height: 150px;
     overflow-y: auto;
     margin-bottom: 12px;
 }

 .wordart_box .word-item {
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 8px 12px;
     background: #f5f5f5;
     border-radius: 4px;
     margin-bottom: 6px;
 }

 .wordart_box .word-item button {
     background: none;
     border: none;
     color: #999;
     cursor: pointer;
     font-size: 16px;
 }

 .wordart_box .word-item button:hover {
     color: #f44336;
 }


 @font-face {
     font-family: 'Underground';
     src: url('https://fonts.cdnfonts.com/s/29687/Underground.woff') format('woff');
 }

 @font-face {
     font-family: 'Wiffles';
     src: url('https://fonts.cdnfonts.com/s/26420/WIFFLES_.woff') format('woff');
 }

 .design_tools .layers li:first-child .funcs div.btn_up {
     pointer-events: none;
     background-color: #eee;
 }

 .design_tools .layers li:last-child .funcs div.btn_down {
     pointer-events: none;
     background-color: #eee;
 }

 .products_options .size .item input[readonly] {
     background-color: #EAEAEA;
     opacity: .8;
 }

 .unit-select {
     padding: .4rem 1rem;
     border: 1px solid #999;
     border-radius: 5px;
     font-size: 15px;
     min-width: 9rem;
     text-align: center;
     color: var(--primary);
     cursor: pointer;
 } 