body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #eff0f1;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.container {
    width: 1100px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.language-selector select {
    padding: 8px 12px;
    border: 2px solid #0082ff;
    border-radius: 4px;
    background-color: white;
    color: #0082ff;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}

/* Content Areas */
.content {
    padding: 15px;
    display: flex;
    flex-direction: row;
    height: 680px;
    box-sizing: border-box;
}

/* Left Controls */
.controls {
    width: 320px;
    padding-right: 15px;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
}

/* Right Preview */
.preview {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background-color: #fafafa;
    margin-left: 20px;
    padding: 10px;
    position: relative;
    overflow-y: auto;
}

/* Inputs & Labels */
label {
    font-weight: bold;
    color: #0072df;
    margin-bottom: 1px;
    display: block;
    font-size: 12px;
}

select,
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 6px 8px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

textarea {
    width: 100%;
    height: 45px;
    padding: 6px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: none;
    font-family: inherit;
    box-sizing: border-box;
    margin-bottom: 2px;
}

.row {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Botones */
button {
    cursor: pointer;
    border: none;
    border-radius: 4px;
    transition: opacity 0.2s;
}

button:hover {
    opacity: 0.9;
}

button.action-btn {
    background-color: #007ef6;
    color: white;
    padding: 6px;
    font-size: 14px;
    width: 100%;
    margin-top: 2px;
}

button.trash-btn {
    background-color: #222;
    color: white;
    padding: 5px 10px;
}

button.secondary-btn {
    background-color: #7a00ff;
    color: white;
    padding: 8px 15px;
    font-size: 14px;
}

button.action-btn.download-all {
    font-size: 11px;
    padding: 5px 6px;
    white-space: nowrap;
}

button.action-btn.download-all:hover {
    opacity: 0.9;
}

button.action-btn.download-all:disabled {
    background-color: #ccc;
    color: #888;
    cursor: not-allowed;
}

/* Recuadro y Zoom/Pan */
#img-container {
    border: 5px solid #0058fe;
    border-radius: 5px;
    overflow: hidden;
    background-color: #fff;
    transition: width 0.3s ease, height 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 640px;
    height: 360px;
    cursor: grab;
    position: relative;
}

#img-container:active {
    cursor: grabbing;
}

#img-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: center center;
    display: none;
    user-select: none;
    -webkit-user-drag: none;
}

.zoom-control {
    width: 80%;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

input[type=range] {
    width: 100%;
    cursor: pointer;
}

.copy-json-btn {
    margin-top: 12px;
    display: block;
    width: 100%;
    background-color: #7a00ff;
    color: white;
    padding: 8px 15px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s, background-color 0.2s;
}

.copy-json-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.copy-json-btn:disabled {
    background-color: #b388ff;
    cursor: not-allowed;
    opacity: 0.6;
}

#gallery-section {
    width: 100%;
    overflow: visible;
}

#gallery-thumbnails {
    scrollbar-width: thin;
    scrollbar-color: #007ef6 #eee;
    overflow-x: auto;
    min-width: 0;
}

#gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}

#gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #007ef6;
    border-radius: 3px;
}

#gallery-thumbnails::-webkit-scrollbar-track {
    background: #eee;
}

.loading-text {
    font-size: 24px;
    color: #20303a;
    display: none;
    position: absolute;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 8px;
    pointer-events: none;
}
