/* TRAITLAB v2 - Módulo de Estilos CSS */

/* Base Styles */
@font-face {
    font-family: 'ADRIAN_ZERO_FONT';
    src: url('/components/fonts/ADRIAN_ZERO.otf') format('opentype');
    font-display: swap;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'VT323', monospace;
    background: #1a1a1a;
    min-height: 100vh;
    color: #fff;
}

/* Menu Styles */
#menu-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

#menu-container .navbar {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #00ff00;
}

#menu-container .navbar-nav .nav-link {
    color: #00ff00 !important;
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

#menu-container .navbar-nav .nav-link:hover {
    color: #ffffff !important;
    text-shadow: 0 0 10px #00ff00;
}

#menu-container .navbar-text {
    color: #00ff00 !important;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    font-weight: bold;
}

#menu-container .navbar-toggler {
    border-color: #00ff00;
}

#menu-container .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 255, 0, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.token-symbol {
    color: #00ff00 !important;
    font-weight: bold;
}

.menu-spacer {
    height: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-family: 'ADRIAN_ZERO_FONT', 'VT323', monospace;
    font-size: 4.8rem;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header h1 .trait {
    color: #ffffff;
    font-family: 'ADRIAN_ZERO_FONT', 'VT323', monospace;
}

.header h1 .lab {
    color: #00ff00;
    font-family: 'ADRIAN_ZERO_FONT', 'VT323', monospace;
}

.header .subtitle {
    font-size: 1.45rem;
    color: #cccccc;
    margin-bottom: 20px;
    font-family: 'VT323', monospace;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Connect Section */
.connect-section {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-bottom: 30px;
    border: 1px solid #333;
}

.connect-btn {
    background: #00ff00;
    color: #000;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.connect-btn:hover {
    background: #00cc00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 0, 0.3);
}

/* Account Section */
.account-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.wallet-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.wallet-info strong {
    color: #fff;
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
}

.wallet-address {
    background: #2a2a2a;
    padding: 10px 15px;
    border-radius: 10px;
    color: #00ff00;
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: bold;
}

.disconnect-btn {
    background: #ff4444;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'VT323', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
}

.disconnect-btn:hover {
    background: #cc0000;
    transform: translateY(-1px);
}

/* Tokens Section */
.tokens-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #333;
}

.section-title {
    color: #00ff00;
    font-size: 2rem;
    margin-bottom: 25px;
    text-align: center;
}

/* Contract Filter */
.contract-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.contract-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid #333;
    padding: 12px 20px;
    border-radius: 8px;
    font-family: 'VT323', monospace;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.contract-btn.active {
    background: #00cc00;
}

.contract-btn:hover {
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 767px) {
    .contract-filter {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        margin-bottom: 20px;
        width: 100%;
        padding: 0 10px;
    }
    
    .contract-btn {
        width: 100%;
        padding: 15px 16px;
        font-size: 0.9rem;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00ff00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* Error/Success Messages */
.error, .success {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.success {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
}

/* Tokens Grid */
.tokens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tokens-grid.adrianlab-mobile {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.token-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #333;
    position: relative;
    padding: 15px;
}

.token-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.token-card.selected {
    border-color: #00cc00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.token-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #2a2a2a;
    position: relative;
}

.token-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #00ff00;
}

.token-id {
    font-size: 0.9rem;
    color: #ccc;
}

.token-category {
    font-size: 0.8rem;
    color: #888;
    margin-top: 5px;
}

.token-quantity-tag {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #00ff00;
    color: #000;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Responsive grid */
@media (max-width: 767px) {
    .tokens-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

/* Selection Info */
.selection-info {
    background: rgba(51, 51, 51, 0.95);
    border: 2px solid #333333;
    border-radius: 10px;
    padding: 8px;
    margin: 10px 0;
    text-align: center;
    font-family: 'VT323', monospace;
    font-size: 0.9rem;
    color: white;
    position: sticky;
    top: 20px;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

/* Side emoji menu inside selection-info */
.selection-info.with-side-menu {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    position: relative;
}

.side-emoji-menu {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 101;
    justify-self: start;
}

/* ========================================
   MEDIDAS CENTRALIZADAS - STICKY POPUP
   ======================================== */

/* Variables CSS para medidas centralizadas */
:root {
    /* Popup Botonera Lateral */
    --popup-botonera-width: 80px;
    --popup-botonera-height: 380px;
    --popup-botonera-padding: 15px;
    
    /* Popup Principal */
    --popup-principal-width: 220px; /* Imagen (180px) + padding (40px) */
    --popup-principal-height: 380px;
    --popup-principal-padding: 20px;
    
    /* Tamaños móviles (30% más pequeños) */
    --popup-botonera-width-mobile: 56px; /* 80px * 0.7 */
    --popup-botonera-height-mobile: 266px; /* 380px * 0.7 */
    --popup-principal-width-mobile: 154px; /* 220px * 0.7 */
    --popup-principal-height-mobile: 266px; /* 380px * 0.7 */
    
    /* Botones de Botonera */
    --boton-botonera-width: 80px; /* Mismo ancho que popup botonera */
    --boton-botonera-height: 40px;
    --boton-botonera-font-size: 20px;
    
    /* Botones de Acción */
    --boton-accion-width: 176px;
    
    /* Botones Contract */
    --boton-contract-width: 60px;
    
    /* Botones Emoji del Popup Lateral */
    --boton-emoji-width: 60px;
    --boton-emoji-height: 40px;
    
    /* Botones en Móvil */
    --boton-mobile-width: 28px;
    --boton-mobile-height: 28px;
    --boton-mobile-font-size: 16px;
    
    /* Imágenes Generadas */
    --imagen-max-height: 180px;
    --imagen-max-width: 100%;
    
    /* Secciones Internas - OPTIMIZADAS PARA 380px TOTAL */
    --seccion-texto-height: 40px;
    --seccion-imagen-height: 180px;
    --seccion-acciones-height: 120px;
    --seccion-accion-individual-height: 35px;
    
    /* Secciones móviles (30% más pequeñas) */
    --seccion-texto-height-mobile: 28px; /* 40px * 0.7 */
    --seccion-imagen-height-mobile: 126px; /* 180px * 0.7 */
    --seccion-acciones-height-mobile: 84px; /* 120px * 0.7 */
    --seccion-accion-individual-height-mobile: 25px; /* 35px * 0.7 */
    
    /* Gap y Espaciado - REDUCIDOS */
    --gap-popups: 15px;
    --gap-botones: 8px;
    --gap-secciones: 8px;
}

/* MODAL PRINCIPAL CON DOS POPUPS LADO A LADO */
.sticky-modal-container {
    position: fixed !important;
    top: 100px !important; /* Padding superior para evitar solapamiento con menú */
    right: 20px !important;
    z-index: 1000 !important;
    display: none !important; /* Oculto por defecto, se muestra al hacer click */
    gap: var(--gap-popups) !important;
    align-items: flex-start !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
}

/* Mostrar popup cuando se selecciona un token */
.sticky-modal-container.show {
    display: flex !important;
}

/* Permitir clics a través de zonas transparentes del overlay (click-through) */
.sticky-modal-container {
    pointer-events: none !important; /* Overlay no captura eventos por defecto */
}

/* Mantener clicables los elementos interactivos dentro del overlay */
.sticky-side-menu-popup,
.sticky-content-popup,
.visntent-popup,
.sticky-side-menu-popup *,
.sticky-content-popup *,
.visntent-popup * {
    pointer-events: auto !important;
}

/* POPUP IZQUIERDO: Menú lateral */
.sticky-side-menu-popup {
    background: transparent !important; /* Fondo transparente */
    border: none !important; /* Quitar reborde */
    border-radius: 12px !important;
    padding: var(--popup-botonera-padding) !important;
    min-height: var(--popup-botonera-height) !important;
    width: var(--popup-botonera-width) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    box-sizing: border-box !important;
    position: relative !important;
}

/* POPUP DERECHO: Contenido principal - ALTURA FIJA 380px */
.visntent-popup {
    background: transparent !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px !important; /* Padding reducido */
    height: var(--popup-principal-height) !important; /* Altura fija, no min-height */
    width: var(--popup-principal-width) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: var(--gap-secciones) !important;
    box-sizing: border-box !important;
    position: relative !important;
    margin: 0 !important;
    overflow: hidden !important; /* Evitar desbordamiento */
}

/* Hacer click-through el área transparente del popup lateral */
.sticky-side-menu-popup { pointer-events: none !important; }
.sticky-side-menu-popup .side-emoji-menu,
.sticky-side-menu-popup .side-emoji-menu * { pointer-events: auto !important; }

/* Hacer click-through zonas transparentes del área de acciones del popup derecho */
.sticky-actions { pointer-events: none !important; width: 100% !important; }
.sticky-actions .action-btn,
.sticky-actions button,
.sticky-actions a { width: 100% !important; }
.sticky-actions .action-btn,
.sticky-actions button,
.sticky-actions a,
.sticky-actions input,
.sticky-actions select,
.sticky-actions textarea { pointer-events: auto !important; }

/* Optimización para modo sticky (mantener compatibilidad) */
.selection-info.sticky.with-side-menu {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    padding: 15px 20px 15px 15px;
    min-height: 400px; /* Altura fija para evitar saltos */
}

/* Sección de texto (nueva estructura) - ALTURA FIJA */
.sticky-text {
    text-align: center;
    height: var(--seccion-texto-height);
    width: 180px; /* Ancho fijo de 180px */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* No se reduce */
}

/* Sección de imagen (nueva estructura) - ALTURA FIJA */
.sticky-image {
    height: var(--seccion-imagen-height);
    width: 180px; /* Ancho fijo de 180px */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0; /* No se reduce */
}

/* Imagen dentro de sticky-image (nueva estructura) */
.sticky-image img {
    max-width: var(--imagen-max-width);
    max-height: var(--imagen-max-height);
    border-radius: 8px;
    object-fit: contain;
}

/* Sección de acciones (nueva estructura) - ALTURA FIJA */
.sticky-actions {
    height: var(--seccion-acciones-height);
    width: 180px; /* Ancho fijo de 180px */
    display: flex;
    flex-direction: column;
    gap: 6px; /* Gap reducido */
    padding: 0;
    margin: 0;
    overflow-y: auto; /* Scroll si es necesario */
    flex-shrink: 0; /* No se reduce */
}

/* Secciones de acción individuales (nueva estructura) - ALTURA FIJA */
.action-section {
    min-height: var(--seccion-accion-individual-height);
    width: 180px; /* Ancho fijo de 180px */
    display: flex;
    flex-direction: column;
    gap: 4px; /* Gap reducido */
    padding: 4px 0; /* Padding reducido */
    border-radius: 6px;
    background: rgba(0, 255, 0, 0.05);
    border: none; /* Sin borde como solicitado */
    flex-shrink: 0; /* No se reduce */
}

/* Mejorar visualización de elementos en modo sticky */
.selection-info.sticky .side-emoji-menu {
    grid-column: 1;
    justify-self: start;
}



/* Contenido principal en columna derecha */
.selection-info.sticky .selection-text {
    grid-column: 2;
    text-align: center;
    min-height: 60px; /* Altura fija */
    display: flex;
    align-items: center;
    justify-content: center;
}

.selection-info.sticky .generated-image {
    grid-column: 2;
    margin: 10px 0;
    text-align: center;
    min-height: 200px; /* Altura fija */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selection-info.sticky .actions-grid {
    grid-column: 2;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 80px; /* Altura fija */
}

.selection-info.sticky .action-btn {
    width: var(--boton-accion-width);
    text-align: center;
}

/* Secciones específicas en columna derecha */
.selection-info.sticky .sticky-hidden {
    grid-column: 2;
    text-align: center;
}

.selection-info.sticky .traits-actions-section {
    grid-column: 2;
    text-align: center;
}

.selection-info.sticky .erc721-actions-section {
    grid-column: 2;
    text-align: center;
}

/* Responsive para móviles */
@media (max-width: 767px) {
    .selection-info.sticky {
        max-width: 90vw;
        min-width: 320px;
        right: 5vw;
        left: 5vw;
    }
    
    .selection-info.sticky.with-side-menu {
        grid-template-columns: 40px 1fr;
        gap: 8px;
        padding: 12px 15px 12px 12px;
    }
    
    .selection-info.sticky .side-emoji-menu .contract-btn {
        width: var(--boton-mobile-width);
        height: var(--boton-mobile-height);
        font-size: var(--boton-mobile-font-size);
    }
    
    /* Botones emoji del popup en móvil (30% más pequeños) */
    .sticky-side-menu-popup .side-emoji-menu .contract-btn {
        width: 28px !important; /* 40px * 0.7 */
        height: 28px !important; /* 40px * 0.7 */
        font-size: 14px !important; /* 20px * 0.7 */
    }
    
    /* Ajustes para sticky-content en móviles */
    .selection-info.sticky .sticky-content {
        min-height: 300px;
        gap: 12px;
    }
    
    /* Ajustes para sticky-image en móviles */
    .selection-info.sticky .sticky-image {
        width: 100% !important;
        min-height: 140px !important;
    }
    
    .selection-info.sticky .sticky-image img {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        max-width: 100% !important;
    }
    
    /* Ajustes para sticky-actions en móviles */
    .selection-info.sticky .sticky-actions {
        min-height: 60px;
        gap: 8px;
    }
    
    .selection-info.sticky .action-section {
        min-height: 35px;
        padding: 6px 0;
    }

    /* RESPONSIVE PARA NUEVA ESTRUCTURA DE DOS POPUPS - MÓVIL */
    .sticky-modal-container {
        flex-direction: row; /* Mantener lado a lado en móvil */
        gap: 8px; /* Gap reducido */
        top: 80px; /* Menos padding superior en móvil */
        right: 10px;
        left: 10px;
        justify-content: center; /* Centrar los popups */
    }
    
    .sticky-side-menu-popup {
        width: var(--popup-botonera-width-mobile) !important; /* 30% más pequeño */
        height: var(--popup-botonera-height-mobile) !important; /* 30% más pequeño */
        flex-direction: column; /* Mantener vertical en móvil */
        gap: 6px; /* Gap reducido */
        padding: 8px; /* Padding reducido */
    }
    
    .sticky-content-popup {
        width: var(--popup-principal-width-mobile) !important; /* 30% más pequeño */
        height: var(--popup-principal-height-mobile) !important; /* 30% más pequeño */
        padding: 8px; /* Padding reducido */
        gap: 6px; /* Gap reducido */
    }
    
    /* Ajustes para elementos internos en móviles (30% más pequeños) */
    .sticky-text {
        height: var(--seccion-texto-height-mobile) !important;
        width: 126px !important; /* 180px * 0.7 */
    }
    
    .sticky-image {
        height: auto !important;
        width: 100% !important; /* Ocupa todo el ancho del popup */
        min-height: 140px !important;
    }
    
    .sticky-image img {
        width: 100% !important; /* Misma anchura que el popup */
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
    }
    
    .sticky-actions {
        height: auto !important;
        width: 100% !important; /* Ajustar al popup */
        gap: 6px !important;
    }
    
    .action-section {
        min-height: var(--seccion-accion-individual-height-mobile) !important;
        width: 100% !important;
        padding: 4px 0; /* Padding reducido */
    }
}

/* Botones generales del side-emoji-menu (NO del popup) */
.side-emoji-menu .contract-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border-radius: 6px;
    border: 1px solid #333;
    background: #333;
    color: #fff;
    margin: 4px 0;
}

/* Estilos específicos para el menú lateral en el popup izquierdo */
.sticky-side-menu-popup .side-emoji-menu {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--gap-botones) !important;
    width: 100% !important;
    align-items: center !important;
}

/* Botones emoji específicos del popup lateral - ALTA ESPECIFICIDAD */
.sticky-side-menu-popup .side-emoji-menu .contract-btn {
    width: var(--boton-emoji-width) !important;
    height: var(--boton-emoji-height) !important;
    font-size: var(--boton-botonera-font-size) !important;
    border-radius: 8px !important;
    border: 2px solid #333 !important;
    background: #333 !important;
    color: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: all 0.3s ease !important;
    min-width: unset !important; /* Anular min-width del estilo general */
}

.sticky-side-menu-popup .side-emoji-menu .contract-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3) !important;
    border-color: #00ff00 !important;
}

.sticky-side-menu-popup .side-emoji-menu .contract-btn.active {
    background: #00ff00 !important;
    color: #000 !important;
    border-color: #00ff00 !important;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5) !important;
}

.side-emoji-menu .contract-btn.active {
    background: #00cc00;
    color: #000;
}

.side-emoji-menu .contract-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}



.selection-info.with-side-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.selection-info .selection-text {
    flex: 1;
    text-align: left;
}

/* Imagen generada antigua - usar variables CSS */
.selection-info .generated-image img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
}

.selection-info .image-loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    padding: 20px;
}

/* Loading overlay con posición absoluta para no mover elementos */
.sticky-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'VT323', monospace;
}

/* ESTILO DUPLICADO ELIMINADO - Usar el consolidado arriba */

/* COMPATIBILIDAD: Usar variables CSS centralizadas */
.selection-info.sticky .sticky-content {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: var(--gap-secciones);
    min-height: calc(var(--popup-principal-height) - 40px);
    padding: 0;
    margin: 0;
}

.selection-info.sticky .sticky-text {
    min-height: var(--seccion-texto-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

.selection-info.sticky .sticky-image {
    min-height: var(--seccion-imagen-height);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}

.selection-info.sticky .sticky-image img {
    max-width: var(--imagen-max-width);
    max-height: var(--imagen-max-height);
    border-radius: 8px;
    object-fit: contain;
}

.selection-info.sticky .sticky-actions {
    min-height: var(--seccion-acciones-height);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    margin: 0;
}

.selection-info.sticky .action-section {
    min-height: var(--seccion-accion-individual-height);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
    border-radius: 6px;
    background: rgba(0, 255, 0, 0.05);
    border: none; /* Sin borde como solicitado */
}



.selection-info.sticky .sticky-hidden {
    display: none;
}

.selection-info.sticky .selected-traits-title,
.selection-info.sticky .traits-container {
    display: none;
}

.selection-info.sticky {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 420px;
    min-width: 300px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00ff00;
    box-sizing: border-box;
}

.selection-info.sticky .selection-text {
    display: none;
}

.selection-info.sticky .generated-image {
    text-align: center;
    margin: 10px 0;
}

/* Imagen sticky antigua - usar variables CSS */
.selection-info.sticky .generated-image img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 10px;
}

.selection-info.sticky .traits-actions-section {
    margin-top: 10px;
}

.selection-info.sticky .action-btn {
    background: #00ff00;
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    font-family: 'VT323', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    margin: 2px;
    transition: all 0.3s ease;
    width: var(--boton-accion-width);
}

.selection-info.sticky .action-btn:hover {
    background: #00cc00;
    transform: translateY(-1px);
}

/* Botones Zoom y Commit lado a lado */
.zoom-commit-buttons {
    display: flex;
    gap: 4px;
    width: 100%;
}

.zoom-commit-buttons .action-btn {
    flex: 1;
    width: auto;
    margin: 2px 0;
    font-size: 0.8rem;
    padding: 1px 8px;
}

.zoom-commit-buttons .zoom-btn {
    background: #00ff00;
    color: #000;
}

.zoom-commit-buttons .commit-btn {
    background: #ff8800;
    color: #000;
}

.zoom-commit-buttons .zoom-btn:hover {
    background: #00cc00;
}

.zoom-commit-buttons .commit-btn:hover {
    background: #ff6600;
}







/* Form controls */
.form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    font-family: 'VT323', monospace;
    margin-bottom: 10px;
}

.form-control::placeholder {
    color: #888;
}

/* Responsive selection-info */
@media (max-width: 767px) {
    .selection-info.sticky {
        position: fixed;
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Crafting Styles */
.crafting-container {
    padding: 20px;
}

.crafting-section {
    margin-bottom: 30px;
}

.crafting-section h3 {
    color: #00ff00;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.recipe-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.recipe-card:hover {
    border-color: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.recipe-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.recipe-header h4 {
    color: #00ff00;
    margin-bottom: 5px;
}

.recipe-type {
    color: #888;
    font-size: 0.9rem;
}

.recipe-ingredients, .recipe-output {
    margin-bottom: 15px;
}

.recipe-ingredients h5, .recipe-output h5 {
    color: #fff;
    margin-bottom: 10px;
}

.recipe-ingredient {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    margin: 5px 0;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
}

.trait-id {
    color: #00ff00;
}

.trait-required {
    color: #888;
}

.output-info {
    background: rgba(0, 255, 0, 0.1);
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #00ff00;
}

.traits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.trait-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.trait-card:hover {
    border-color: #00ff00;
    transform: translateY(-2px);
}

.trait-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 8px;
}

.trait-info {
    text-align: center;
}

.trait-title {
    color: #00ff00;
    font-size: 0.9rem;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trait-id {
    color: #888;
    font-size: 0.8rem;
}

.loading-recipes, .no-recipes, .no-traits {
    text-align: center;
    padding: 40px;
    color: #666;
}

.traits-placeholder {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Responsive crafting */
@media (max-width: 767px) {
    .recipes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .traits-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
}

/* Responsive wallet section */
@media (max-width: 767px) {
    .connect-section {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .account-section {
        padding: 20px 15px;
        margin: 20px;
    }
    
    .wallet-info {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        text-align: center;
    }
    
    .wallet-info strong {
        display: block;
        margin-bottom: 10px;
    }
    
    .wallet-address {
        text-align: center;
        word-break: break-all;
    }
    
    .disconnect-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 1.1rem;
    }
    
    .connect-btn {
        width: 100%;
        max-width: 300px;
        padding: 18px 30px;
        font-size: 1.3rem;
    }
}

/* Responsive selection-info */
@media (min-width: 768px) {
    .selection-info {
        max-width: none;
        margin: 10px auto;
    }
    
    .selection-info .selection-text {
        display: block;
    }
    
    .selection-info .generated-image img {
        max-width: 300px;
        height: auto;
    }
    
    .selection-info .image-loading-overlay {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 767px) {
    .selection-info {
        max-width: 50%;
        margin: 10px auto;
    }
    
    .selection-info.with-side-menu {
        padding-left: 56px;
    }
    
    .side-emoji-menu {
        left: 6px;
        gap: 6px;
    }
    

    
    .selection-info .selection-text {
        display: none;
    }
    
    .selection-info .generated-image img {
        max-width: 210px;
        height: auto;
    }
    
    .selection-info .image-loading-overlay {
        width: 210px;
        height: 210px;
    }
}



/* Generated Image */
.generated-image {
    margin: 20px 0;
    text-align: center;
}

.generated-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.image-loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    color: white;
    font-family: 'VT323', monospace;
}

.pixelated-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid #00ff00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

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

/* Action buttons */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.action-btn {
    background: #00cc00;
    color: black;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'VT323', monospace;
    transition: all 0.3s ease;
    width: var(--boton-accion-width);
}

.action-btn:hover {
    background: #00aa00;
    transform: translateY(-1px);
}

.apply-traits-btn {
    background: #00cc00;
    color: black;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'VT323', monospace;
    margin: 5px;
    transition: all 0.3s ease;
}

.apply-traits-btn:hover {
    background: #00aa00;
    transform: translateY(-1px);
}

.apply-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-family: 'VT323', monospace;
}

.apply-status.success {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    border: 1px solid #00ff00;
}

.apply-status.error {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
    border: 1px solid #ff0000;
}

/* Animación para nombres actualizados */
.name-updated {
    animation: nameUpdate 0.5s ease-in-out;
}

@keyframes nameUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background: rgba(0, 255, 0, 0.1); }
    100% { transform: scale(1); }
}

/* Indicador de carga progresiva */
.token-card.loading {
    opacity: 0.7;
    position: relative;
}

.token-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.1), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== ESTILOS PIXELADOS PARA MENSAJES DE ESTADO ===== */

/* Contenedor principal pixelado */
.pixelated {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 3px solid #00cc00;
    border-radius: 0;
    font-family: 'VT323', monospace;
    color: #00cc00;
    text-shadow: 0 0 10px #00cc00;
    box-shadow: 0 0 20px rgba(0, 204, 0, 0.3);
    margin: 20px;
}

/* Icono pixelado */
.pixel-icon {
    font-size: 48px;
    margin-bottom: 20px;
    animation: pixel-glow 2s ease-in-out infinite alternate;
}

/* Título pixelado */
.pixel-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: pixel-flicker 3s linear infinite;
}

/* Subtítulo pixelado */
.pixel-subtitle {
    font-size: 16px;
    color: #00ff00;
    margin-bottom: 20px;
    opacity: 0.8;
}

/* Borde animado pixelado */
.pixel-border {
    width: 100%;
    height: 3px;
    background: repeating-linear-gradient(
        90deg,
        #00cc00 0px,
        #00cc00 10px,
        transparent 10px,
        transparent 20px
    );
    animation: pixel-move 2s linear infinite;
}

/* Spinner pixelado */
.pixel-spinner {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.spinner-dot {
    width: 12px;
    height: 12px;
    background: #00cc00;
    border-radius: 0;
    animation: pixel-bounce 1.4s ease-in-out infinite both;
}

.spinner-dot:nth-child(1) { animation-delay: -0.32s; }
.spinner-dot:nth-child(2) { animation-delay: -0.16s; }
.spinner-dot:nth-child(3) { animation-delay: 0s; }

/* Animaciones pixeladas */
@keyframes pixel-glow {
    0% { text-shadow: 0 0 10px #00cc00; }
    100% { text-shadow: 0 0 20px #00cc00, 0 0 30px #00cc00; }
}

@keyframes pixel-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes pixel-move {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes pixel-bounce {
    0%, 80%, 100% { 
        transform: scale(0);
        background: #00cc00;
    }
    40% { 
        transform: scale(1);
        background: #00ff00;
    }
}

/* Responsive para mensajes pixelados */
@media (max-width: 768px) {
    .pixelated {
        padding: 20px 10px;
        margin: 10px;
    }
    
    .pixel-title {
        font-size: 18px;
    }
    
    .pixel-subtitle {
        font-size: 14px;
    }
    
    .pixel-icon {
        font-size: 36px;
    }
}

/* Placeholder Styles for Loading Sensation */
.token-card.placeholder {
    opacity: 0.7;
    animation: placeholder-pulse 2s ease-in-out infinite;
}

.placeholder-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(45deg, #2a2a2a, #3a3a3a);
    border: 2px solid #00ff00;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.placeholder-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.2), transparent);
    animation: shimmer 2s infinite;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top: 3px solid #00ff00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.placeholder-text {
    color: #888;
    font-style: italic;
    animation: placeholder-text-pulse 1.5s ease-in-out infinite;
}

@keyframes placeholder-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

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

@keyframes placeholder-text-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Name Update Animation */
.token-card.name-updated {
    animation: name-update-glow 1s ease-in-out;
}

@keyframes name-update-glow {
    0% { 
        box-shadow: 0 0 0 rgba(0, 255, 0, 0);
        border-color: #00ff00;
    }
    50% { 
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
        border-color: #00ff00;
    }
    100% { 
        box-shadow: 0 0 0 rgba(0, 255, 0, 0);
        border-color: #00ff00;
    }
}

/* 🚨 NUEVO: Estilos para loading wheels en tokens */
.token-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 10;
    transition: opacity 0.5s ease;
}

.token-loading-overlay .loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #22c55e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 8px;
}

.token-loading-overlay .loading-text {
    color: white;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

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

/* Lambo Color Selector Styles */
.lambo-selection {
    padding: 20px;
    text-align: center;
}

.lambo-selection h3 {
    color: #00ff00;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.lambo-selection h4 {
    color: #ffffff;
    margin: 15px 0 10px 0;
    font-size: 1.2rem;
}

.selected-token {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 20px;
    color: #00ff00;
}

.color-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.lambo-color-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #333;
    border-radius: 8px;
    padding: 10px;
    color: #fff;
    font-family: 'VT323', monospace;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lambo-color-btn:hover {
    border-color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.2);
}

.lambo-color-btn.selected {
    border-color: #00ff00;
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 0 2px rgba(0, 255, 0, 0.3);
}

.lambo-color-btn:active {
    transform: translateY(0);
}

/* Responsive design for color buttons */
@media (max-width: 768px) {
    .color-buttons {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .lambo-color-btn {
        padding: 8px;
        font-size: 0.9rem;
    }
}

/* Lambo Modal Styles */
.lambo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lambo-modal-content {
    background: #1a1a1a;
    border: 2px solid #00ff00;
    border-radius: 15px;
    width: 70vw;
    max-width: 900px; /* Reducido para no bloquear tanto */
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: lamboModalSlideIn 0.3s ease-out;
}

@keyframes lamboModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.lambo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #333;
}

.lambo-modal-header h3 {
    color: #00ff00;
    margin: 0;
    font-size: 1.5rem;
}

.lambo-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.lambo-modal-close:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
}

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

.selected-token-info {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #00ff00;
    text-align: center;
    font-size: 1.1rem;
}

.lambo-color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.lambo-color-grid .lambo-color-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #333;
    border-radius: 8px;
    padding: 10px;
    color: #fff;
    font-family: 'VT323', monospace;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 45px;
}

.lambo-color-grid .lambo-color-btn:hover {
    border-color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.2);
}

.lambo-color-grid .lambo-color-btn.selected {
    border-color: #00ff00;
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 0 2px rgba(0, 255, 0, 0.3);
}

.lambo-preview {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lambo-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 2px solid #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.lambo-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #00ff00;
}

.lambo-loading .pixelated-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top: 3px solid #00ff00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.lambo-loading p {
    margin: 0;
    font-size: 1.1rem;
}

/* Responsive design for Lambo modal */
@media (max-width: 768px) {
    .lambo-modal {
        padding: 10px;
    }
    
    .lambo-modal-content {
        width: 95vw;
        max-height: 85vh;
    }
    
    .lambo-color-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .lambo-color-grid .lambo-color-btn {
        padding: 8px;
        font-size: 0.9rem;
        min-height: 40px;
    }
    
    .lambo-modal-header h3 {
        font-size: 1.2rem;
    }
    
    .lambo-preview {
        min-height: 120px;
        margin-top: 15px;
    }
}

/* Customise Modal Styles */
.customise-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.customise-modal-content {
    background: #1a1a1a;
    border: 2px solid #00ff00;
    border-radius: 15px;
    width: 70vw;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: customiseModalSlideIn 0.3s ease-out;
}

@keyframes customiseModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.customise-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #333;
}

.customise-modal-header h3 {
    color: #00ff00;
    margin: 0;
    font-size: 1.5rem;
}

.customise-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.customise-modal-close:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
}

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

.customise-modal-body .selected-token-info {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #00ff00;
    text-align: center;
    font-size: 1.1rem;
}

.customise-preview {
    width: 100%;
    text-align: center;
    margin: 20px 0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
}

.customise-preview img {
    max-width: 100%;
    max-height: 300px;
    height: auto;
    border-radius: 10px;
    border: 2px solid #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.customise-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #00ff00;
}

.customise-loading .pixelated-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top: 3px solid #00ff00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.customise-loading p {
    margin: 0;
    font-size: 1.1rem;
}

.customise-toggles,
.customise-rename {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.customise-toggles h4,
.customise-rename h4 {
    color: #00ff00;
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

.toggle-buttons,
.rename-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.toggle-buttons .action-btn,
.rename-buttons .action-btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

/* El botón de commit ocupa toda la fila */
.toggle-buttons .commit-btn {
    grid-column: 1 / -1;
}

.rename-input {
    margin-bottom: 15px;
}

/* Responsive design for Customise modal */
@media (max-width: 768px) {
    .customise-modal {
        padding: 10px;
    }
    
    .customise-modal-content {
        width: 95vw;
        max-height: 90vh;
    }
    
    .customise-modal-header h3 {
        font-size: 1.2rem;
    }
    
    .customise-preview {
        min-height: 150px;
        padding: 15px;
    }
    
    .customise-preview img {
        max-height: 200px;
    }
    
    /* En móvil, mantener 2 columnas pero ajustar tamaño */
    .toggle-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .toggle-buttons .action-btn {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
    
    .toggle-buttons .commit-btn {
        grid-column: 1 / -1;
    }
}
