/* ============================================
       RESET E BASE
       ============================================ */
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    }

    body {
      height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      background: #0f172a;
      background-image: url('../img/body-img.avif');
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      padding: 20px;
      overflow: hidden;
    }

    /* ============================================
       MOBILE SCREEN
       ============================================ */
    .mobile-screen {
      width: 100%;
      max-width: 390px;
      height: calc(100vh - 40px);
      max-height: 844px;
      padding: 60px 20px 30px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      backdrop-filter: blur(8px);
      background-color: rgba(0, 0, 0, 0.2);
      overflow-y: auto;
      overflow-x: hidden;
      border-radius: 40px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
      transition: all 0.3s ease;
    }

    /* ============================================
       HEADER DESKTOP
       ============================================ */
    .desktop-header {
      display: none;
    }

    /* ============================================
       GRID PRINCIPAL
       ============================================ */
    .app-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 20px 15px;
      justify-items: center;
      margin-bottom: 20px;
      width: 100%;
      overflow: hidden;
    }

    .app-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-decoration: none;
      width: 100%;
      max-width: 100%;
      cursor: pointer;
      position: relative;
      transition: transform 0.2s ease;
      overflow: hidden;
    }

    .app-icon {
      width: 62px;
      height: 62px;
      display: flex;
      justify-content: center;
      align-items: center;
      transition: transform 0.2s ease, background 0.2s ease;
      overflow: hidden;
      position: relative;
      flex-shrink: 0;
    }

    .app-icon img {
      width: 95%;
      height: 95%;
      object-fit: cover;
      display: block;
    }

    .app-icon .icon-fallback {
      font-size: 28px;
      color: white;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .app-item:active .app-icon {
      transform: scale(0.92);
      background: rgba(255, 255, 255, 0.3);
    }

    .app-name {
      margin-top: 6px;
      font-size: 11px;
      color: #ffffff;
      text-align: center;
      font-weight: 500;
      text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      width: 100%;
      max-width: 100%;
      padding: 0 2px;
    }

    /* ============================================
       DOCK
       ============================================ */
    .dock {
      background: rgba(255, 255, 255, 0.2);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border: 1px solid rgba(255, 255, 255, 0.25);
      border-radius: 30px;
      padding: 12px 16px;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 15px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
      margin-top: auto;
      width: 100%;
      overflow: hidden;
    }

    .dock .app-item .app-name {
      display: none;
    }

    .dock .app-icon {
      width: 54px;
      height: 54px;
      flex-shrink: 0;
    }

    .dock .app-item {
      max-width: 100%;
    }

    /* ============================================
       ESTILOS PARA DESTAQUE (ANTI-ADBLOCK)
       ============================================ */
    #featuredContainer {
      width: 100%;
      margin: 10px 0;
      transition: all 0.3s ease;
    }

    #featuredContainer:empty {
      display: none;
    }

    .featured-card {
      background: rgba(22, 20, 38, 0.85);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 18px;
      padding: 12px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
      position: relative;
      overflow: hidden;
      width: 100%;
      box-sizing: border-box;
      animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .featured-content {
      display: flex;
      align-items: center;
      gap: 10px;
      flex: 1;
      min-width: 0;
    }

    .featured-icon {
      width: 40px;
      height: 40px;
      border-radius: 10px;
      object-fit: cover;
      flex-shrink: 0;
    }

    .featured-text-group {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }

    .featured-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.8px;
      text-transform: lowercase;
      color: rgba(255, 255, 255, 0.5);
    }

    .featured-badge-dot {
      width: 5px;
      height: 5px;
      background-color: #ff0000;
      border-radius: 50%;
    }

    .featured-title {
      color: #ffffff;
      font-weight: 600;
      font-size: 12px;
      line-height: 1.25;
      white-space: normal;
      word-break: break-word;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .featured-description {
      color: rgba(255, 255, 255, 0.7);
      font-size: 10px;
      line-height: 1.2;
      white-space: normal;
      word-break: break-word;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .featured-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }

    .featured-cta-btn {
      background: #6366f1;
      color: #ffffff;
      padding: 7px 12px;
      border-radius: 16px;
      text-decoration: none;
      font-size: 11px;
      font-weight: 600;
      white-space: nowrap;
      border: none;
      cursor: pointer;
      flex-shrink: 0;
      box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
      transition: all 0.2s ease;
    }

    .featured-cta-btn:hover {
      transform: translateY(-1px) scale(1.03);
      box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
    }

    .featured-close-btn {
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.15);
      color: rgba(255, 255, 255, 0.7);
      width: 26px;
      height: 26px;
      border-radius: 50%;
      cursor: pointer;
      font-size: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      transition: all 0.2s ease;
    }

    .featured-close-btn:hover {
      background: rgba(255, 255, 255, 0.22);
      color: #ffffff;
    }

    /* ============================================
       ANIMAÇÕES
       ============================================ */
    @keyframes slideUp {
      from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(15px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .app-item {
      animation: fadeInUp 0.4s ease forwards;
      opacity: 0;
    }

    .app-item:nth-child(1) { animation-delay: 0.03s; }
    .app-item:nth-child(2) { animation-delay: 0.06s; }
    .app-item:nth-child(3) { animation-delay: 0.09s; }
    .app-item:nth-child(4) { animation-delay: 0.12s; }
    .app-item:nth-child(5) { animation-delay: 0.15s; }
    .app-item:nth-child(6) { animation-delay: 0.18s; }
    .app-item:nth-child(7) { animation-delay: 0.21s; }
    .app-item:nth-child(8) { animation-delay: 0.24s; }
    .app-item:nth-child(9) { animation-delay: 0.27s; }
    .app-item:nth-child(10) { animation-delay: 0.30s; }
    .app-item:nth-child(11) { animation-delay: 0.33s; }
    .app-item:nth-child(12) { animation-delay: 0.36s; }

    /* ============================================
       LOADING & ERROR
       ============================================ */
    .loading {
      color: white;
      text-align: center;
      font-size: 16px;
      padding: 40px;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
      width: 100%;
      word-wrap: break-word;
    }

    .error {
      color: #ff6b6b;
      text-align: center;
      font-size: 14px;
      padding: 40px;
      background: rgba(255, 0, 0, 0.1);
      border-radius: 12px;
      backdrop-filter: blur(4px);
      width: 100%;
      word-wrap: break-word;
    }

    /* ============================================
       MOBILE PEQUENO (< 400px)
       ============================================ */
    @media (max-width: 400px) {
      body {
        padding: 10px;
      }

      .mobile-screen {
        height: calc(100vh - 20px);
        padding: 40px 12px 20px;
        border-radius: 30px;
        max-height: 700px;
      }
      
      .app-icon {
        width: 50px;
        height: 50px;
      }
      
      .dock .app-icon {
        width: 44px;
        height: 44px;
      }
      
      .app-grid {
        gap: 15px 8px;
      }
      
      .dock {
        padding: 10px 10px;
        gap: 8px;
        border-radius: 25px;
      }

      .app-name {
        font-size: 10px;
      }

      .dock .app-item {
        max-width: 100%;
      }

      .featured-card {
        padding: 10px 12px;
        border-radius: 14px;
      }

      .featured-icon {
        width: 36px;
        height: 36px;
      }

      .featured-title {
        font-size: 11px;
      }

      .featured-description {
        font-size: 9px;
      }

      .featured-cta-btn {
        font-size: 10px;
        padding: 6px 10px;
      }

      .featured-close-btn {
        width: 24px;
        height: 24px;
        font-size: 11px;
      }
    }

    /* ============================================
       TABLET (768px - 1024px)
       ============================================ */
    @media (min-width: 768px) and (max-width: 1024px) {
      body {
        padding: 30px;
        overflow: hidden;
      }

      .mobile-screen {
        max-width: 700px;
        height: calc(100vh - 60px);
        max-height: 800px;
        padding: 40px 30px 25px;
        border-radius: 35px;
        backdrop-filter: blur(10px);
        background-color: rgba(0, 0, 0, 0.18);
        overflow-x: hidden;
      }

      .desktop-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding-bottom: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 10px;
      }

      .desktop-header h1 {
        color: white;
        font-size: 22px;
        font-weight: 600;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
      }

      .desktop-header h1 span {
        font-weight: 300;
        opacity: 0.7;
      }

      .desktop-header .datetime {
        color: rgba(255, 255, 255, 0.8);
        font-size: 13px;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
        background: rgba(255, 255, 255, 0.08);
        padding: 4px 14px;
        border-radius: 16px;
        backdrop-filter: blur(4px);
        border: 1px solid rgba(255, 255, 255, 0.08);
        white-space: nowrap;
      }

      .app-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 22px 15px !important;
      }

      .app-icon {
        width: 68px !important;
        height: 68px !important;
      }

      .app-name {
        font-size: 12px !important;
      }

      .dock {
        padding: 14px 20px !important;
        border-radius: 35px;
      }

      .dock .app-icon {
        width: 56px !important;
        height: 56px !important;
      }

      .featured-icon {
        width: 48px !important;
        height: 48px !important;
      }

      .featured-title {
        font-size: 13px !important;
      }

      .featured-description {
        font-size: 11px !important;
      }

      .featured-cta-btn {
        font-size: 12px !important;
        padding: 8px 16px !important;
      }
    }

    /* ============================================
       DESKTOP (> 1024px)
       ============================================ */
    @media (min-width: 1025px) {
      body {
        padding: 40px;
        overflow: hidden;
      }

      .mobile-screen {
        max-width: 1000px;
        height: calc(100vh - 80px);
        max-height: 750px;
        padding: 40px 45px 30px;
        border-radius: 30px;
        backdrop-filter: blur(12px);
        background-color: rgba(0, 0, 0, 0.15);
        flex-direction: row;
        flex-wrap: wrap;
        align-content: flex-start;
        gap: 15px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
        overflow-x: hidden;
        overflow-y: auto;
      }

      .desktop-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding-bottom: 18px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 5px;
      }

      .desktop-header h1 {
        color: white;
        font-size: 28px;
        font-weight: 600;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
        letter-spacing: -0.5px;
      }

      .desktop-header h1 span {
        font-weight: 300;
        opacity: 0.7;
      }

      .desktop-header .datetime {
        color: rgba(255, 255, 255, 0.85);
        font-size: 15px;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
        background: rgba(255, 255, 255, 0.08);
        padding: 6px 18px;
        border-radius: 20px;
        backdrop-filter: blur(4px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
        white-space: nowrap;
      }

      .desktop-header .datetime:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: scale(1.02);
      }

      .app-grid {
        grid-template-columns: repeat(6, 1fr) !important;
        gap: 25px 18px !important;
        width: 100%;
        margin-bottom: 0;
      }

      .app-icon {
        width: 78px !important;
        height: 78px !important;
        transition: all 0.3s ease !important;
      }

      .app-icon img {
        width: 92%;
        height: 92%;
      }

      .app-name {
        font-size: 13px !important;
        margin-top: 8px !important;
        font-weight: 500;
      }

      .app-item {
        transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
      }

      .app-item:hover {
        transform: translateY(-5px);
      }

      .app-item:hover .app-icon {
        transform: scale(1.08);
      }

      .app-item:hover .app-name {
        color: #ffffff;
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
      }

      .dock {
        display: none !important;
      }

      .featured-icon {
        width: 52px !important;
        height: 52px !important;
      }

      .featured-title {
        font-size: 14px !important;
      }

      .featured-description {
        font-size: 12px !important;
      }

      .featured-cta-btn {
        font-size: 13px !important;
        padding: 8px 18px !important;
      }
    }

    /* ============================================
       SCROLLBAR PERSONALIZADA
       ============================================ */
    .mobile-screen::-webkit-scrollbar {
      width: 4px;
    }

    .mobile-screen::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 10px;
    }

    .mobile-screen::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.2);
      border-radius: 10px;
    }

    .mobile-screen::-webkit-scrollbar-thumb:hover {
      background: rgba(255, 255, 255, 0.3);
    }