.container {
  max-width: 1400px;
  margin: 0 auto;
  /*! padding: 2rem; */
  position: relative;
  z-index: 1;
}

.search-container {
  max-width: 600px;
  margin: 2rem auto 3rem auto;
  position: relative;
  animation: fadeIn 0.8s ease-out 0.2s both;
}

@keyframes fadeIn {
  from { opacity:0;
         transform: scale(0.95);
       }
  to { opacity: 1;
       transform: scale(1);
     }
}

.search-container input[type="text"] {
    width: 88%;
    padding: 1.2rem 3rem 1.2rem 1.5rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    color: #333;
}

.search-box:focus {
    outline: none;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.search-box::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    pointer-events: none;
    opacity: 0.5;
}

.launcher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1rem 5rem;
    padding: 2rem;
    animation: fadeIn 1s ease-out 0.4s both;
    overflow-y: auto;
    height: 70vh;
}

.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    opacity: 1;
    animation: scaleIn 0.4s ease-out both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.app-item.hidden {
    display: none;
}

.app-item:hover {
    transform: translateY(-8px);
}

.app-icon {
    width: 150px;
    height: 175px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5.2rem;
    margin-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
}

.app-icon img {
    width: 85%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3)) hue-rotate(45deg);
    transition: all 0.3s ease;
    mix-blend-mode: multiply;
    border-radius: 18px;
}

.app-item:hover .app-icon img {
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
    transform: rotate(1deg) translateZ(20px) scale(1.1);
    box-shadow: -2px 6px 10px 1px #444;
}

.app-icon span {
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.app-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.app-item:hover .app-icon::before {
    left: 100%;
}

.app-item:hover .app-icon {
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.2),
        0 0 32px rgba(255, 255, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.3));
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.app-label {
    font-size: 1.25rem;
    font-weight: 500;
    color: white;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    max-width: 250px;
    text-wrap: wrap;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: white;
    font-size: 1.2rem;
    opacity: 0.9;
    display: none;
}

.no-results.show {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .launcher-grid {
       grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
       gap: 1.5rem;
    }

    .app-icon {
       width: 100px;
       height: 100px;
       font-size: 3.2rem;
    }
    .app-label {
        font-size: 0.85rem;
        max-width: 150px;
    }
    
    .search-container {
        max-width: 400px;
    }
    
}

@media (max-width: 480px) {
    .launcher-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 1rem;
    }

    .app-icon {
        width: 85px;
        height: 85px;
        font-size: 2.5rem;
    }

    .app-label {
        font-size: 0.65rem;
        max-width: 150px;
    }
}
