body::-webkit-scrollbar {
    width: 0px;
}

.tupiandivs {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: none;
}

.navbar {
    height: 52px;
    background: #12161f;
    border-bottom: 1px solid #262d3d;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 8px;
    flex-shrink: 0;
    z-index: 100;
    position: relative;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 170, .25), transparent);
}

.nav-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tbtn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: none;
    background: transparent;
    color: #55607a;
    font-size: 12px;
    font-family: inherit;
    border-radius: 7px;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
}

.tbtn:hover {
    background: #1a1f2e;
    color: #e4e8f0;
}

.tbtn:active {
    transform: scale(.96);
}

.tbtn:disabled {
    opacity: .3;
    cursor: not-allowed;
    pointer-events: none;
}

.abtn {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid #262d3d;
    background: transparent;
    color: #e4e8f0;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
}

.abtn:hover {
    border-color: #00d4aa;
    color: #00d4aa;
    background: rgba(0, 212, 170, .1);
}

.abtn:active {
    transform: scale(.97);
}

.abtn:disabled {
    opacity: .3;
    cursor: not-allowed;
    pointer-events: none;
}

.maindiv {
    flex: 1;
    display: flex;
    overflow: hidden;
    height: calc(100vh - 52px);
}

.sidebar {
    width: 256px;
    background: #12161f;
    border-right: 1px solid #262d3d;
    overflow-y: auto;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: #262d3d transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #262d3d;
    border-radius: 2px;
}


.panel {
    padding: 10px;
    border-bottom: 1px solid #262d3d;
}

.panel-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #55607a;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.panel-title i {
    font-size: 11px;
    color: #00d4aa;
    opacity: .6;
}

.mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mode-card,
.tool-card,
.fill-card {
    padding: 10px 6px;
    border: 1px solid #262d3d;
    border-radius: 6px;
    background: #1a1f2e;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.mode-card::before,
.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 212, 170, .1), transparent);
    opacity: 0;
    transition: opacity .2s;
}

.mode-card:hover,
.tool-card:hover,
.fill-card:hover {
    border-color: #333c52;
}

.mode-card:hover::before,
.tool-card:hover::before {
    opacity: .5;
}

.mode-card:hover {
    transform: translateY(-1px);
}

.mode-card.active,
.tool-card.active,
.fill-card.active {
    border-color: #00d4aa;
    background: rgba(0, 212, 170, .1);
}

.mode-card.active::before,
.tool-card.active::before {
    opacity: 1;
}

.mode-card.active {
    box-shadow: 0 0 16px rgba(0, 212, 170, .06);
}

.mode-card i,
.tool-card i,
.fill-card i {
    color: #55607a;
    transition: color .2s;
    position: relative;
}

.mode-card.active i,
.tool-card.active i,
.fill-card.active i {
    color: #00d4aa;
}

.mode-card i {
    font-size: 14px;
    margin-bottom: 10px;
    display: block;
}

.tool-card i {
    font-size: 14px;
    margin-bottom: 10px;
    display: block;
}

.fill-card i {
    font-size: 14px;
    display: block;
    margin-bottom: 10px;
}

.mode-card span,
.tool-card span,
.fill-card span {
    font-size: 10px;
    font-weight: 500;
    position: relative;
    color: #ddd;
}

.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.fill-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

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

.slider-group:last-child {
    margin-bottom: 0;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.slider-label span {
    font-size: 11px;
    color: #55607a;
}

.slider-val {
    font-size: 10px;
    color: #00d4aa;
    font-weight: 700;
    background: rgba(0, 212, 170, .1);
    padding: 1px 7px;
    border-radius: 4px;
    min-width: 28px;
    text-align: center;
}

input[type="range"] {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: #262d3d;
    border-radius: 2px;
    outline: none;
    transition: background .2s;
}

input[type="range"]:hover {
    background: #333c52;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #00d4aa;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 212, 170, .25);
    transition: transform .15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.color-row {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.cswatch {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .15s;
}

.cswatch:hover {
    transform: scale(1.12);
}

.cswatch.active {
    border-color: #00d4aa;
    box-shadow: 0 0 10px rgba(0, 212, 170, .25);
}

.custom-color-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.custom-color-row input[type="color"] {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.custom-color-row label {
    font-size: 10px;
    color: #55607a;
}

.pattern-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.pattern-preview {
    width: 100%;
    height: 80px;
    border: 1px dashed #262d3d;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
    overflow: hidden;
    position: relative;
    background: #1a1f2e;
}

.pattern-preview:hover {
    border-color: #00d4aa;
    background: rgba(0, 212, 170, .1);
}

.pattern-preview.has-img {
    border-style: solid;
    border-color: #333c52;
}

.pattern-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pattern-preview .ph {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #55607a;
    font-size: 10px;
}

.pattern-preview .ph i {
    font-size: 20px;
}

.pattern-preview .remove-img {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background: rgba(0, 0, 0, .7);
    color: #ff4757;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transition: opacity .15s;
}

.pattern-preview:hover .remove-img {
    opacity: 1;
}

.pattern-preview .remove-img:hover {
    background: #ff4757;
    color: #fff;
}

.shortcuts {
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(0, 212, 170, .03);
    border: 1px solid rgba(0, 212, 170, .06);
}

.sc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 10px;
    color: #55607a;
}

.sc-key {
    background: #1a1f2e;
    border: 1px solid #262d3d;
    padding: 0 5px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    color: #00d4aa;
    font-family: inherit;
}

.canvas-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0c0f15;
}

.canvas-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, .4) 100%);
    pointer-events: none;
    z-index: 1;
}

.canvas-wrap {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 60px rgba(0, 0, 0, .6), 0 0 0 1px #262d3d;
    z-index: 2;
}

.canvas-wrap canvas {
    display: block;
}

#overlayCanvas {
    position: absolute;
    top: 0;
    left: 0;
    cursor: crosshair;
    z-index: 3;
}

.statusbar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 26px;
    background: #12161f;
    border-top: 1px solid #262d3d;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 16px;
    font-size: 10px;
    z-index: 10;
    color: #bbb;
}

.status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #00d4aa;
    display: inline-block;
    margin-right: 3px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .4;
    }
}

.zoom-ctrl {
    position: absolute;
    bottom: 40px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 10;
}

.zbtn {
    width: 32px;
    height: 32px;
    border: 1px solid #262d3d;
    background: rgba(18, 22, 31, .9);
    color: #e4e8f0;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all .15s;
    backdrop-filter: blur(8px);
}

.zbtn:hover {
    border-color: #00d4aa;
    color: #00d4aa;
}

.zbtn:active {
    transform: scale(.93);
}

.zbtn i{
    font-size: 12px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
    backdrop-filter: blur(4px);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    width: 400px;
    background: #12161f;
    border: 1px solid #262d3d;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    transform: translateY(20px) scale(.96);
    transition: transform .25s;
    overflow: hidden;
}

.modal-overlay.open .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 18px 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 14px;
}

.modal-header h3 i {
    color: #00d4aa;
    font-size: 16px;
}

.modal-close {
    border: none;
    background: #1a1f2e;
    color: #55607a;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    padding: 5px;
}

.modal-close:hover {
    background: #ff4757;
    color: #fff;
}

.modal-close i{
    font-size: 12px;
}

.modal-body {
    padding: 16px 20px;
}

.format-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 10px;
}

.fmt-card {
    padding: 12px 6px;
    border: 1.5px solid #262d3d;
    border-radius: 10px;
    background: #1a1f2e;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
}

.fmt-card:hover {
    border-color: #333c52;
    background: #1e2436;
}

.fmt-card.active {
    border-color: #00d4aa;
    background: rgba(0, 212, 170, .1);
}

.fmt-card .fmt-name {
    font-size: 12px;
    display: block;
    color: #aaa;
    margin-bottom: 0.3rem;
}

.fmt-card .fmt-ext {
    font-size: 9px;
    color: #55607a;
    display: block;
    margin-top: 1px;
}

.modal-footer {
    padding: 0 20px 18px;
    display: flex;
}

.modal-footer .abtn {
    flex: 1;
    justify-content: center;
    padding: 10px;
}

.export-info {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: #1a1f2e;
    border-radius: 8px;
    border: 1px solid #262d3d;
}

.export-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.export-info-item .ei-label {
    font-size: 9px;
    color: #55607a;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.export-info-item .ei-value {
    font-size: 12px;
    color: #c0c8d8;
}


@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}