/* =====================================================================
   MovieDokan — Popular Platforms designs (inc/md-platforms.php)
   A: colour ring · H: ring + "new" ribbon · I: glowing ring · N: capsule
   --a = platform colour (set per platform in Admin → MovieDokan → Popular Platforms)
   ===================================================================== */

/* letter placeholder when a platform has no logo */
.platform-logo .md-pf-ph {
    display: flex; align-items: center; justify-content: center;
    width: 78px; height: 78px; margin: 0 auto; border-radius: 50%;
    background: linear-gradient(135deg, var(--a, var(--md-accent, #e50914)), #3b0764);
    color: #fff; font: 700 22px/1 var(--md-font, Roboto, sans-serif); letter-spacing: .5px;
}

/* ---------- shared: ring with the platform's own colour ---------- */
.platform-logo.md-pf { --a: var(--md-accent, #e50914); }
.platform-logo.md-pf a { position: relative; }
.platform-logo.md-pf .md-pf-ring {
    position: relative;
    display: block;
    width: 84px; height: 84px;
    padding: 3px;
    border-radius: 50%;
    background: conic-gradient(from 210deg, var(--a), color-mix(in srgb, var(--a) 55%, #fff), var(--a));
    box-shadow: 0 12px 24px -14px rgba(0, 0, 0, .95);
    transition: transform .3s var(--md-ease, ease), box-shadow .3s ease;
}
.platform-logo.md-pf .md-pf-ring img,
.platform-logo.md-pf .md-pf-ring .md-pf-ph {
    position: relative; z-index: 1;
    display: block;
    width: 100% !important; height: 100% !important;
    margin: 0 !important; padding: 0 !important;
    object-fit: cover;
    border-radius: 50% !important;
    border: 3px solid var(--md-bg, #050507) !important;
    background: var(--md-solid, #111116) !important;
    box-shadow: none !important;
    box-sizing: border-box;
    transform: none !important;
}
.platform-logo.md-pf a:hover .md-pf-ring {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 14px 30px -12px var(--a);
}
.platform-logo.md-pf p { max-width: 96px; }

/* ---------- H: "NEW" ribbon under the ring (one colour for all) ---------- */
.platform-logo.md-pf-h .md-pf-rib {
    position: absolute; z-index: 2;
    left: 50%; top: 73px;
    transform: translateX(-50%);
    padding: 2px 8px;
    border-radius: 6px;
    border: 2px solid var(--md-bg, #050507);
    background: #e50914;              /* same red for every platform, so the text is always readable */
    color: #fff;
    font: 800 10px/1.35 var(--md-font, Roboto, sans-serif);
    letter-spacing: .6px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .8);
}
.platform-logo.md-pf-h p { margin-top: 6px; }
.platform-logo.md-pf-h a:hover .md-pf-rib { transform: translateX(-50%) translateY(-3px); transition: transform .3s var(--md-ease, ease); }

/* ---------- I: glowing ring with a moving light ---------- */
.platform-logo.md-pf-i .md-pf-ring {
    overflow: hidden;
    background: color-mix(in srgb, var(--a) 70%, #000);
    box-shadow: 0 0 22px -4px var(--a), 0 12px 24px -14px rgba(0, 0, 0, .95);
}
.platform-logo.md-pf-i .md-pf-ring::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: conic-gradient(from 0deg, var(--a), #fff 9%, var(--a) 22%, color-mix(in srgb, var(--a) 45%, #000) 60%, var(--a));
    animation: mdPfSpin 3.6s linear infinite;
}
.platform-logo.md-pf-i a:hover .md-pf-ring { box-shadow: 0 0 30px -2px var(--a), 0 14px 30px -12px var(--a); }
@keyframes mdPfSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .platform-logo.md-pf-i .md-pf-ring::before { animation: none; }
}

/* ---------- N: capsule (logo + name + titles) ---------- */
.platform-logo.md-pf-n a {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 5px 18px 5px 5px;
    border-radius: 40px;
    background: var(--md-solid, #16161d);
    border: 1px solid var(--md-line, rgba(255, 255, 255, .07));
    transition: border-color .25s ease, background .25s ease, transform .25s ease;
}
.platform-logo.md-pf-n .md-pf-ring {
    flex: 0 0 auto;
    width: 48px; height: 48px;
    padding: 2px;
    background: var(--a);
    box-shadow: none;
}
.platform-logo.md-pf-n .md-pf-ring img,
.platform-logo.md-pf-n .md-pf-ring .md-pf-ph { border-width: 2px !important; border-color: var(--md-solid, #16161d) !important; font-size: 14px; }
.platform-logo.md-pf-n .md-pf-txt { display: flex; flex-direction: column; align-items: flex-start; text-align: left; line-height: 1.25; }
.platform-logo.md-pf-n .md-pf-txt b { font: 600 14px/1.25 var(--md-font, Roboto, sans-serif); color: var(--md-text, #f5f5f7); white-space: nowrap; }
.platform-logo.md-pf-n .md-pf-txt small { font-size: 11px; color: var(--md-dim, #71717a); white-space: nowrap; }
.platform-logo.md-pf-n a:hover { border-color: var(--a); background: color-mix(in srgb, var(--a) 12%, var(--md-solid, #16161d)); transform: translateY(-2px); }
.platform-logo.md-pf-n a:hover .md-pf-ring { transform: none; box-shadow: none; }

/* ---------- 🔥 Trending: fire ring (any design) ---------- */
.platform-logo.md-pf-fire { --fire: conic-gradient(from 0deg, #ffd166, #ff7a00, #ff3d00, #ff7a00, #ffd166); }
.platform-logo.md-pf-fire .md-pf-flame {
    position: absolute; z-index: 3;
    left: 50%; top: -15px;
    transform: translateX(-50%);
    font-size: 20px; line-height: 1;
    filter: drop-shadow(0 0 6px #ff6a00);
    pointer-events: none;
    animation: mdPfFlame 1.6s ease-in-out infinite;
}
.platform-logo.md-pf-fire .md-pf-ring {
    background: var(--fire);
    box-shadow: 0 0 22px -2px #ff6a00, 0 12px 24px -14px rgba(0, 0, 0, .95);
    }
.platform-logo.md-pf-fire.md-pf-i .md-pf-ring::before { background: conic-gradient(from 0deg, #ffd166, #fff 8%, #ff7a00 22%, #ff3d00 55%, #ffd166); }
.platform-logo.md-pf-fire p,
.platform-logo.md-pf-fire.md-pf-n .md-pf-txt b { color: #ffb547 !important; }
.platform-logo.md-pf-fire.md-pf-n a { border-color: rgba(255, 106, 0, .55); }
.platform-logo.md-pf-fire.md-pf-n .md-pf-flame { left: 30px; top: -12px; font-size: 16px; }
/* classic design */
.platform-logo.md-pf-fire:not(.md-pf) img {
    background: linear-gradient(#111116, #111116) padding-box, var(--fire) border-box !important;
    box-shadow: 0 0 22px -2px #ff6a00 !important;
}
@keyframes mdPfFlame { 0%, 100% { transform: translateX(-50%) scale(1) rotate(-4deg); } 50% { transform: translateX(-50%) scale(1.12) rotate(4deg); } }
@keyframes mdPfGlow { 0%, 100% { box-shadow: 0 0 18px -3px #ff6a00, 0 12px 24px -14px rgba(0, 0, 0, .95); } 50% { box-shadow: 0 0 28px 0 #ff7a00, 0 12px 24px -14px rgba(0, 0, 0, .95); } }
@media (prefers-reduced-motion: reduce) {
    .platform-logo.md-pf-fire .md-pf-flame, .platform-logo.md-pf-fire .md-pf-ring { animation: none; }
}
/* the flame needs room above the ring */
.platforms-scroll { padding-top: 20px !important; }

/* page dots (two-row mobile strip) */
.md-pf-dots { display: none; }

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
    /* 📱 two rows: column 1 = #1 & #2, column 2 = #3 & #4 … (swipe sideways for more) */
    .platforms-scroll.md-pf-2rows {
        display: grid !important;
        grid-auto-flow: column;
        grid-template-rows: repeat(2, auto);
        grid-auto-columns: 76px;
        gap: 18px 12px !important;
        scroll-snap-type: x mandatory;
    }
    .platforms-scroll.md-pf-2rows:has(.md-pf-n) { grid-auto-columns: max-content; }
    .platforms-scroll.md-pf-2rows .platform-logo { scroll-snap-align: start; min-width: 0; }
    .md-pf-dots { display: flex; justify-content: center; gap: 5px; margin: 2px 0 6px; }
    .md-pf-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .22); transition: width .25s ease, background .25s ease; }
    .md-pf-dots i.on { width: 18px; background: var(--md-accent, #e50914); }

    .platform-logo.md-pf .md-pf-ring { width: 70px; height: 70px; }
    .platform-logo .md-pf-ph { width: 64px; height: 64px; font-size: 18px; }
    .platform-logo.md-pf-h .md-pf-rib { top: 60px; font-size: 10px; padding: 1px 6px; }
    .platform-logo.md-pf p { max-width: 78px; }
    .platform-logo.md-pf-n .md-pf-ring { width: 42px; height: 42px; }
    .platform-logo.md-pf-n a { padding: 4px 14px 4px 4px; }
    .platform-logo.md-pf-n .md-pf-txt b { font-size: 13px; }
}
