/* Variables y reset */
:root {
    --primary-color: #007cba;
    --success-color: #28a745;
    --gray-light: #f8f9fa;
    --border-color: #e0e0e0;
    --text-color: #333;
    --text-light: #666;
}

/* Contenedor principal de pestañas (ancho completo sin padding) */
.tmabot-ai-tabs-wrap {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 auto;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ===== BARRA DE CRÉDITOS COMPACTA (UNA SOLA LÍNEA CON SCROLL) ===== */
.tmabot-user-info-compact {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    background: var(--gray-light);
    padding: 8px 16px !important;
    margin: 0 0 20px 0 !important;
    border-radius: 40px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    border-left: 4px solid var(--primary-color); /* se sobrescribe inline */
}

.tmabot-user-info-compact .user-info-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 20px;
    width: 100%;
}

/* Elementos dentro de la barra */
.plan-badge {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 30px;
    color: white;
    flex-shrink: 0;
    background-color: var(--primary-color);
}

.credit-item.compact {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: white;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.credit-item.compact strong {
    margin: 0 2px;
}

.buy-pack-btn.mini {
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 1;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}
.buy-pack-btn.mini:hover {
    background: #005a87;
}

.upgrade-link {
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 4px 12px;
    border-radius: 30px;
    background: rgba(0,124,186,0.1);
}
.upgrade-link:hover {
    text-decoration: underline;
}

/* Eliminamos el wrap en móvil, forzamos scroll */
@media (max-width: 768px) {
    .tmabot-user-info-compact {
        border-radius: 40px !important;
    }
    .tmabot-user-info-compact .user-info-row {
        flex-wrap: nowrap !important;
    }
}

/* ===== FIN BARRA DE CRÉDITOS ===== */

/* Navegación de pestañas (ahora en sidebar) - pero mantenemos por si acaso */
.tmabot-ai-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.tab-link {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s;
    white-space: nowrap;
    border-radius: 8px 8px 0 0;
}
.tab-link.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: -2px;
    background: rgba(0,124,186,0.05);
}
.tab-link:hover {
    color: var(--primary-color);
    background: rgba(0,124,186,0.02);
}

/* Contenido de pestañas */
.tmabot-ai-tab-content {
    display: none;
}
.tmabot-ai-tab-content.active {
    display: block;
}

/* Ajuste para que los generadores internos mantengan su centrado */
.tmabot-ai-tab-content .premium-generator {
    margin-left: auto;
    margin-right: auto;
}

/* Grid de imágenes */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
@media (max-width: 768px) {
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.gallery-item:hover {
    transform: scale(1.02);
}
.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 1/1;
}
.infinite-scroll-trigger {
    height: 10px;
    margin: 20px 0;
}

/* Chat */
.chat-messages {
    height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    background: #fafafa;
}
.message {
    margin-bottom: 12px;
    padding: 10px 16px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.5;
}
.message.user {
    background: var(--primary-color);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}
.message.bot {
    background: #e9ecef;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}
.chat-input {
    display: flex;
    gap: 10px;
}
#chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
}
#chat-send {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}
#chat-send:hover {
    background: #005a87;
}

/* Generadores individuales */
.tmabot-image-generator,
.tmabot-tts,
.tmabot-video,
.tmabot-article {
    max-width: 800px;
    margin: 0 auto;
}
input[type="text"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}
input[type="text"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0,124,186,0.1);
}
button {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: background 0.2s;
}
button:hover {
    background: #005a87;
}
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.error {
    color: #dc3545;
    font-weight: 500;
    margin-top: 10px;
}

/* Badges */
.sora-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 30px;
    display: inline-block;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.gpt5-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 30px;
    display: inline-block;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Resultados */
.image-result img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.video-result video {
    width: 100%;
    border-radius: 8px;
    margin-top: 15px;
}
.article-content {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    line-height: 1.8;
}

/* Botones de acción para resultados */
.image-actions,
.audio-actions,
.video-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}
.image-actions button,
.audio-actions button,
.video-actions button {
    padding: 8px 16px;
    font-size: 14px;
}

/* Progreso para imagen, TTS y video */
.image-progress,
.tts-progress,
.video-progress {
    margin-top: 20px;
    text-align: center;
}
.progress-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}
.progress-fill {
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    animation: progress-stripes 1.5s infinite;
}
@keyframes progress-stripes {
    0% { background-position: 0 0; }
    100% { background-position: 30px 0; }
}
.progress-text {
    color: var(--text-light);
    font-size: 14px;
}

/* Historial */
.tmabot-history-section {
    margin-top: 40px;
    border-top: 2px solid var(--border-color);
    padding-top: 20px;
}
.tmabot-history-section h3 {
    margin-bottom: 20px;
    color: var(--text-color);
}
.tmabot-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}
@media (max-width: 768px) {
    .tmabot-history-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
}
.tmabot-history-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 0 !important;
}
.tmabot-history-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1/1;
    object-fit: cover;
}
.tmabot-history-chat,
.tmabot-history-article {
    padding: 12px;
}
.tmabot-history-chat-preview,
.tmabot-history-article-preview {
    font-size: 0.9em;
    color: var(--text-light);
    line-height: 1.4;
    max-height: 4.2em;
    overflow: hidden;
}
.tmabot-history-audio,
.tmabot-history-video {
    width: 100%;
    padding: 0 !important;
}
.tmabot-history-audio audio,
.tmabot-history-video video {
    width: 100%;
    display: block;
    background: #000;
}
.tmabot-history-loader {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
}

/* Overlay de imágenes */
.tmabot-image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: overlayFadeIn 0.3s forwards;
}
@keyframes overlayFadeIn {
    to { opacity: 1; }
}
.tmabot-overlay-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    text-align: center;
}
.tmabot-overlay-content img {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
    margin-bottom: 15px;
    object-fit: contain;
}
.overlay-prompt {
    background: #f5f5f5;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #333;
    word-break: break-word;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.overlay-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.overlay-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
}
.overlay-btn:hover {
    background: #005a87;
}
.overlay-close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 40px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.overlay-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    padding: 0 20px;
    user-select: none;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    z-index: 10000;
}
.overlay-nav.prev {
    left: 10px;
}
.overlay-nav.next {
    right: 10px;
}
.overlay-nav:hover {
    color: var(--primary-color);
}
@media (max-width: 768px) {
    .tmabot-overlay-content {
        padding: 15px;
    }
    .overlay-nav {
        font-size: 30px;
    }
    .overlay-close {
        font-size: 30px;
        top: 10px;
        right: 15px;
    }
}

/* Asegurar que las imágenes del historial tengan cursor pointer */
.tmabot-history-image {
    cursor: pointer;
    transition: opacity 0.2s;
}
.tmabot-history-image:hover {
    opacity: 0.9;
}

/* Credit items con botón de compra (estilo por defecto) */
.credit-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: white;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.buy-pack-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.buy-pack-btn:hover {
    background: #005a87;
}

/* Modal de packs */
.tmabot-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.tmabot-modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.tmabot-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}
.tmabot-modal-content h3 {
    margin-top: 0;
}
#tmabot-modal-buy {
    width: 100%;
    margin-top: 15px;
}

/* Estilos para Video.js */
.video-js {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
}

/* Título del elemento en el historial */
.history-title {
    font-size: 12px;
    color: var(--text-light);
    padding: 5px 10px;
    background: #f5f5f5;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ajustes responsivos para que audio, video, artículo y chat ocupen una columna en móvil */
@media (max-width: 768px) {
    .tmabot-history-grid .history-audio,
    .tmabot-history-grid .history-video,
    .tmabot-history-grid .history-article,
    .tmabot-history-grid .history-chat {
        grid-column: 1 / -1;
    }
}

/* Placeholder para videos pendientes en el historial */
.video-placeholder.pending {
    background: #f0f0f0;
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: #666;
    position: relative;
    overflow: hidden;
}
.video-placeholder.pending .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0,124,186,0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.video-placeholder.pending .pending-text {
    font-weight: 500;
    margin-bottom: 5px;
}
.video-placeholder.pending .pending-prompt {
    font-size: 0.9em;
    opacity: 0.8;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== ESTILOS DE LA CUADRÍCULA DE GENERADORES (AIGEN50) ===== */
.aigen50-grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.aigen50-grid-header {
    text-align: center;
    margin-bottom: 30px;
}
.aigen50-grid-header h2 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 20px;
}
.aigen50-search {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    font-size: 1rem;
    transition: all 0.3s;
}
.aigen50-search:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.aigen50-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.aigen50-grid-item {
    background: white;
    border-radius: 16px;
    padding: 20px 10px;
    text-align: center;
    text-decoration: none;
    color: #1e293b;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e2e8f0;
}
.aigen50-grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
    border-color: #6366f1;
}
.aigen50-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}
.aigen50-name {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

/* ===== ESTILOS DEL GENERADOR INDIVIDUAL (AIGEN50) ===== */
.aigen50-generator {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.aigen50-generator h3 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.aigen50-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}
.aigen50-input:focus {
    outline: none;
    border-color: #6366f1;
}
.aigen50-generate-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 20px;
}
.aigen50-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99,102,241,0.3);
}
.aigen50-result {
    margin-top: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.aigen50-result img {
    max-width: 100%;
    border-radius: 8px;
}
.aigen50-result audio {
    width: 100%;
    margin-top: 10px;
}
.aigen50-progress {
    text-align: center;
    margin: 20px 0;
}
.aigen50-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}
.aigen50-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    animation: aigen50-progress-animation 1.5s infinite ease-in-out;
}
@keyframes aigen50-progress-animation {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* ===== ESTILOS PARA TEMPLATES PREMIUM ===== */
.premium-generator {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    padding: 40px;
}
.generator-header {
    text-align: center;
    margin-bottom: 30px;
}
.generator-header h2 {
    font-size: 2.2rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0 0 10px;
}
.generator-description {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 20px;
}
.feature-badge {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.badge {
    background: #f1f5f9;
    color: #334155;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}
.generator-form {
    margin-bottom: 30px;
}
.prompt-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s;
    margin-bottom: 20px;
}
.prompt-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}
.options-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.option-group {
    flex: 1;
}
.option-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #334155;
}
.option-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
}
.generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 16px 20px;
    border-radius: 40px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99,102,241,0.3);
}
.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.btn-loader {
    font-size: 1.2rem;
}
.usage-tip {
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    border: 1px solid #e2e8f0;
}
.tip-icon {
    font-size: 1.5rem;
}
.tip-text {
    color: #334155;
    font-size: 0.95rem;
}
.tip-text strong {
    color: #6366f1;
}

/* Resultados */
.image-result, .video-result, .article-result, .aigen50-result {
    margin-top: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}
.generated-image {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.image-actions, .video-actions, .audio-actions, .article-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}
.image-actions button, .video-actions button, .audio-actions button, .article-actions button {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.image-actions button:hover, .video-actions button:hover, .audio-actions button:hover, .article-actions button:hover {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

/* Chat específico */
.chat-messages {
    height: 400px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    background: #f9fafc;
}
.message {
    margin-bottom: 15px;
    padding: 12px 18px;
    border-radius: 20px;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.5;
}
.message.user {
    background: #6366f1;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}
.message.bot {
    background: #e2e8f0;
    color: #1e293b;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}
.chat-input-area {
    display: flex;
    gap: 10px;
    align-items: center;
}
.chat-input-area textarea {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    font-size: 1rem;
    resize: none;
}
.chat-input-area button {
    width: auto;
    padding: 12px 24px;
}

/* Responsive adicional */
@media (max-width: 768px) {
    .premium-generator {
        padding: 20px;
    }
    .options-row {
        flex-direction: column;
    }
    .chat-messages {
        height: 300px;
    }
    .message {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .tmabot-ai-tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 5px;
    }
    .tab-link {
        padding: 10px 16px;
        font-size: 14px;
    }
    .chat-messages {
        height: 250px;
    }
    .message {
        max-width: 90%;
    }
}

/* Estilos para encabezados colapsables (video, article, etc.) */
.generator-header {
    margin-bottom: 15px;
}
.generator-header-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}
.generator-header-toggle h2 {
    margin: 0;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.toggle-icon {
    font-size: 1.2rem;
    color: #666;
    transition: transform 0.3s;
}
.generator-header.expanded .toggle-icon {
    transform: rotate(180deg);
}
.generator-header-content {
    margin-top: 10px;
    padding-left: 5px;
}