/* ============================================================
   CATEGORY CARDS
============================================================ */

.category-grid {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 14px;
}


.category-card {

    position: relative;

    min-height: 145px;

    padding: 20px;

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    text-align: left;

    border:
        1px solid var(--border);

    border-radius: var(--radius-medium);

    color: var(--text);

    background: var(--surface);

    box-shadow: var(--shadow);

    overflow: hidden;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}


.category-card:hover {

    transform:
        translateY(-5px);

    border-color:
        rgba(99, 91, 255, 0.35);

    box-shadow:
        var(--shadow-hover);
}


.category-icon {

    width: 46px;
    height: 46px;

    display: grid;

    place-items: center;

    margin-bottom: 15px;

    border-radius: 14px;

    background:
        var(--surface-soft);

    font-size: 24px;
}


.category-name {

    font-size: 15px;

    font-weight: 800;

    margin-bottom: 4px;
}


.category-description {

    max-width: 180px;

    color: var(--text-soft);

    font-size: 11px;

    line-height: 1.45;
}


.category-arrow {

    position: absolute;

    right: 16px;
    bottom: 15px;

    color: var(--text-light);

    font-size: 16px;

    transition:
        transform 0.2s ease,
        color 0.2s ease;
}


.category-card:hover .category-arrow {

    color: var(--primary);

    transform:
        translateX(4px);
}


/* ============================================================
   APP GRID
============================================================ */

.app-grid {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;
}


/* ============================================================
   APP CARD
============================================================ */

.app-card {

    position: relative;

    min-width: 0;

    padding: 18px;

    display: flex;

    flex-direction: column;

    border:
        1px solid var(--border);

    border-radius: var(--radius-medium);

    background: var(--surface);

    box-shadow: var(--shadow);

    cursor: pointer;

    overflow: hidden;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}


.app-card:hover {

    transform:
        translateY(-5px);

    box-shadow:
        var(--shadow-hover);

    border-color:
        rgba(99, 91, 255, 0.3);
}


.app-card-top {

    min-height: 22px;

    display: flex;

    justify-content: flex-end;
}


.featured-badge {

    padding:
        4px 8px;

    border-radius: 100px;

    color: #8a5a00;

    background: #fff5d6;

    font-size: 9px;

    font-weight: 800;
}


/* ============================================================
   APP ICON
============================================================ */

.app-icon-wrapper {

    width: 76px;
    height: 76px;

    margin:
        8px auto 16px;

    border-radius: 21px;

    overflow: hidden;

    background:
        var(--surface-soft);

    box-shadow:
        0 8px 20px rgba(30, 41, 59, 0.08);
}


.app-icon {

    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


.app-icon-fallback {

    width: 100%;
    height: 100%;

    display: none;

    align-items: center;

    justify-content: center;

    color: white;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            #8b5cf6
        );

    font-size: 28px;
}


/* ============================================================
   APP CONTENT
============================================================ */

.app-card-content {

    flex: 1;

    text-align: center;
}


.app-card h3 {

    font-size: 16px;

    letter-spacing: -0.02em;

    margin-bottom: 6px;
}


.app-card p {

    min-height: 48px;

    color: var(--text-soft);

    font-size: 11px;

    line-height: 1.55;

    display:
        -webkit-box;

    -webkit-line-clamp: 3;

    -webkit-box-orient: vertical;

    overflow: hidden;
}


/* ============================================================
   APP CATEGORIES
============================================================ */

.app-categories {

    display: flex;

    flex-wrap: wrap;

    justify-content: center;

    gap: 5px;

    margin-top: 12px;
}


.app-categories span {

    padding:
        4px 7px;

    border-radius: 6px;

    color: var(--text-light);

    background:
        var(--surface-soft);

    font-size: 8px;

    font-weight: 700;
}


/* ============================================================
   OPEN BUTTON
============================================================ */

.app-open-button {

    width: 100%;

    margin-top: 17px;

    padding:
        10px;

    border: 0;

    border-radius: 11px;

    color: white;

    background: var(--primary);

    font-size: 12px;

    font-weight: 800;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}


.app-open-button:hover {

    background: var(--primary-dark);
}


.app-open-button span {

    display: inline-block;

    margin-left: 4px;

    transition:
        transform 0.2s ease;
}


.app-open-button:hover span {

    transform:
        translateX(3px);
}