/* Web Modpack — плитки модів (варіант B: вибір на сайті, установка через g-ua:// хелпер) */

.mp-app {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1rem;
    background: rgba(10, 15, 30, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
}

.mp-side {
    background: rgba(255, 255, 255, 0.03);
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-height: 420px;
}

.mp-search {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
}

.mp-cat {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 0.95rem;
}

.mp-cat i { width: 18px; text-align: center; opacity: 0.85; }

.mp-cat .cnt {
    margin-left: auto;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.05rem 0.5rem;
}

.mp-cat.active { background: rgba(255, 170, 40, 0.16); }

.mp-side .hint { font-size: 0.8rem; opacity: 0.65; margin-top: auto; }

.mp-main { padding: 0.9rem; display: flex; flex-direction: column; gap: 0.8rem; }

.mp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.7rem;
}

.mp-tile {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    padding: 0;
    color: inherit;
    text-align: left;
}

.mp-tile img, .mp-tile .noimg {
    width: 100%;
    height: 96px;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, #1b2740, #0c1322);
}

.mp-tile .noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    opacity: 0.7;
}

.mp-tile .t {
    display: block;
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-tile .check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.mp-tile.sel { border-color: #f5a623; }
.mp-tile.sel .check { background: #f5a623; color: #111; border-color: #f5a623; }

.mp-tile .eye {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mp-foot {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.8rem;
}

.mp-foot .total { margin-left: auto; font-size: 0.9rem; opacity: 0.85; }

.mp-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.mp-modal[hidden] { display: none; }

.mp-card {
    max-width: 560px;
    width: 100%;
    background: #131b2e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    overflow: hidden;
}

.mp-card img { width: 100%; max-height: 280px; object-fit: cover; display: block; }

.mp-card .body { padding: 1rem 1.1rem; }
.mp-card .body h3 { margin: 0 0 0.4rem; }
.mp-card .meta { font-size: 0.82rem; opacity: 0.75; margin-bottom: 0.5rem; }
.mp-card .actions { display: flex; gap: 0.6rem; margin-top: 0.9rem; }

.mp-note {
    font-size: 0.85rem;
    opacity: 0.8;
    background: rgba(245, 166, 35, 0.08);
    border: 1px solid rgba(245, 166, 35, 0.3);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
}

@media (max-width: 760px) {
    .mp-app { grid-template-columns: 1fr; }
    .mp-side { min-height: unset; border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.07); }
}
