:root {
    --bg-dark: #121212;
    --surface: #1e1e1e;
    --primary: #00e5ff;
    --text: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }

body {
    font-family: system-ui, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden; /* Evita scroll en móvil */
}

/* Barra superior */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--surface);
    z-index: 10;
}
.top-bar h1 { font-size: 1.2rem; margin: 0; }
.btn-primary {
    background: var(--primary); color: #000;
    border: none; padding: 8px 16px; border-radius: 20px;
    font-weight: bold; cursor: pointer;
}

/* Espacio de trabajo (Centro) */
#workspace {
    flex-grow: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #000;
}
#bg-gif {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none; /* Que no interfiera con los toques */
}
#layers-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; /* Deja pasar los toques al fondo, salvo en los elementos */
}

/* Elementos superpuestos (Capas) */
.draggable {
    position: absolute;
    padding: 10px;
    font-size: 40px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
    pointer-events: auto;
    touch-action: none; /* Crucial para interact.js */
    border: 2px dashed transparent;
}
.draggable.active { border-color: var(--primary); }

/* Barra inferior (Herramientas) */
.bottom-bar {
    display: flex;
    justify-content: space-around;
    padding: 15px 10px 25px 10px;
    background: var(--surface);
    border-top: 1px solid #333;
    z-index: 10;
}
.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    color: var(--text);
    border: none;
    font-size: 0.8rem;
    gap: 5px;
    cursor: pointer;
}
.action-btn span { font-size: 1.5rem; }
.text-danger { color: #ff4444; }