  #wordcloud {
    max-width: 1100px;         /* Nuevo ancho fijo */
    max-height: 500px;         /* Ajusta según necesites (ej: proporcional al ancho) */
    margin: 0px auto -150px auto ;        /* Centrar en pantalla */
    position: relative;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    transform: translateZ(0);
  }

  /* Contenedor para centrar el botón */
  #btnCol {
      text-align: center;
      justify-content: center;
      margin-bottom: 10px;
  }

  .word {
    position: absolute;
    font-weight: 600;
    white-space: nowrap;
    user-select: none;
    cursor: pointer;
    transform-origin: center center;
    transform: translate(-50%, -50%) scale(0.3);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    filter: brightness(0.9);
    /* Optimizaciones GPU críticas */
    will-change: transform, opacity, filter;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .word.animate-in {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  .word.animate-out {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.1);
    transition: all 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53);
  }

  .word:hover {
    transform: translate(-50%, -50%) scale(1.15); 
    filter: brightness(1.3) drop-shadow(0 0 12px currentColor);
    text-shadow: 0 0 8px rgba(255,255,255,0.6);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .word.repositioning {
    transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  
  .word.repositioning-fast {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 20px;
    opacity: 1;
    transition: all 0.5s ease;
    z-index: 1000;
    text-align: center;
  }

  .loading.fade-out {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }

  #progressbarCloud .progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #3757e4 30%,#273ea3 70%);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(102, 126, 234, 0.5);
    /* Optimización GPU */
    will-change: transform;
  }

  .tooltip {
    position: fixed;
    background: rgba(15, 25, 45, 0.95);
    backdrop-filter: blur(12px);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 10000;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .tooltip.show {
    opacity: 1;
    transform: translateY(0);
  }

  .resize-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(15, 25, 45, 0.95);
    color: #64b5f6;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .resize-indicator.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  .loading-state {
    position: fixed;
    top: 70px;
    right: 20px;
    background: rgba(15, 25, 45, 0.9);
    backdrop-filter: blur(10px);
    color: #64b5f6;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    z-index: 1000;
    border: 1px solid rgba(100, 181, 246, 0.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
  }

  .loading-state.complete {
    background: rgba(15, 45, 25, 0.9);
    color: #4CAF50;
    border-color: rgba(76, 175, 80, 0.2);
  }

  .loading-state.regenerating {
    background: rgba(45, 25, 15, 0.9);
    color: #FF9800;
    border-color: rgba(255, 152, 0, 0.2);
  }

  /* Estilos para la sección de artículos */
  #articlesSection {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 60px auto 0 auto;
    padding: 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    min-height: 0;
    overflow: hidden;
    /* Optimización GPU */
    will-change: transform, opacity;
  }

  #articlesSection.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    min-height: 500px;
  }

  .articles-header {
    text-align: center;
    margin-bottom: 30px;
    color: #ffffff;
  }

  .articles-title {
    font-size: 25px;
    font-weight: 700;
    margin-bottom: 10px;
    background: rgb(48, 48, 48);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
  }

  .articles-subtitle {
    font-size: 20px;
    opacity: 0.8;
    color: rgb(48, 48, 48);
    font-weight: 400;
  }

  .articles-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: 1000px;
    margin: 0 auto;
  }

  .article-card {
    background: rgba(255, 255, 255, 0.377);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1px;
    padding: 24px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    /* Optimización GPU */
    will-change: transform, box-shadow;
  }

  .article-card.animate-in {
    transform: translateY(0);
    opacity: 1;
  }

  .article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
  }

  .article-card:hover::before {
    opacity: 1;
  }

  .article-rank {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg,  #253b99 30%,#1C2C73 70%);
    animation: stats-gradientShift 4s ease infinite;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
  }

  .article-title {
    font-size: 18px;
    font-weight: 700;
    color: rgb(48, 48, 48);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .article-excerpt {
    font-size: 14px;
    color: #b0bec5;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    color: #78909c;
  }

  .article-views {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #0c6ecf;
  }

  .article-date {
    opacity: 1;
    font-weight: 500;
    color: rgb(48, 48, 48);
  }

  .close-articles {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
  }

  .close-articles:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
  }

  @media (max-width: 768px) {
    .articles-grid {
      grid-template-columns: 1fr;
      gap: 16px;
    }
    
    .article-card {
      padding: 20px;
    }
    
    .articles-title {
      font-size: 24px;
    }
  }

  .regenerate-button::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: transform 0.6s;
            transform: translateX(-100%) translateY(-100%);
    }

    .regenerate-button:hover {
        box-shadow: 
            0 6px 12px rgba(0, 0, 0, 0.15),
            0 2px 4px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
        transform: translateY(-2px);
    }

    .regenerate-button:hover::before {
        transform: translateX(100%) translateY(100%);
    }

    @keyframes spin360 {
        0% { transform: rotate(0deg) scale(1); }
        50% { transform: rotate(180deg) scale(1.1); }
        100% { transform: rotate(360deg) scale(1); }
    }

    .regenerate-button.spinning {
        animation: spin360 0.8s ease-in-out;
  }

