.mt-20 {
    margin-top: 20px !important;
}

.content {
    width: 100%;
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.preview-container {
    width: calc(1080px * var(--letter-scale));
    height: calc(1350px * var(--letter-scale));
}

.preview-scale {
    transform: scale(var(--letter-scale));
    transform-origin: top left;
    width: calc(100% / var(--letter-scale));
    height: calc(100% / var(--letter-scale));
}

.form-container {
    width: calc(100% - calc(1080px * var(--letter-scale)) - 20px);
}

.text-area {
    background-color: transparent;
    border: none;
    color: #000000;
    resize: none;
    outline: none;
    width: 100%;
    height: auto;
    font-size: 25px;
    font-family: var(--pacifico);
    overflow: hidden;
    /*caret-color: transparent;*/
}

/* FORM */
.form {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.form-header {
    font-family: 'HelveticaNeue', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

.form-label {
    font-family: 'HelveticaNeue', sans-serif;
    font-weight: bold;
    font-size: 0.8rem;
}

/* FONT SELECT */
.font-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.font-options input[type="radio"] {
    display: none;
}

.font-option {
    cursor: pointer;
    padding: 0 12px;
    border: 1px solid var(--light);
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    flex: 0 0 calc(33.333% - 10px);
    text-align: center;
    box-sizing: border-box;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.font-option:hover {
    border-color: var(--yellow);
}

.font-options input[type="radio"]:checked + .font-option {
    border-color: var(--yellow);
    background-color: rgba(255, 193, 7, 0.1);
}

.font-bad-script { font-family: var(--bad-script); }
.font-meow-script { font-family: var(--meow-script); }
.font-momo-signature { font-family: var(--momo-signature); }
.font-pacifico { font-family: var(--pacifico); }
.font-yellow-tail { font-family: var(--yellow-tail); }

@media (max-width: 1160px) {
    .font-option {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 500px) {
    .font-option {
        flex: 0 0 100%;
    }
}



/* INPUT RANGE */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    margin-top: 5px;
    height: 6px;
    background: var(--dark);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    background: var(--light);
    border-radius: 5px;
}

input[type="range"]::-moz-range-track {
    height: 6px;
    background: var(--light);
    border-radius: 5px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--yellow);
    border: 2px solid var(--dark);
    margin-top: -5px;
    transition: transform 0.2s ease, background 0.2s ease;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--yellow);
    border: 2px solid var(--dark);
    transition: transform 0.2s ease, background 0.2s ease;
}

input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:hover::-moz-range-thumb {
    transform: scale(1.15);
    background: #ffdc73;
}

/* PAW SELECT */
.paw-select {
    margin-top: 5px;
    width: 100%;
    padding: 8px 12px;
    background-color: var(--dark);
    color: var(--light);
    border: 1px solid var(--light);
    border-radius: 4px;
    font-family: 'HelveticaNeue', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%23ffffff' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 6px;
    box-sizing: border-box;
}

.paw-select:hover {
    border-color: var(--yellow);
}

.paw-select:focus {
    outline: none;
    border-color: var(--yellow);
    box-shadow: 0 0 4px var(--yellow);
}

.paw-select option {
    background-color: var(--dark);
    color: var(--light);
}

/* TEXT INPUT */
.letter-text-input {
    width: 100%;
    padding: 8px 12px;
    background-color: var(--dark);
    color: var(--light);
    border: 1px solid var(--light);
    border-radius: 4px;
    font-family: 'HelveticaNeue', sans-serif;
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.letter-text-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.letter-text-input:hover {
    border-color: var(--yellow);
}

.letter-text-input:focus {
    outline: none;
    border-color: var(--yellow);
    box-shadow: 0 0 4px var(--yellow);
}

/* DRAG AND DROP */
.drag-and-drop-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.dropZone {
    margin-top: 5px;
    border: 2px dashed var(--light);
    border-radius: 8px;
    padding: 20px 40px;
    text-align: center;
    color: var(--light);
    background-color: var(--dark);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    font-size: 0.8rem;
}

.dropZone.dragover {
    background-color: #1a1a1a;
    border-color: var(--yellow);
}

.clearBtn {
    align-self: flex-start;
    padding: 6px 12px;
    border: 1px solid var(--light);
    border-radius: 4px;
    background-color: var(--dark);
    color: var(--light);
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.3s, color 0.3s;
}

.clearBtn:hover {
    background-color: var(--light);
    color: var(--dark);
}


/* FONTS */
.font-bad-script {
    font-family: var(--bad-script);
}

.font-meow-script {
    font-family: var(--meow-script);
}

.font-momo-signature {
    font-family: var(--momo-signature);
}

.font-pacifico {
    font-family: var(--pacifico);
}

.font-yellow-tail {
    font-family: var(--yellow-tail);
}

@media screen and (max-width: 992px) {
    .content {
        flex-direction: column;
        align-items: center;
    }

    .preview-container {
        width: 100%;
    }

    .form-container {
        width: 100%;
    }

    .preview-container {
        width: calc(1080px * var(--letter-xs-scale));
        height: calc(1350px * var(--letter-xs-scale));
    }

    .preview-scale {
        transform: scale(var(--letter-xs-scale));
        width: calc(100% / var(--letter-xs-scale));
        height: calc(100% / var(--letter-xs-scale));
    }
}

/* LOADER */
#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(24, 24, 24, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader-content {
    position: relative;
    background-color: var(--dark);
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    text-align: center;
    color: var(--light);
    font-family: 'HelveticaNeue', sans-serif;
    min-width: 250px;
}

.loader-content p {
    margin: 0;
    font-size: 1rem;
}

.loader-content::after {
    content: '';
    display: block;
    margin: 15px auto 0;
    width: 30px;
    height: 30px;
    border: 4px solid var(--light);
    border-top: 4px solid var(--yellow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.close-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--yellow);
}

/* EXPORT BUTTON */
.export-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--yellow);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.export-btn:hover {
    background-color: var(--yellow-hover);
}

.export-btn:active {
    transform: scale(0.98);
}

.export-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
