.sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 40;
    overflow-y: auto;
}

.sidebar.open {
    right: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 30;
}

.overlay.show {
    display: block;
}

#schema-editor {
    z-index: 50;
}

#schema-editor .modal-content {
    z-index: 51;
    width: 50% !important;
    max-width: 800px;
}

/* Reducción general de padding */
.container {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

.p-6 {
    padding: 1.1rem !important;
}

.px-4 {
    padding-left: 0.7rem !important;
    padding-right: 0.7rem !important;
}

.py-8 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

/* Ajustes para el log */
#log-area {
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
    padding: 0.7rem !important;
}

/* Ajustes para márgenes */
.mb-4 {
    margin-bottom: 0.7rem !important;
}

.mb-6 {
    margin-bottom: 1.1rem !important;
}

.mb-8 {
    margin-bottom: 1.5rem !important;
}

.mt-4 {
    margin-top: 0.7rem !important;
}

/* Estilos del modal */
.modal-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 52;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-footer {
    position: sticky;
    bottom: 0;
    background: white;
    z-index: 52;
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
}


/* Estilos para encabezados dentro de la descripción larga del script */
.long-description-content h1 {
    font-size: 1.875rem;
    /* Equivalente a text-3xl de Tailwind */
    font-weight: bold;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.long-description-content h2 {
    font-size: 1.5rem;
    /* Equivalente a text-2xl */
    font-weight: bold;
    margin-top: 0.875rem;
    margin-bottom: 0.4rem;
}

.long-description-content h3 {
    font-size: 1.25rem;
    /* Equivalente a text-xl */
    font-weight: bold;
    margin-top: 0.75rem;
    margin-bottom: 0.3rem;
}

/* Puedes añadir estilos para h4, h5, h6 si los necesitas */

.long-description-content hr {
    margin-top: 1rem;
    margin-bottom: 1rem;
    border-top-width: 1px;
}

/* Ajustes opcionales para listas y código si no usas 'prose' */
.long-description-content ul,
.long-description-content ol {
    list-style-position: inside;
    margin-left: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.long-description-content ul {
    list-style-type: disc;
}

.long-description-content ol {
    list-style-type: decimal;
}

.long-description-content pre {
    background-color: #f3f4f6;
    /* bg-gray-100 */
    padding: 0.75rem;
    border-radius: 0.25rem;
    overflow-x: auto;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.long-description-content code {
    font-family: monospace;
    /* Estilo para código en línea si es necesario */
}

/* Estilo específico para bloques de código dentro de <pre> */
.long-description-content pre code {
    background-color: transparent;
    padding: 0;
}

/* ===== LAUNCHER GUI STYLES ===== */

/* Tab Styles */
.tab-button {
    color: #6B7280;
    border-color: transparent;
    transition: all 0.2s ease;
}

.tab-button:hover {
    color: #374151;
    border-color: #D1D5DB;
}

.tab-button.active {
    color: #3B82F6;
    border-color: #3B82F6;
}

.tab-content {
    display: block;
}

.tab-content.hidden {
    display: none;
}

/* Icon Styles */
.group-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #E5E7EB;
}

.group-icon.default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.group-icon-small {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #E5E7EB;
}

.group-icon-small.default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
}

/* Category Styles */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #EFF6FF;
    color: #1D4ED8;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.category-btn {
    background: #F9FAFB;
    color: #6B7280;
    border-color: #E5E7EB;
    transition: all 0.2s ease;
}

.category-btn:hover {
    background: #F3F4F6;
    color: #374151;
    border-color: #D1D5DB;
}

.category-btn.active {
    background: #3B82F6;
    color: white;
    border-color: #3B82F6;
}

/* Script Card Styles */
.script-card {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 1rem;
    background: white;
    transition: all 0.2s ease;
    position: relative;
}

.script-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: #D1D5DB;
}

.script-card.favorited {
    border-color: #FCD34D;
    background: #FFFBEB;
}

/* Favorite Star */
.favorite-star {
    cursor: pointer;
    transition: all 0.2s ease;
}

.favorite-star:hover {
    transform: scale(1.1);
}

.favorite-star.active {
    color: #F59E0B;
}

/* History Item */
.history-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid #E5E7EB;
    background: white;
}

.history-item.success {
    border-left: 4px solid #10B981;
}

.history-item.error {
    border-left: 4px solid #EF4444;
}

.history-item.running {
    border-left: 4px solid #3B82F6;
    background: #F0F9FF;
}

/* Process control buttons */
.history-item button {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.history-item button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Favorites Panel */
.favorites-panel {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
}

.favorites-panel.empty {
    display: none;
}

/* Favorite Cards - Diseño más compacto */
.favorites-card {
    transition: all 0.2s ease;
    border: 1px solid #FCD34D;
    background: white;
}

.favorites-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #F59E0B;
}

/* Group List Item */
.group-list-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.group-list-item:hover {
    background: #F3F4F6;
}

.group-list-item.selected {
    background: #EBF8FF;
    border: 1px solid #3B82F6;
}

.group-list-item .group-info {
    margin-left: 0.75rem;
    flex: 1;
}

.group-list-item .group-name {
    font-weight: 500;
    color: #374151;
}

.group-list-item .group-category {
    font-size: 0.75rem;
    color: #6B7280;
}

/* Modal Improvements */
.modal-content {
    max-width: 90vw;
    max-height: 90vh;
}

.modal-header {
    border-bottom: 1px solid #E5E7EB;
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #E5E7EB;
    padding: 1.5rem;
}

/* Script Grid */
.scripts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #374151;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 1000;
    font-size: 0.75rem;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 50%;
    border-top-color: #3B82F6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .scripts-grid {
        grid-template-columns: 1fr;
    }

    .tab-button span {
        font-size: 0.75rem;
    }

    .tab-button svg {
        width: 1rem;
        height: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Status Indicators */
.status-success {
    color: #10B981;
}

.status-error {
    color: #EF4444;
}

.status-running {
    color: #3B82F6;
}

.status-warning {
    color: #F59E0B;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6B7280;
}

.empty-state svg {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: #D1D5DB;
}

/* Button Variants */
.btn-outline {
    border: 1px solid currentColor;
    background: transparent;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: currentColor;
    color: white;
}

/* Focus States */
.focus-visible:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Description Modal Styles */
.prose {
    color: #374151;
    line-height: 1.75;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    color: #111827;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.prose h1 {
    font-size: 1.875rem;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 0.5rem;
}

.prose h2 {
    font-size: 1.5rem;
}

.prose h3 {
    font-size: 1.25rem;
}

.prose p {
    margin-bottom: 1rem;
}

.prose ul,
.prose ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.25rem;
}

.prose code {
    background-color: #F3F4F6;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    color: #EF4444;
}

.prose pre {
    background-color: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.prose pre code {
    background: none;
    padding: 0;
    color: #374151;
}

.prose blockquote {
    border-left: 4px solid #E5E7EB;
    padding-left: 1rem;
    font-style: italic;
    color: #6B7280;
    margin: 1rem 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.prose th,
.prose td {
    border: 1px solid #E5E7EB;
    padding: 0.5rem;
    text-align: left;
}

.prose th {
    background-color: #F9FAFB;
    font-weight: 600;
}

.prose a {
    color: #3B82F6;
    text-decoration: underline;
}

.prose a:hover {
    color: #1D4ED8;
}

/* Script Card Button Improvements */
.script-card .flex.gap-1 button {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.script-card .flex.gap-1 button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Markdown Files */
.markdown-file-card {
    transition: all 0.2s ease;
    border: 1px solid #E5E7EB;
}

.markdown-file-card:hover {
    border-color: #3B82F6;
    transform: translateY(-2px);
}

/* Responsive adjustments for favorites grid */
@media (max-width: 640px) {
    .favorites-list.grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .favorites-list.grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .favorites-list.grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Button styles for favorite cards */
.favorites-card button {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.favorites-card button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Truncate text utilities */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}