/* ==========================================================================
   ESTILOS GENERALES Y CONFIGURACIÓN PREMIUM - KROWSOLUTIONS
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Azeret Mono', monospace, sans-serif;
}

body {
    background-color: #1a1a1a;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* NAVBAR */
.navbar {
    background-color: #111111;
    padding: 15px 40px;
    border-bottom: 2px solid #ffcc00;
}

.brand-logo {
    color: #ffcc00;
    font-size: 24px;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* CONTENEDOR PRINCIPAL Y ESTRUCTURA EN DUAL PANEL */
.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.app-layout {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    min-height: 75vh;
    width: 100%;
}

/* PANEL LATERAL IZQUIERDO */
.left-sidebar {
    width: 320px;
    flex-shrink: 0;
    background-color: #111111;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tool-title {
    font-size: 28px;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffcc00;
}

.tool-description {
    color: #aaaaaa;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.panel-box {
    display: none;
    width: 100%;
}

.panel-box.active {
    display: block;
}

/* PANEL DERECHO DE CONTENIDO */
.right-content {
    flex-grow: 1;
    background-color: #222222;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 25px;
    min-height: 500px;
    box-sizing: border-box;
}

.content-state {
    display: none;
    width: 100%;
}

.content-state.active {
    display: block;
}

/* ZONA DE CARGA */
.drop-zone {
    border: 2px dashed #444444;
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 40px 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.drop-zone.dragover {
    border-color: #ffcc00;
    background-color: #2a2a2a;
}

.drag-text {
    color: #666666;
    font-size: 12px;
}

/* TARJETA DE ESTADÍSTICAS */
.stats-card {
    background-color: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-label { color: #aaaaaa; }
.stat-value { color: #ffcc00; font-weight: bold; }

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* BOTONES PREMIUM */
.btn-yellow {
    background-color: #ffcc00;
    color: #000000;
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-block;
}

.btn-yellow:hover {
    background-color: #e6b800;
}

.btn-success {
    background-color: #28a745;
    color: #ffffff;
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 13px;
    transition: background 0.2s;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-secondary {
    background-color: #333333;
    color: #ffffff;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 5px;
    border: 1px solid #444444;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background-color: #444444;
}

.btn-full {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.btn-outline-reset {
    background-color: transparent;
    color: #aaaaaa;
    border: 1px solid #333333;
}

.btn-outline-reset:hover {
    background-color: #1a1a1a;
    color: #ffffff;
}

/* ESTADO VACÍO (PLACEHOLDER) */
.placeholder-box {
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #333333;
    border-radius: 8px;
    color: #666666;
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

/* REJILLA DE VISTA PREVIA INTERACTIVA */
.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333333;
    font-size: 14px;
    color: #ffffff;
}

.drag-hint {
    color: #aaaaaa;
    font-size: 12px;
}

.grid-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    width: 100%;
}

.preview-card {
    background-color: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: grab;
    transition: border-color 0.2s;
}

.preview-card:active {
    cursor: grabbing;
}

.preview-card img {
    width: 100%;
    height: 110px;
    object-fit: contain;
    background-color: #111111;
    border-radius: 4px;
    margin-bottom: 8px;
}

.file-name {
    font-size: 11px;
    color: #aaaaaa;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.btn-delete-img {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #b7321a;
    color: #ffffff;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* PANTALLA DE CARGA (ANIMACIÓN SPIN) */
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    gap: 25px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #333333;
    border-top: 6px solid #ffcc00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.did-you-know-box {
    background-color: #1a1a1a;
    border-left: 4px solid #ffcc00;
    padding: 25px;
    border-radius: 0 8px 8px 0;
    max-width: 600px;
    width: 100%;
}

.did-you-know-box h3 {
    color: #ffcc00;
    margin-bottom: 10px;
    font-size: 16px;
}

.did-you-know-box p {
    color: #cccccc;
    font-size: 13px;
    line-height: 1.6;
}

/* PUBLICIDAD MONETAG */
.ad-space-banner {
    width: 100%;
    min-height: 90px;
    background-color: rgba(0,0,0,0.2);
    border: 1px dashed #333333;
    margin-top: auto;
    border-radius: 6px;
}

.ad-space-large {
    width: 100%;
    max-width: 600px;
    min-height: 120px;
    background-color: rgba(0,0,0,0.2);
    border: 1px dashed #333333;
    border-radius: 6px;
}

.clickable-label {
    display: inline-block;
    cursor: pointer;
}

/* RESPONSIVO PARA MÓVILES */
@media (max-width: 850px) {
    .app-layout {
        flex-direction: column;
    }
    .left-sidebar {
        width: 100%;
    }
    .right-content {
        width: 100%;
    }
}

/* ==========================================================================
   AJUSTE ULTRACOMPACTO PARA MONETAG IN-PAGE PUSH EN MÓVILES
   ========================================================================== */
@media (max-width: 768px) {
    /* Reduce el contenedor flotante al 65% de su tamaño original */
    div[class*="monetag"], 
    div[id*="monetag"],
    div[style*="z-index: 2147483647"] {
        max-width: 75% !important;           /* Limita el ancho horizontal */
        transform: scale(0.68) !important;   /* Reduce el tamaño global al 68% */
        transform-origin: bottom center !important; /* Mantiene la animación anclada abajo */
        margin: 0 auto !important;
    }

    /* Reduce la imagen/icono publicitario interno */
    div[style*="z-index: 2147483647"] img {
        max-width: 35px !important; 
        height: auto !important;
    }

    /* Tipografía ultra discreta y legible */
    div[style*="z-index: 2147483647"] span,
    div[style*="z-index: 2147483647"] p {
        font-size: 10px !important;
        line-height: 1.1 !important;
    }
}