.all-apps-page {
    padding-top: 80px;
    min-height: 100vh;
    background: #ffffff;
    background-image: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.1) 1px, transparent 0);
    background-size: 20px 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.search-section {
    margin: 1rem auto;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.6rem 2rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    font-size: 14px;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.search-button {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    z-index: 1;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.filter-btn {
    padding: 0.3rem 0.6rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: #ffffff;
    color: #333;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.filter-btn i {
    margin-right: 0.5rem;
}

/* Apps Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(10, 40px); /* Slightly wider for text */
    gap: 0.4rem;
    padding: 0.4rem;
    width: fit-content;
    margin: 1rem auto;
    justify-content: center;
}

/* Updated App Card with name below icon */
.app-card {
    width: 40px;
    height: auto; /* Remove fixed height to accommodate text */
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 0.3rem 0.2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    text-decoration: none;
    box-sizing: border-box;
}

.app-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #000000;
}

.app-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
}

.app-title {
    font-size: 0.55rem;
    font-weight: 500;
    margin: 0;
    text-align: center;
    width: 100%;
    color: #333;
    /* Show two lines of text */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
    height: 1.4rem;
    word-break: break-word;
}

.app-version {
    font-size: 0.7rem;
    color: #666;
}

.app-meta {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: #666;
    width: 100%;
}

.app-description {
    font-size: 0.75rem;
    color: #666;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    height: 2.4em;
    line-height: 1.2;
    margin: 0.25rem 0;
    width: 100%;
}

.app-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    width: 100%;
}

.badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.3rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    color: #333;
    white-space: nowrap;
}

.badge i {
    margin-right: 0.25rem;
    color: #000000;
}

.app-card .metallic-button {
    width: 100%;
    padding: 0.4rem;
    font-size: 0.75rem;
    margin-top: auto;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
}

.pagination {
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: env(safe-area-inset-bottom);
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

.page-number {
    min-width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.page-number:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: #000000;
}

.page-number.active {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.page-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 25px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: #000000;
}

@supports (-webkit-touch-callout: none) {
    .all-apps-page {
        padding-top: calc(80px + env(safe-area-inset-top));
        padding-bottom: env(safe-area-inset-bottom);
    }

    .search-section {
        margin-top: env(safe-area-inset-top);
    }

    input {
        font-size: 16px !important;
    }
}

@media (max-width: 768px) {
    .search-section {
        margin: 1rem;
        width: calc(100% - 2rem);
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .apps-grid {
        grid-template-columns: repeat(10, 35px); /* Slightly smaller on mobile */
        gap: 0.3rem;
        padding: 0.3rem;
    }

    .app-card {
        width: 35px;
        padding: 0.25rem 0.15rem;
    }

    .app-icon {
        width: 24px;
        height: 24px;
    }

    .app-title {
        font-size: 0.5rem;
        height: 1.2rem;
    }
}

@media (max-width: 375px) {
    .apps-grid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 0.5rem;
    }

    .apps-grid::-webkit-scrollbar {
        display: none;
    }
    
    .apps-grid {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* Optional: Add fade effect for text truncation */
.app-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 25%;
    height: 1.2em;
    background: linear-gradient(to right, transparent, #ffffff);
}

.header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 50;
    background-color: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--gray-800);
    padding: 0.5rem 0;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    min-height: 48px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.25rem;
    text-decoration: none;
}

/* Hero icon container */
.hero-icon {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 2rem auto;
}

.main-icon {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Base rotating dot styles */
.rotating-dot {
    position: absolute;
    border-radius: 50%;
    transform-origin: 50% calc(100% + 4px);
}

/* Individual dot styles */
.dot-1 {
    width: 8px;
    height: 8px;
    background-color: #000;
    top: -4px;
    left: 50%;
    animation: rotateDot 3s linear infinite;
}

.dot-2 {
    width: 7px;
    height: 7px;
    background-color: #000;
    top: -3.5px;
    left: 50%;
    animation: rotateDot 4s linear infinite reverse;
    opacity: 0.85;
}

.dot-3 {
    width: 6px;
    height: 6px;
    background-color: #000;
    top: -3px;
    left: 50%;
    animation: rotateDot 5s linear infinite;
    opacity: 0.7;
}

.dot-4 {
    width: 5px;
    height: 5px;
    background-color: #000;
    top: -2.5px;
    left: 50%;
    animation: rotateDot 6s linear infinite reverse;
    opacity: 0.55;
}

.dot-5 {
    width: 4px;
    height: 4px;
    background-color: #000;
    top: -2px;
    left: 50%;
    animation: rotateDot 7s linear infinite;
    opacity: 0.4;
}

.dot-6 {
    width: 3px;
    height: 3px;
    background-color: #000;
    top: -1.5px;
    left: 50%;
    animation: rotateDot 8s linear infinite reverse;
    opacity: 0.25;
}

/* Rotation animation */
@keyframes rotateDot {
    from {
        transform: rotate(0deg) translateY(-4px);
    }
    to {
        transform: rotate(360deg) translateY(-4px);
    }
}

/* Glow effect */
.hero-icon::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle at center, rgba(0,0,0,0.1) 0%, transparent 70%);
    z-index: -1;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
} 