/* ==========================================================================
   MTG_v2 - Legenda Rang (izolowane style .mtggl, bez zmian w motywie IPS)
   ========================================================================== */
.mtggl {
    font-family: 'Lato', sans-serif;
    background: #0b0304;
    border: 1px solid #3d0e15;
    border-radius: 10px;
    padding: 18px 20px 20px;
    margin: 15px 0 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    box-sizing: border-box;
    color: #f2e9eb;
}

.mtggl *,
.mtggl *::before,
.mtggl *::after {
    box-sizing: border-box;
}

.mtggl__header {
    margin: 0 0 16px 0;
    padding: 0;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.mtggl__grid {
    display: grid;
    grid-template-columns: repeat(var(--mtggl-cols, 5), minmax(0, 1fr));
    gap: 16px;
}

.mtggl__col {
    position: relative;
    background: linear-gradient(180deg, #130507 0%, #0d0304 100%);
    border: 1px solid #2b090e;
    border-radius: 10px;
    padding: 16px 18px;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Czerwona poświata na górnej krawędzi karty dopasowana pod MTG_v2 */
.mtggl__col::before {
    content: "";
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #bb1e35, transparent);
    opacity: 0.85;
}

.mtggl__col:hover {
    border-color: #6e1522;
    box-shadow: 0 6px 20px rgba(139, 18, 36, 0.16);
}

.mtggl__col-title {
    margin: 0 0 14px 0;
    padding: 0;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #f2e9eb;
}

.mtggl__list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mtggl__item {
    display: flex;
    align-items: center;
    min-height: 24px;
    margin: 0 !important;
    padding: 0 !important;
}

.mtggl__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform 0.2s ease, filter 0.2s ease;
    overflow: visible !important;
}

.mtggl__link:hover {
    transform: translateX(3px);
    filter: brightness(1.15);
}

/* Pełne wsparcie dla animowanych rang z ACP (.mtg-rank-badge / GIF-y) */
.mtggl__link .mtg-rank-badge {
    padding: 0 3px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    overflow: visible !important;
}

.mtggl__state {
    font-size: 12px;
    color: #9e8a90;
    padding: 6px 0;
}

@media screen and (max-width: 1200px) {
    .mtggl__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .mtggl__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 480px) {
    .mtggl__grid {
        grid-template-columns: 1fr;
    }
}
