* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

body {
    display: flex;
    flex-direction: column;
    background-color: #f5f5f5;
    overflow: hidden;
    height: 100vh;
    padding: 0 20px 0 20px;
}

body.night {
    background-color: #1a1a1a;
}

body.night * {
    color: #fff !important;
}

.container {
    display: flex;
    flex: 1;
    flex-direction: row;
    gap: 20px;
}

.left-panel {
    flex: 1;
    background-color: #fff;
    border-radius: 8px;
    overflow-y: scroll;
    height: 100vh;
}

.left-panel.night {
    background-color: #2a2a2a;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
}

.tabs.night {
    border-bottom: 1px solid #444;
    background: #2a2a2a;
}

.tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    background-color: #f0f0f0;
    border-right: 1px solid #ddd;
    transition: background-color 0.3s;
}

.tab.night {
    background-color: #333;
    border-right: 1px solid #444;
}

.tab:last-child {
    border-right: none;
}

.tab.active {
    position: relative;
    background-color: #fff;
    font-weight: bold;
    border-bottom: none;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-image: linear-gradient(to right, #283048 0%, #859398 51%, #283048 100%);
    background-size: 200% auto;
}

.tab.active.night {
    background-color: #444;
    border-bottom: none;
}

.tab.active.night::after {
    background-image: linear-gradient(to right, #283048 0%, #859398 51%, #283048 100%);
    opacity: 0.8;
}

.tab-content {
    padding: 20px;
    display: none;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

.design-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.design-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.night .design-item{
    background-color: #333;
    color: #fff;
}

.design-item:hover {
    transform: scale(1.05);
}

.design-item img {
    width: 100%;
    height: auto;
    display: block;
}

.design-item p {
    text-align: center;
    padding: 5px;
    font-size: 12px;
    color: #666;
}

.graphics-items-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
    width: 100%;
}

#sleeves-graphics-container {
    margin-top: 15px;
}

.graphic-item {
    padding: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: #fff;
    position: relative;
}

/* .graphic-item.night {
    background: #2a2a2a;
    border-color: #444;
} */

.graphic-preview {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.graphic-preview .night  {
    background: #444444;
}

.graphic-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.graphics-position-selector {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
}

/* .night .graphics-position-selector {
    background: #333;
    border-color: #444;
    color: #fff;
} */

.graphics-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 5px;
}

.edit-graphic-btn,
.delete-graphic-btn {
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #534e4e;
    transition: background 0.3s;
}

/* .night .graphic-item .edit-graphic-btn,
.night .graphic-item .delete-graphic-btn {
    background: #444;
    color: #fff;
} */

.edit-graphic-btn:hover {
    background: #e0e0e0 !important;
}

.edit-text-btn:hover {
    background: #e0e0e0 !important;
}

.delete-graphic-btn:hover {
    background: #ffebee;
}

/* .graphic-item.night .edit-graphic-btn:hover {
    background: #555;
} */

/* .graphic-item.night .delete-graphic-btn:hover {
    background: #ff5252;
    color: #fff;
} */

/* Responsive styles */
@media screen and (max-width: 767px) {
    .graphics-items-container {
        padding: 5px;
    }

    .graphic-item {
        padding: 8px;
    }

    .graphic-preview {
        height: 80px;
    }

    .graphics-position-selector {
        padding: 12px;
        font-size: 13px;
    }

    .edit-graphic-btn,
    .delete-graphic-btn {
        padding: 6px;
    }

    .slider-container {
        display: none;
        padding: 10px;
        border-radius: 4px;
        margin-top: 10px;
    }


    .slider-container.active {
        display: block;
        width: 100%;
    }

    .slider-container label {
        display: block;
        margin-bottom: 5px;
        font-size: 13px;
    }

    .slider-container input[type="range"] {
        width: 100%;
        margin-bottom: 10px;
    }

    .reset-button {
        width: 100%;
        padding: 6px;
        margin-bottom: 10px;
        font-size: 12px;
    }

    .dropdown-icon {
        position: absolute;
        right: 10px;
        top: 10px;
        cursor: pointer;
        padding: 5px;
        transition: transform 0.3s;
    }

    .dropdown-icon.active {
        transform: rotate(180deg);
    }
}

@media screen and (min-width: 768px) {
    .graphic-preview {
        width: 100px;
        height: 100px;
        flex-shrink: 0;
    }

    .graphics-position-selector {
        width: 200px;
        flex-grow: 1;
    }

    .slider-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin-top: 10px;
        padding: 10px;
        border-radius: 4px;
    }


    .slider-container label {
        font-size: 14px;
    }

    .slider-container input[type="range"] {
        width: 100%;
    }

    .reset-button {
        padding: 8px;
        font-size: 13px;
    }

    .dropdown-icon {
        display: none;
    }
}

/* Scrollbar styles */
.graphics-items-container::-webkit-scrollbar {
    width: 8px;
}

.graphics-items-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.graphics-items-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.graphics-items-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* .graphic-item.night .graphics-items-container::-webkit-scrollbar-track {
    background: #333;
}

.graphic-item.night .graphics-items-container::-webkit-scrollbar-thumb {
    background: #666;
}

.graphic-item.night .graphics-items-container::-webkit-scrollbar-thumb:hover {
    background: #888;
} */

.position-adjustment-container {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.position-adjustment-container.night {
    background-color: #333;
    border-color: #555;
    color: #fff;
}

.position-adjustment-image {
    width: 100%;
    height: 60px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.position-adjustment-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.position-wrapper,
.slider-wrapper,
.toggle-wrapper {
    margin-bottom: 15px;
}

.position-wrapper label,
.slider-wrapper label,
.toggle-wrapper label {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

.position-wrapper label.night,
.slider-wrapper label.night,
.toggle-wrapper label.night {
    color: #fff;
}

.position-select {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #333;
}

.position-select.night {
    background-color: #333;
    color: #ccc;
    border-color: #555;
}

.slider-container {
    display: none;
    padding: 10px;
}

.slider-container.active {
    display: block;
    width: 100%;
}

.reset-button {
    padding: 5px 10px;
    margin: 5px 0;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
}

.dropdown-icon {
    cursor: pointer;
    padding: 5px;
}

.dropdown-icon.active {
    transform: rotate(180deg);
}

.position-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.position-select.night {
    background-color: #444;
    border-color: #555;
    color: #fff;
}

.slider {
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    outline: none;
}

.slider.night {
    background: #555;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
}

.slider.night::-webkit-slider-thumb {
    background: #66b0ff;
}

.toggle-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-bg-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remove-bg-wrapper label {
    font-size: 14px;
    margin: 0;
}

.toggle {
    width: 40px;
    height: 20px;
    background-color: #ddd;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
}

.toggle.night {
    background-color: #555;
}

.toggle::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
}

.toggle:checked::before {
    transform: translateX(20px);
}

.toggle:checked {
    background-color: #007bff;
}

.toggle.night:checked {
    background-color: #66b0ff;
}

.position-adjustment-wrapper {
    margin-top: 20px;
    display: none;
}

.position-adjustment-wrapper.active {
    display: block;
}

.upload-container {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    background-color: #f9f9f9;
}

.upload-container.night {
    border-color: #555;
    background-color: #444;
}

.upload-container.dragover {
    border: 2px dashed #007bff;
    background-color: #e7f1ff;
}

.upload-container.dragover.night {
    background-color: #555;
}

.preview-graphic {
    max-width: 100px;
    max-height: 100px;
}

.graphics-item.night {
    background-color: #333;
    border-color: #555;
    color: #fff;
}

.graphics-item.night:hover {
    background-color: #444;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.pagination button {
    padding: 8px 16px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pagination button.night {
    background-color: #0056b3;
}

.pagination button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.pagination button:disabled.night {
    background-color: #555;
}

.pagination span {
    font-size: 14px;
    color: #666;
}

.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border-radius: 8px;
    position: relative;
}

.right-panel.night {
    background-color: #2a2a2a;
}

.preview {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: filter 0.3s;
}

.preview.night {
    filter: brightness(0.7);
}

.preview img {
    max-width: 100%;
    max-height: 80%;
    object-fit: contain;
    z-index: 1;
}

.preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.preview-graphic {
    position: absolute;
    max-width: 50%;
    max-height: 50%;
    object-fit: contain;
    z-index: 2;
}

.cart-button {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1;
}

.options {
    position: absolute;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.options button {
    background: none;
    border: none;
    cursor: pointer;
}

.bottom-controls-left {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
}

.bottom-controls-right {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.save-button {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.save-button.night {
    background-color: #0056b3;
}

.day-night-button {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.day-night-button.night {
    background-color: #0056b3;
}

.day-night-button img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
    filter: brightness(1.2) invert(1) sepia(1) hue-rotate(180deg) saturate(3) contrast(1.2);
}

.day-night-button .night-icon {
    display: none;
}

.day-night-button.night .night-icon {
    display: inline;
}

.day-night-button.night .day-icon {
    display: none;
}

.day-night-button .day-icon {
    display: inline;
}

.color-tabs {
    display: flex;
    margin-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

.color-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: border-bottom 0.3s;
}

.canvas-containers {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.canvas-container-show {
    display: block;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.canvas-container canvas {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
    border: 1px solid #ccc;
}

.canvas-container.night {
    background-color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#designs {
    position: relative;
}

.loader {
    display: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: relative;
    background-image: linear-gradient(to right, #283048 0%, #859398 51%, #283048 100%);
    animation: rotation 1s linear infinite;
}

.loader:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #fff;
}

.night .loader:after {
    background-color: #2a2a2a;
}

@keyframes rotation {
    0% { transform: rotate(0deg) }
    100% { transform: rotate(360deg) }
}

#pattern-loader {
    position: relative;
    margin-top: 30px;
    left: 45%;
    transform: translate(-50%, -50%);
}

#pattern-loader.active {
    display: block;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.btn-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
}

/* Error container styles */
.error-container {
    text-align: center;
    padding: 20px;
    color: #333;
}

.error-container p {
    margin-bottom: 10px;
    font-size: 16px;
}

.reload-button {
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    background: linear-gradient(to right, #6a11cb, #2575fc);
    color: white;
    border: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.reload-button:hover {
    background: linear-gradient(to right, #2575fc, #6a11cb);
}

.reload-button.night {
    background: linear-gradient(to right, #4a0e8b, #1a5ab8);
}

.btn-grad {
    background-image: linear-gradient(to right, #283048 0%, #859398 51%, #283048 100%);
    padding: 15px 45px;
    text-align: center;
    text-transform: uppercase;
    transition: 0.5s;
    background-size: 200% auto;
    color: white;            
    box-shadow: 0 0 5px #eee;
    border-radius: 10px;
    display: block;
}

.btn-grad:hover {
    background-position: right center;
    color: #fff;
    text-decoration: none;
}

#pattern-error {
    display: none;
}

.canvas-containers, .canvas-container-show {
    position: relative;
}

.night .error-container {
    color: #ccc;
}

.svg-name {
    font-size: 14px;
    color: #333;
    text-align: center;
    margin-top: 5px;
    font-weight: 500;
}

.svg-name.night {
    color: #ccc;
}

.svg-error {
    color: red;
    font-size: 14px;
    text-align: center;
    margin-top: 5px;
}

.color-tab.disabled {
    display: none;
}

.color-tabs {
    display: flex;
    gap: 10px;
}

.color-tab {
    padding: 10px;
    cursor: pointer;
    background-color: #f0f0f0;
}

.color-tab.active {
    background-color: #ddd;
}

.color-tab.active.night {
   background-color: #444;
}

.color-tab.night {
    background-color: #333;
}

.color-content {
    display: none;
}

.color-content.active {
    display: block;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
    gap: 5px;
}

.color-item {
    width: 30px;
    cursor: pointer;
}

.color-item.selected {
    border: 2px solid #000;
}

.color-tab.active.night {
    border-bottom: none;
}

.color-tab.active.night::after {
    background-image: linear-gradient(to right, #283048 0%, #859398 51%, #283048 100%);
    opacity: 0.8;
}

.color-options {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.color-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #333;
}

.color-options input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #ddd;
    position: relative;
    cursor: pointer;
    outline: none;
}

.color-options input[type="radio"]:checked {
    background-color: #fff;
    border: 1px solid transparent;
}

.color-options input[type="radio"]:checked::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(to right, #283048 0%, #859398 51%, #283048 100%);
    background-size: 200% auto;
    z-index: -1;
}

.color-options input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(to right, #283048 0%, #859398 51%, #283048 100%);
    background-size: 200% auto;
}

.night .color-options input[type="radio"] {
    background-color: #333;
    border-color: #444;
}

.night .color-options input[type="radio"]:checked {
    background-color: #333;
}

.night .color-options input[type="radio"]:checked::after {
    opacity: 0.9;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 15px;
}

.color-item {
    width: 100%;
    padding-top: 100%;
    border-radius: 3px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
    position: relative;
    box-shadow: 0 0 1px rgba(0,0,0,0.2);
}

.color-item:hover {
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.color-item.selected {
    box-shadow: 0 0 8px #859398;
}

.color-item.selected:hover {
    transform: none;
    box-shadow: 0 0 8px #859398;
    background: inherit;
}

.color-item.selected:active {
    transform: none;
    box-shadow: 0 0 8px #859398;
    background: inherit;
}

.color-item.selected::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 5px;
    background: linear-gradient(to right, #283048 0%, #859398 51%, #283048 100%);
    background-size: 200% auto;
    z-index: -1;
}

.color-item.selected::after {
    content: '✔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.color-picker-container {
    display: none;
    position: relative;
    width: 100%;
    margin-bottom: 10px;
}

.color-picker-container.active {
    display: block;
}

.color-picker {
    width: 100%;
    height: 150px;
    border: 1px solid #ddd;
    border-radius: 5px;
    position: relative;
}

.color-picker.night {
    border: 1px solid #444;
}

.color-picker-cursor {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.color-picker-cursor.night {
    border: 2px solid #ccc;
}

.hue-slider {
    width: 100%;
    height: 20px;
    margin-top: 5px;
    border-radius: 5px;
    background: linear-gradient(to right, red, yellow, lime, cyan, blue, magenta, red);
    position: relative;
}

.hue-slider-cursor {
    position: absolute;
    width: 10px;
    height: 24px;
    background: #fff;
    border: 1px solid #000;
    border-radius: 3px;
    transform: translateX(-50%);
    top: -2px;
    cursor: pointer;
}

.hue-slider-cursor.night {
    background: #ccc;
    border: 1px solid #fff;
}

.color-info {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.color-info div {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    margin: 0 5px;
    color: #fff;
    font-size: 14px;
}

.gradient-container {
    display: none;
    margin-top: 10px;
}

.gradient-container.active {
    display: block;
}

.gradient-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    margin-top: 15px;
}

.gradient-buttons button {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.gradient-buttons button.night {
    background-color: #333;
    border: 1px solid #444;
}

.gradient-buttons button.active {
    background-image: linear-gradient(to right, #283048 0%, #859398 51%, #283048 100%);
    background-size: 200% auto;
    color: white;
    border: none;
    transition: 0.5s;
    box-shadow: 0 0 5px #eee;
}

.gradient-buttons button.active:hover {
    background-position: right center;
}

.gradient-buttons button.active.night {
    box-shadow: 0 0 5px #333;
}

.gradient-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.gradient-controls input[type="range"] {
    flex: 1;
    margin: 0 10px;
}

.flip-button {
    padding: 8px 16px;
    background-image: linear-gradient(to right, #283048 0%, #859398 51%, #283048 100%);
    background-size: 200% auto;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.5s;
    box-shadow: 0 0 5px #eee;
}

.flip-button:hover {
    background-position: right center;
}

.flip-button.night {
    box-shadow: 0 0 5px #333;
}

.upload-container {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
}

.upload-container.night {
    border-color: #555;
}

.upload-container:hover {
    background-color: #f0f0f0;
}

.upload-container.night:hover {
    background-color: #333;
}

.upload-container p {
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

.upload-container p:first-child {
    font-weight: bold;
    color: #333;
}

.upload-container p:last-child {
    color: #007bff;
}

.upload-container.night p:first-child {
    color: #fff;
}

.upload-icon {
    font-size: 24px;
    color: #666;
}

.upload-icon.night {
    color: #ccc;
}

input[type="file"] {
    display: none;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        overflow: hidden;
        position: relative;
    }

    .left-panel {
        flex: 0 0 45%;
        overflow-y: auto;
        margin-bottom: 10px;
        order: 2;
    }

    .right-panel {
        flex: 0 0 45%;
        overflow: hidden;
        position: relative;
    }

    .design-grid {
        grid-template-rows: repeat(2, 1fr);
        gap: 8px;
    }

    .cart-button.btn-grad,
    .save-button.btn-grad,
    .day-night-button.btn-grad {
        padding: 4px 8px;
        font-size: 10px;
        margin: 3px;
        min-width: 60px;
        max-width: 100px;
        height: 25px;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }

    .cart-button.btn-grad {
        position: absolute;
        top: 5px;
        left: 5px;
        z-index: 10;
    }

    .bottom-controls-left,
    .bottom-controls-right {
        position: absolute;
        z-index: 10;
        display: flex;
        gap: 5px;
    }

    .bottom-controls-left {
        left: 5px;
    }

    .bottom-controls-right {
        right: 5px;
    }

    .day-night-button span {
        font-size: 10px;
    }

    .day-night-button span:last-child {
        margin-left: 3px;
    }

    .options {
        position: absolute;
        right: 5px;
        top: 5px;
        display: flex;
        flex-direction: column;
        gap: 3px;
        z-index: 10;
    }

    .options button {
        padding: 5px;
        width: 28px;
        height: 28px;
        background-color: rgba(255, 255, 255, 0.9);
        border-radius: 4px;
        border: 1px solid #ddd;
    }

    .options button img {
        width: 16px;
        height: 16px;
    }

    .preview {
        height: 100%;
        width: 100%;
    }

    .preview iframe {
        height: 100%;
        width: 100%;
    }

    .night .options button {
        background-color: rgba(42, 42, 42, 0.9);
        border-color: #444;
    }

    .tabs {
        position: sticky;
        top: 0;
        z-index: 100;
        width: 100%;
    }

    .tab {
        padding: 8px 5px;
        font-size: 12px;
    }

    .pagination span {
        font-size: 12px;
        text-align: center;
    }

    .text-options {
        flex-direction: column;
        gap: 8px;
    }

    .text-font-selector,
    .text-position-selector,
    .text-color-selector,
    .text-color-picker,
    .text-font-size-selector,
    .text-effect-selector {
        width: 100%;
    }
}

.text-input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.text-input.night {
    background-color: #333;
    border-color: #444;
    color: #fff;
}

.text-font-selector.night {
    background-image: url('data:image/svg+xml;utf8,<svg fill="white" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-color: #333;
    border-color: #444;
    color: #fff;
}


.text-font-size-selector.night {
    background-image: url('data:image/svg+xml;utf8,<svg fill="white" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-color: #333;
    border-color: #444;
    color: #fff;
}

.night .text-effect-selector {
    background-image: url('data:image/svg+xml;utf8,<svg fill="white" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-color: #333;
    border-color: #444;
    color: #fff;
}

.text-color-picker.night {
    background-color: #333;
    border-color: #444;
    color: #fff;
}


.text-options {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.option-button-mode.night {
    filter: brightness(1.2) invert(1) sepia(1) hue-rotate(180deg) saturate(3) contrast(1.2);
}

.text-font-selector,
.text-position-selector,
.text-font-size-selector,
.text-effect-selector {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-color: white;
}

.text-color-selector {
    width: 100%;
    border: none;
    background-color: transparent;
    cursor: pointer;
}

.text-color-picker {
    flex: 1;
    padding: 10px 22px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    cursor: pointer;
}

.add-text-button {
    width: 100%;
    padding: 12px;
    background-image: linear-gradient(to right, #283048 0%, #859398 51%, #283048 100%);
    background-size: 200% auto;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 20px;
    text-align: center;
    transition: 0.5s;
    box-shadow: 0 0 5px #eee;
}

.add-text-button:hover {
    background-position: right center;
}

.text-items-container,
.graphics-items-container {
    width: 100%;
    padding: 0 10px;
}

.text-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    border: 1px solid #ccc;
    margin-bottom: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.text-item-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.text-color-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #ccc;
    flex-shrink: 0;
}

.text-content {
    flex: 1;
    font-size: 14px;
    min-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-position-selector {
    flex: 1;
    min-width: 120px;
    padding: 12px;
    font-size: 14px;
}

.night .text-position-selector {
    background-image: url('data:image/svg+xml;utf8,<svg fill="white" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-color: #333;
    border-color: #444;
    color: #fff;
}

.text-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.graphic-item-header .dropdown-icon {
    position: absolute;
    right: 12px;
    top: 12px;
    font-size: 16px;
    padding: 8px;
    cursor: pointer;
    display: block;
    color: #666;
    transition: transform 0.3s;
    z-index: 1;
    background: transparent;
    border: none;
    border-radius: 4px;
}

.dropdown-icon {
    position: relative;
    font-size: 16px;
    padding: 8px;
    cursor: pointer;
    display: block;
    color: #666;
    transition: transform 0.3s;
    z-index: 1;
    background: transparent;
    border: none;
    border-radius: 4px;
}

.dropdown-icon:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dropdown-icon.active {
    transform: rotate(180deg);
}

.slider-container {
    display: none;
    flex-direction: column;
    padding: 12px;
    border-top: 1px solid #ccc;
    margin-top: 10px;
    border-radius: 0 0 8px 8px;
    gap: 10px;
}

.slider-container.active {
    display: flex;
    width: 100%;
}

.slider-container label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.slider-container input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    outline: none;
    transition: background 0.3s;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(to right, #283048, #859398);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(to right, #283048, #859398);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

.slider-container input[type="range"]:focus {
    background: #ccc;
}

.reset-button {
    background-image: linear-gradient(to right, #283048 0%, #859398 51%, #283048 100%);
    padding: 15px 45px;
    text-align: center;
    text-transform: uppercase;
    transition: 0.5s;
    background-size: 200% auto;
    color: white;            
    box-shadow: 0 0 5px #eee;
    border-radius: 10px;
    display: block;
}

.reset-button:hover {
    background-position: right center;
    color: #fff;
    text-decoration: none;
}

/* Night mode styles */
.night .text-items-container {
    background-color: #2a2a2a;
}

.night .text-item {
    background-color: #333;
    border-color: #555;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.night .graphic-item {
    background-color: #333;
    border-color: #555;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* .night .slider-container {
    background-color: #444;
    border-top-color: #555;
} */

/* .night .slider-container label {
    color: #ccc;
} */

.slider-container.night input[type="range"] {
    background: #555;
}

.slider-container.night input[type="range"]:focus {
    background: #666;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .text-items-container {
        padding: 0 5px;
    }

    .text-item {
        padding: 10px;
        margin-bottom: 10px;
    }

    .text-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .text-content {
        font-size: 12px;
        min-width: 80px;
    }

    .text-position-selector {
        width: 100%;
        min-width: unset;
    }

    .text-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .dropdown-icon {
        position: absolute;
        display: block;
        right: 8px;
        top: 8px;
        font-size: 14px;
    }

    .slider-container {
        display: none;
        padding: 10px;
        border-top: 1px solid #ccc;
        margin-top: 10px;
    }

    .slider-container.active {
        display: block;
    }

    .text-item .position-selectors {
        width: 100%;
  }
}

@media (max-width: 480px) {
    .text-content {
        font-size: 11px;
    }

    .text-color-indicator {
        width: 20px;
        height: 20px;
    }

    .text-position-selector {
        font-size: 14px;
    }

    .text-actions button i {
        font-size: 16px;
    }
}

/* Combined Modal Styles */
.text-position-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(115, 119, 121, 0.6) 0%, rgba(211, 211, 211, 0.4) 100%);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.text-position-modal.show {
    opacity: 1;
}

.text-position-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.text-position-modal.show .text-position-modal-content {
    transform: scale(1);
}

.text-position-modal h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
    color: #333;
    text-align: center;
}

.text-position-modal p {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
    text-align: center;
}

.text-position-modal .close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #333;
}

.text-position-modal .close-modal:hover {
    color: #e91e63;
}

.text-position-modal .position-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 20px;
    background-color: white;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.text-position-modal .confirm-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, #e91e63, #f44336);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.text-position-modal .confirm-button:hover {
    background: linear-gradient(90deg, #d81b60, #e53935);
}

/* Night mode styles */
.night .text-position-modal-content {
    background-color: #2a2a2a;
}

.night .text-position-modal h2 {
    color: #fff;
}

.night .text-position-modal p {
    color: #ccc;
}

.night .text-position-modal .close-modal {
    color: #ccc;
}

.night .text-position-modal .close-modal:hover {
    color: #e91e63;
}

.night .text-position-modal .position-select {
    background-image: url('data:image/svg+xml;utf8,<svg fill="white" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-color: #333;
    border-color: #444;
    color: #fff;
}

.night .text-position-modal .confirm-button {
    background: linear-gradient(90deg, #4da6ff, #66b0ff);
}

.night .text-position-modal .confirm-button:hover {
    background: linear-gradient(90deg, #66b0ff, #4da6ff);
}

/* Position Modal Styles - Using text-position-modal classes */
.position-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(115, 119, 121, 0.6) 0%, rgba(211, 211, 211, 0.4) 100%);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.position-modal.show {
    opacity: 1;
}

.position-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.position-modal.show .position-modal-content {
    transform: scale(1);
}

.position-modal h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
    color: #333;
    text-align: center;
}

.position-modal p {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
    text-align: center;
}

.position-modal .close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #333;
}

.position-modal .close-modal:hover {
    color: #e91e63;
}

.position-modal .position-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 20px;
    background-color: white;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.position-modal .confirm-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, #e91e63, #f44336);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.position-modal .confirm-button:hover {
    background: linear-gradient(90deg, #d81b60, #e53935);
}

/* Night mode styles for position modal */
.night .position-modal-content {
    background-color: #2a2a2a;
}

.night .position-modal h2 {
    color: #fff;
}

.night .position-modal p {
    color: #ccc;
}

.night .position-modal .close-modal {
    color: #ccc;
}

.night .position-modal .close-modal:hover {
    color: #e91e63;
}

.night .position-modal .position-select {
    background-image: url('data:image/svg+xml;utf8,<svg fill="white" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-color: #333;
    border-color: #444;
    color: #fff;
}

.night .position-modal .confirm-button {
    background: linear-gradient(90deg, #4da6ff, #66b0ff);
}

.night .position-modal .confirm-button:hover {
    background: linear-gradient(90deg, #66b0ff, #4da6ff);
}

.login-main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f5f6fa;
}

.login-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    width: 450px;
}

.login-container h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.login-container p {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #007bff;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-group input {
    margin-right: 10px;
}

.checkbox-group label {
    font-size: 12px;
    color: #666;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(to right, #4a5a6b, #2a3b4c);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.login-btn:hover {
    opacity: 0.9;
}

.error-message {
    color: #ff0000;
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
    display: none;
}

/* Save Modal Styles */
.save-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(115, 119, 121, 0.6) 0%, rgba(211, 211, 211, 0.4) 100%);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.save-modal.show {
    opacity: 1;
}

.save-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.save-modal.show .save-modal-content {
    transform: scale(1);
}

.save-modal h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 24px;
    color: #333;
    text-align: center;
}

.save-modal p {
    margin-bottom: 25px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
}

.modal-input,
.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-check {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

.form-check input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
}

.form-check label {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.privacy-link,
.terms-link {
    color: #333;
    font-weight: bold;
    text-decoration: underline;
}

.send-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.5s;
}

.send-button:hover {
    background-color: #3399ff;
}

/* Cart Modal Styles */
.cart-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(115, 119, 121, 0.6) 0%, rgba(211, 211, 211, 0.4) 100%);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-modal.show {
    opacity: 1;
}

.cart-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 90%;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cart-modal.show .cart-modal-content {
    transform: scale(1);
}

.cart-modal-flex {
    display: flex;
    gap: 30px;
}

.product-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-image-container img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-details h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.product-subtitle {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.quantity-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quantity-selector label {
    font-size: 14px;
    color: #333;
}

.quantity-controls {
    display: flex;
    align-items: center;
    width: 120px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#quantityInput {
    width: 40px;
    height: 40px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 16px;
}

.size-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.size-guide {
    color: #0066cc;
    font-size: 14px;
    text-decoration: none;
}

.size-options {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.size-btn {
    width: 60px;
    height: 40px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.size-btn.selected {
    position: relative;
    color: #4c6170;
    border: none;
}

.size-btn.selected::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 5px;
    background-image: linear-gradient(to right, #283048 0%, #859398 51%, #283048 100%);
    background-size: 200% auto;
    z-index: -1;
    padding: 1px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

body.night .size-btn.selected {
    color: #a5b8c2;
    border: none;
}

body.night .size-btn.selected::after {
    opacity: 0.8;
}

.privacy-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.privacy-check input[type="checkbox"] {
    margin-top: 3px;
}

.privacy-check label {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.cart-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.quote-button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

.favorite-button {
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Night mode styles for save modal */
.night .save-modal-content {
    background-color: #2a2a2a;
}

.night .save-modal h2,
.night .form-group label {
    color: #fff;
}

.night .save-modal p,
.night .form-check label {
    color: #ccc;
}

.night .modal-input,
.night .form-group input {
    background-color: #333;
    border-color: #444;
    color: #fff;
}

.night .privacy-link,
.night .terms-link {
    color: #4da6ff;
}

.night .close-modal {
    color: #ccc;
}

.night .close-modal:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.night .send-button {
    background-color: #1a75ff;
}

/* Night mode styles for cart modal */
.night .cart-modal-content {
    background-color: #2a2a2a;
}

.night .product-details h2 {
    color: #fff;
}

.night .product-subtitle,
.night .privacy-check label {
    color: #ccc;
}

.night .quantity-selector label,
.night .size-selector label {
    color: #fff;
}

.night .quantity-controls,
.night .size-btn {
    border-color: #444;
    background-color: #333;
    color: #fff;
}

.night #quantityInput {
    background-color: #333;
    color: #fff;
    border-color: #444;
}

.night .size-guide {
    color: #4da6ff;
}

.night .size-btn.selected {
    border-color: #4da6ff;
    color: #4da6ff;
}

.night .quote-button {
    background-color: #4da6ff;
}

.night .favorite-button {
    border-color: #444;
    color: #ccc;
}

@media (max-width: 768px) {
    .cart-modal-flex {
        flex-direction: column;
    }
}

/* Size Selector CSS - Removed as per client request */
.size-selector {
    display: none;
}

.size-header, .size-guide, .size-options, .size-btn {
    display: none;
}

@media (max-width: 768px) {

    body {
        padding: 0;
    }
}

/* Action Buttons Styles */
.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #333;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.close-modal:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #e91e63;
}

.edit-graphic-btn,
.delete-graphic-btn,
.edit-text-btn,
.delete-text-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.3s;
}

/* .edit-graphic-btn:hover,
.edit-text-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
} */

.delete-graphic-btn:hover,
.delete-text-btn:hover {
    background-color: rgba(255, 0, 0, 0.1);
}

.edit-graphic-btn .fa-solid,
.delete-graphic-btn .fa-solid,
.edit-text-btn .fa-solid,
.delete-text-btn .fa-solid {
    font-size: 16px;
}

.delete-graphic-btn .fa-solid,
.delete-text-btn .fa-solid {
    color: #a80606;
}

/* Night mode styles for action buttons */
.night .close-modal {
    color: #ccc;
}

.night .close-modal:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.night .edit-graphic-btn:hover,
.night .edit-text-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.night .delete-graphic-btn:hover,
.night .delete-text-btn:hover {
    background-color: rgba(255, 0, 0, 0.2);
}

/* .night .edit-graphic-btn .fa-solid,
.night .edit-text-btn .fa-solid {
    color: #ccc;
} */

/* .night .delete-graphic-btn .fa-solid,
.night .delete-text-btn .fa-solid {
    color: #110303;
} */

/* Responsive styles for action buttons */
@media (max-width: 768px) {
    .close-modal {
        top: 5px;
        right: 5px;
        font-size: 18px;
        width: 28px;
        height: 28px;
    }

    .edit-graphic-btn,
    .delete-graphic-btn,
    .edit-text-btn,
    .delete-text-btn {
        width: 28px;
        height: 28px;
        padding: 4px;
    }

    .edit-graphic-btn .fa-solid,
    .delete-graphic-btn .fa-solid,
    .edit-text-btn .fa-solid,
    .delete-text-btn .fa-solid {
        font-size: 14px;
    }
}

/* Scroll Buttons */
#scroll-buttons {
  display: none;
}
.scroll-btn {
  background: #283048;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  box-shadow: 0 2px 8px rgba(40,48,72,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.5s;
}

.scroll-btn:hover {
  transform: scale(1.08);
}

.scroll-btn svg {
  width: 22px;
  height: 22px;
}

.design-item.active {
    border: 2px solid #6f7179;
    box-shadow: 0 4px 16px rgba(40, 48, 72, 0.15);
    z-index: 2;
}
.night .design-item.active {
    border: 2px solid #859398;
    box-shadow: 0 4px 16px rgba(133, 147, 152, 0.18);
}


.text-item .position-selectors {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .text-item .text-position-selector,
  .text-item .text-specific-position-selector {
    flex: 1;
    min-width: 120px;
    padding: 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
  }
  
  .night .text-position-selector,
  .night .text-specific-position-selector {
    background-color: #333;
    color: #ccc;
    border: 1px solid #555;
  }

  .graphic-item {
    width: 100%;
  }

  .graphic-item .position-selectors {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
  }
  
  .graphic-item .graphics-position-selector,
  .graphic-item .graphics-specific-position-selector {
    flex: 1;
    min-width: 120px;
    padding: 12px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid #ddd;
  }
  
  .night .graphics-position-selector,
  .night .graphics-specific-position-selector {
    background-color: #444;
    color: #ccc;
    border: 1px solid #555;
  }
  
  .graphic-item-container h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-color, #333);
  }
  
  .night .graphic-item-container h3 {
    color: #ccc;
  }

    .save-message {
        font-size: 14px;
        font-family: 'Segoe UI', sans-serif;
        width: 100%;
        box-sizing: border-box;
    }

    .save-message.success {
        background-color: #28a745;
        color: #fff;
    }

    .save-message.error {
        background-color: #dc3545;
        color: #fff;
    }

    .text-option {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.text-effect-section {
    display: flex;
    gap: 10px;
    margin-top: 7px;
    margin-bottom: 20px;
}

.text-label {
    font-size: 14px;
    font-weight: 500;
}

.night .text-effect-selector {
    color: #ccc;
}

.color-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background-color: #fff;
    color: #333;
}

.color-input.night  {
    background-color: #333;
    color: #ccc;
    border-color: #555;
}

.eyedropper-button {
    padding: 10px 16px;
    background-image: linear-gradient(to right, #283048 0%, #859398 51%, #283048 100%);
    background-size: 200% auto;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.5s;
    box-shadow: 0 0 5px #eee;
}

.eyedropper-button:hover {
    background-position: right center;
}

.color-picker-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
}

.color-preview-box {
  width: 22px;
  height: 22px;
  border: 2px solid #888;
  border-radius: 3px;
  cursor: pointer;
  display: inline-block;
  margin: 0 10px;
}

.color-preview-box.active {
  outline: 3px solid #4CAF50;
}

.gradient-color-labels {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
}

.gradient-label {
    display: flex;
    align-items: center;
}

.gradient-color-inputs input[type="color"] {
  width: 100px;
  height: 30px;
  border: none;
  background: none;
  cursor: pointer;
  margin-left: 5px;
}