/* Estilos específicos para el archivo de la comunidad */
.page-guardados .container {
    max-width: 900px;
    margin-bottom: 20px;
}

/* Estadísticas */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    padding: 12px;
    background: rgba(139, 92, 246, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.stat-item {
    text-align: center;
    min-width: 80px;
}

.stat-number {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #8B5CF6;
}

.stat-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Controles modernos y colapsables */
.controls {
    margin: 16px 0;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Barra de acción compacta */
.action-bar {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 12px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.action-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.action-btn:hover {
    background: #8B5CF6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-btn.active {
    background: #8B5CF6;
    color: white;
}

.action-btn.reset {
    background: #f1f5f9;
    color: #64748b;
}

.action-btn.reset:hover {
    background: #e2e8f0;
    color: #475569;
}

/* Paneles colapsables */
.collapsible-panel {
    padding: 16px;
    border-top: 1px solid #f1f5f9;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Búsqueda */
.search-box {
    position: relative;
    max-width: 100%;
}

#search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #f9fafb;
}

#search-input:focus {
    outline: none;
    border-color: #8B5CF6;
    background: white;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

#clear-search {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-size: 14px;
}

#clear-search:hover {
    background: #f3f4f6;
    color: #6b7280;
}

/* Filtros */
.filter-row {
    display: flex;
    gap: 8px;
}

.filter-select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #8B5CF6;
}

/* Filtros de tiempo */
.time-filters {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.time-btn {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-btn:hover {
    border-color: #8B5CF6;
    color: #8B5CF6;
}

.time-btn.active {
    background: #8B5CF6;
    border-color: #8B5CF6;
    color: white;
}

/* Opciones de ordenación */
.sort-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sort-btn {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}

.sort-btn:hover {
    border-color: #8B5CF6;
    color: #8B5CF6;
}

.sort-btn.active {
    background: #8B5CF6;
    border-color: #8B5CF6;
    color: white;
}

.sort-btn i {
    font-size: 12px;
}

/* Loading spinner */
.loading {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #8B5CF6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error */
.error {
    background: #ffebee;
    color: #c62828;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
}

/* Contenedor de mensajes con mejor espaciado */
.messages-container {
    display: flex;
    flex-direction: column;
    gap: 48px;
    margin: 24px 0;
    padding: 0 4px; /* Espacio para sombras */
}

/* Mensaje estilo Telegram */
.message.telegram-style {
    display: flex;
    gap: 12px;
    background: transparent;
    border: none;
    padding: 16px 0;
    transition: none;
    position: relative;
}

.message.telegram-style:hover {
    background: transparent;
}

.message.telegram-style:hover .message-content-wrapper {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Avatar circular */
.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Wrapper del contenido con globo */
.message-content-wrapper {
    flex: 1;
    min-width: 0;
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    position: relative;
}

/* Cola del globo de mensaje */
.message-content-wrapper::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 12px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid white;
    filter: drop-shadow(-1px 0px 1px rgba(0, 0, 0, 0.1));
}

/* Header del mensaje */
.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.message-author {
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.message-date {
    color: #64748b;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
}

/* Nueva fila para la fecha después del contenido */
.message-date-row {
    margin-bottom: 12px;
    text-align: left;
}

.message-date-row .message-date {
    color: #9ca3af;
    font-size: 11px;
    font-weight: 500;
    padding-left: 0;
    display: inline-block;
}

.save-counter {
    margin-left: auto;
}

/* Contador de guardados - más compacto */
.save-counter {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 45px;
    justify-content: center;
}

.save-counter.single {
    background: #f3f4f6;
    color: #6b7280;
    cursor: default;
}

.save-counter.multiple {
    background: #f3e8ff;
    color: #7c3aed;
    border: 1px solid #c4b5fd;
}

.save-counter.multiple:hover {
    background: #c4b5fd;
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(124, 58, 237, 0.1);
}

.save-counter i {
    width: 12px;
    height: 12px;
}

/* Contenido del mensaje */
.message-content {
    color: #1f2937;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    word-wrap: break-word;
}

.message-content br {
    margin-bottom: 4px;
}

/* Enlaces en el contenido */
.message-link {
    color: #8B5CF6;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.message-link:hover {
    border-bottom-color: #8B5CF6;
}

/* Contenido expandible */
.message-content {
    transition: all 0.3s ease;
}

.content-preview,
.content-full {
    transition: opacity 0.2s ease;
}

.expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 12px;
    margin-top: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.expand-btn:hover {
    background: #f1f5f9;
    color: #475569;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

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

.expand-btn i {
    font-size: 11px;
    transition: transform 0.2s ease;
}

/* Estilos para imágenes de mensajes */
.message-image-container {
    margin-top: 12px;
    margin-bottom: 8px;
}

.image-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    background: #f8fafc;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    color: #9ca3af;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
}

.image-loading i {
    font-size: 16px;
}

/* Estados de lazy loading */
.message-image-container.lazy-loading .image-loading {
    opacity: 0.8;
    background: #f1f5f9;
}

.message-image-container.lazy-loading .image-loading i {
    animation: pulse 2s ease-in-out infinite;
}

/* Loading activo cuando se está cargando */
.message-image-container.loading .image-loading {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
}

.message-image-container.loading .image-loading i {
    animation: spin 1s linear infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

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

.message-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    cursor: pointer;
    transition: transform 0.2s ease;
    max-height: 300px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-image:hover {
    transform: scale(1.02);
}

.message-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    max-height: 300px;
    object-fit: contain;
    background: #f8fafc;
}

.image-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.message-image:hover .image-overlay {
    opacity: 1;
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #94a3b8;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 100px;
}

.image-placeholder:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #64748b;
    transform: translateY(-1px);
}

.image-placeholder i {
    font-size: 28px;
    margin-bottom: 2px;
    opacity: 0.7;
}

.image-placeholder span {
    font-size: 13px;
    font-weight: 500;
}

/* Panel de temas populares */
.popular-topics-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 16px;
    animation: fadeIn 0.3s ease;
}

.popular-topics-header {
    margin-bottom: 12px;
}

.popular-topics-title {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popular-topics-title i {
    font-size: 14px;
    margin-right: 6px;
    color: #8B5CF6;
}

.popular-topics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.popular-topic-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.popular-topic-tag:hover {
    background: #8B5CF6;
    border-color: #8B5CF6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
}

.popular-topic-tag.active {
    background: #8B5CF6;
    border-color: #8B5CF6;
    color: white;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
}

/* Footer del mensaje */
.message-footer {
    margin-top: 0;
}

.message-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tags-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
}

.tags-container::-webkit-scrollbar {
    display: none;
}

/* Detalles de guardado */
.saved-by-details {
    margin-top: 8px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    animation: fadeIn 0.3s ease;
}

.saved-by-header {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.saved-by-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.saved-by-details li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}

.saved-by-details li:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
}

.save-date {
    color: #9ca3af;
    font-size: 12px;
    font-weight: normal;
}

.topic {
    background: #f3e8ff;
    color: #7c3aed;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.saved-by {
    color: #6b7280;
    font-size: 13px;
}

/* Acciones del mensaje */
.message-actions {
    display: flex;
    justify-content: flex-end;
}

/* Estilos del telegram-link movidos al final del archivo */

/* Detalles de quién guardó */
.saved-by-details {
    padding: 16px;
    background: #f8fafc;
    border-top: 1px dashed #d1d5db;
    margin-top: 8px;
    animation: fadeIn 0.3s ease;
}

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

.saved-by-details h4 {
    margin: 0 0 12px 0;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.saved-by-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Nuevo diseño en grid para los detalles de guardado */
.saves-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.save-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
}

.save-card:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.save-user {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
}

.user-name {
    color: #1f2937;
    font-size: 13px;
    font-weight: 600;
}

.save-date {
    color: #9ca3af;
    font-size: 11px;
    font-weight: normal;
}

/* Estilos para temas por usuario */
.user-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.user-topic {
    display: inline-block;
    background: #e0e7ff;
    color: #4338ca;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 500;
    border: 1px solid #c7d2fe;
}

.no-topics {
    color: #9ca3af;
    font-style: italic;
    font-size: 10px;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .saves-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .save-card {
        padding: 10px;
    }
    
    /* Panel de temas populares - más espaciado en móvil */
    .popular-topics-panel {
        margin-left: 8px;
        margin-right: 8px;
    }
}

/* Mensaje cuando no hay resultados */
.no-messages {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 40px 20px;
}

/* Paginación */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.page-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #8B5CF6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background: #6D28D9;
    transform: translateY(-1px);
}

.page-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.page-btn i {
    width: 16px;
    height: 16px;
}

.page-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

#current-page {
    color: #8B5CF6;
    font-weight: 700;
}

/* Contenedor para volver */
.back-container {
    margin-top: 30px;
    text-align: center;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .page-guardados .container {
        padding: 15px;
        margin: 8px;
        max-width: none;
        width: calc(100% - 16px);
    }
    
    .stats-container {
        gap: 15px;
        padding: 16px 12px;
    }
    
    .stat-item {
        min-width: 70px;
    }
    
    .stat-number {
        font-size: 18px;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .message {
        margin: 0 -5px;
    }
    
    .message-header {
        padding: 12px 14px;
    }
    
    .message-content {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .message-footer {
        padding: 10px 14px 12px;
    }
    
    .message-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .saved-by-details {
        padding: 12px 14px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .page-info {
        order: -1;
    }
}

/* Responsive - Móvil */
@media (max-width: 480px) {
    /* Eliminar padding del body que desperdicia espacio */
    .page-guardados {
        padding: 0;
    }
    
    .page-guardados .container {
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }
    
    /* Reducir avatar en móviles pequeños */
    .message-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    /* Ajustar gap entre avatar y contenido */
    .message.telegram-style {
        gap: 8px;
        padding: 12px 8px;
    }
    
    /* Reducir padding del contenedor de mensajes */
    .messages-container {
        padding: 0 8px;
        gap: 32px;
    }
    
    /* Añadir separación lateral para que no pegue a bordes */
    .stats-container,
    .controls,
    .back-container {
        margin-left: 8px;
        margin-right: 8px;
    }
    
    .stats-container {
        flex-direction: row;
        gap: 10px;
        padding: 12px 8px;
    }
    
    .stat-item {
        min-width: 60px;
    }
    
    .stat-number {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .controls {
        padding: 16px 12px;
    }
    
    .search-box {
        max-width: none;
    }
    
    #search-input {
        padding: 10px 14px 10px 36px;
        font-size: 16px; /* Previene zoom en iOS */
    }
    
    .filters-container {
        gap: 10px;
    }
    
    .filter-group select {
        padding: 10px 8px;
        font-size: 16px; /* Previene zoom en iOS */
    }
    
    .reset-btn {
        padding: 10px;
        font-size: 13px;
    }
    
    .message {
        border-radius: 8px;
        margin: 0 -2px;
    }
    
    /* Reducir padding interno del globo */
    .message-content-wrapper {
        padding: 8px 10px;
    }
    
    .message-header {
        padding: 0;
        margin-bottom: 6px;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 6px;
    }
    
    .message-author {
        flex: 1;
        text-align: left;
        min-width: 0;
    }
    
    .message-author strong {
        font-size: 13px;
    }
    
    .message-date {
        font-size: 11px;
    }
    
    .save-counter {
        flex-shrink: 0;
        margin-left: auto;
    }
    
    .message-content {
        padding: 0;
        font-size: 13px;
        line-height: 1.4;
    }
    
    .message-footer {
        padding: 0;
        margin-top: 8px;
    }
    
    .message-meta {
        margin-bottom: 8px;
    }
    
    .topic {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .saved-by {
        font-size: 12px;
    }
    
    .telegram-link {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .expand-btn {
        font-size: 12px;
        padding: 6px;
    }
    
    /* Imágenes en móviles */
    .message-image {
        max-height: 200px;
    }
    
    .message-image img {
        max-height: 200px;
    }
    
    .image-loading {
        padding: 16px;
        font-size: 13px;
    }
    
    .image-placeholder {
        padding: 20px;
        min-height: 80px;
    }
    
    .image-placeholder i {
        font-size: 24px;
    }
    
    .image-placeholder span {
        font-size: 12px;
    }
    
    .saved-by-details {
        padding: 10px 12px;
    }
    
    .saved-by-details h4 {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .saved-by-details li {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 6px 0;
    }
    
    .save-date {
        font-size: 11px;
    }
    
    .pagination {
        padding: 12px;
        gap: 10px;
    }
    
    .page-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 80px;
        justify-content: center;
    }
    
    .page-info {
        font-size: 13px;
    }
    
    .back-container .btn {
        font-size: 14px;
        padding: 10px;
    }
}

/* Accesibilidad y mejoras UX */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible para navegación por teclado */
.search-box input:focus-visible,
.filter-group select:focus-visible,
.reset-btn:focus-visible,
.page-btn:focus-visible,
.save-counter.multiple:focus-visible {
    outline: 2px solid #8B5CF6;
    outline-offset: 2px;
}

/* Mejoras táctiles para dispositivos móviles */
@media (pointer: coarse) {
    .save-counter.multiple {
        min-height: 44px;
        min-width: 44px;
    }
    
    .telegram-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .expand-btn {
        min-height: 44px;
    }
}

/* Estilos adicionales */
h1 i {
    margin-right: 8px;
    color: #8B5CF6;
}

/* Banner informativo - estilo sutil */
.info-banner {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 8px 0;
    margin: 12px 0 20px;
    font-size: 14px;
}

.info-banner p {
    margin: 0;
    color: #6b7280;
    line-height: 1.4;
    text-align: center;
    font-weight: 400;
}

.info-banner i.fas {
    color: #9ca3af;
    margin-right: 6px;
    font-size: 13px;
}

.info-banner a {
    color: #6b7280;
    text-decoration: underline;
    font-weight: 400;
}

.info-banner a:hover {
    color: #374151;
}

.info-banner code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

/* Temas clicables - estilo sutil */
.topic-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 2px;
    background: none;
    color: #7c3aed;
    border: none;
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.topic-tag:hover {
    color: #8B5CF6;
    text-decoration: underline;
    transform: none;
    box-shadow: none;
}

.topic-tag:active {
    transform: none;
}

/* Los temas ya no necesitan contador, solo ordenación por frecuencia */

/* Botón de enlace externo sutil */
.telegram-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: #f1f5f9;
    color: #64748b;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.telegram-link:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-1px);
}

.telegram-link i {
    width: 13px;
    height: 13px;
}
