/* ==========================================================================
   Megido Videos — visor (celular: estilo TikTok; PC: categorias | video | botones | siguientes)
   Usa las variables del tema Gothic Silver con valores de respaldo para otros temas.
   ========================================================================== */
.content-area:has(#mv-page) { display: block !important; padding: 14px !important; }
.content-area:has(#mv-page) .left-column,
.content-area:has(#mv-page) .right-column { display: none !important; }
.content-area:has(#mv-page) .center-column { width: 100% !important; max-width: none !important; }

.mv-page {
    --mv-silver: var(--gs-silver, #d9dde3);
    --mv-crimson: var(--gs-crimson, #c0182a);
    --mv-panel: var(--gs-panel, rgba(9, 10, 12, 0.92));
    display: grid;
    grid-template-columns: 210px minmax(320px, 470px) 74px 280px;
    justify-content: center;
    gap: 22px;
    align-items: start;
    color: #e6e8ec;
    font-family: 'Inter', 'Roboto', sans-serif;
}

/* ---------- Categorias ---------- */
.mv-cats {
    position: sticky; top: 12px;
    background: var(--mv-panel);
    border: 1px solid rgba(217, 221, 227, 0.22);
    border-radius: 6px;
    padding: 16px 12px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6), 0 10px 26px rgba(0, 0, 0, 0.6);
}
.mv-brand { text-align: center; margin-bottom: 14px; }
.mv-brand img { width: 100%; max-width: 170px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8)); }
.mv-brand span {
    display: block; margin-top: -4px;
    font-family: 'Cinzel', serif; letter-spacing: 6px; font-size: 13px; color: var(--mv-silver);
    text-shadow: 0 0 8px rgba(220, 225, 235, 0.35);
}
.mv-cat-list { display: flex; flex-direction: column; gap: 8px; }
.mv-cat {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 4px;
    border: 1px solid rgba(217, 221, 227, 0.14);
    background: rgba(0, 0, 0, 0.45);
    color: #d4d7dc; font-family: 'Cinzel', serif; font-size: 14px; text-decoration: none;
    transition: border-color .2s, background .2s, color .2s;
}
.mv-cat i { width: 18px; text-align: center; color: var(--mv-silver); }
.mv-cat:hover { border-color: rgba(217, 221, 227, 0.45); color: #fff; }
.mv-cat.active {
    background: linear-gradient(90deg, rgba(192, 24, 42, 0.85), rgba(110, 11, 18, 0.85));
    border-color: var(--mv-silver); color: #fff;
    box-shadow: 0 0 14px rgba(192, 24, 42, 0.45);
}

/* ---------- Escenario ---------- */
.mv-stage { position: relative; }
.mv-feed {
    height: min(80vh, 840px);
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    border-radius: 10px;
    background: #000;
    border: 2px solid rgba(217, 221, 227, 0.55);
    box-shadow: 0 0 0 1px #000, 0 0 22px rgba(0, 0, 0, 0.9), 0 0 16px rgba(192, 24, 42, 0.25);
}
.mv-feed::-webkit-scrollbar { display: none; }
.mv-item {
    position: relative;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
}
.mv-frame { position: relative; flex: 1; overflow: hidden; background: #000; }
.mv-blur {
    position: absolute; inset: -30px;
    background-size: cover; background-position: center;
    filter: blur(28px) brightness(0.42);
}
.mv-video { position: relative; width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.mv-horizontal .mv-video { object-fit: contain; }
.mv-vertical .mv-blur { display: none; }

.mv-play-hint {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 74px; height: 74px; border-radius: 50%;
    display: none; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.45); border: 2px solid rgba(217, 221, 227, 0.8);
    color: #fff; font-size: 28px; pointer-events: none;
}
.mv-item.paused .mv-play-hint { display: flex; }

.mv-sound, .mv-full {
    position: absolute; top: 12px; z-index: 3;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid rgba(217, 221, 227, 0.6);
    background: rgba(0, 0, 0, 0.5); color: #fff; cursor: pointer;
}
.mv-sound { left: 12px; }
.mv-full { right: 12px; }

.mv-info {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    padding: 70px 16px 22px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.45) 60%, transparent);
    pointer-events: none;
}
.mv-info a { pointer-events: auto; }
.mv-author { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.mv-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--mv-silver); background: #111; color: var(--mv-silver); font-size: 12px;
}
.mv-badge { color: #ff3b47; font-weight: 600; }
.mv-info h2 {
    margin: 0 0 6px; font-family: 'Cinzel', serif; font-size: 19px; color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}
.mv-tag {
    display: inline-block; padding: 2px 10px; border-radius: 4px;
    background: rgba(139, 16, 24, 0.75); border: 1px solid #c0182a;
    color: #fff; font-size: 13px; text-decoration: none;
}
.mv-info p { margin: 8px 0 0; font-size: 13px; color: #cfd2d7; max-height: 3.9em; overflow: hidden; }
.mv-progress {
    position: absolute; left: 14px; right: 14px; bottom: 8px; z-index: 3;
    height: 4px; border-radius: 2px; background: rgba(217, 221, 227, 0.25); cursor: pointer;
}
.mv-progress i {
    display: block; height: 100%; width: 0; border-radius: 2px;
    background: linear-gradient(90deg, #8b1018, #ff3b47);
    box-shadow: 0 0 8px rgba(255, 59, 71, 0.7);
}

/* ---------- Botones ---------- */
.mv-side {
    position: sticky; top: 12px;
    height: min(80vh, 840px);
    display: flex; flex-direction: column; align-items: center; justify-content: space-between;
}
.mv-side-actions { display: flex; flex-direction: column; align-items: center; }
.mv-actions { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.mv-item > .mv-actions { position: absolute; right: 10px; bottom: 96px; z-index: 4; }
.mv-arrow {
    width: 54px; height: 40px; border-radius: 6px; cursor: pointer;
    border: 1px solid rgba(217, 221, 227, 0.55); background: rgba(0, 0, 0, 0.55); color: #fff;
}
.mv-arrow:hover { border-color: #fff; box-shadow: 0 0 12px rgba(255, 59, 71, 0.5); }
.mv-btn {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    background: none; border: 0; padding: 0; cursor: pointer;
    color: #e6e8ec; text-decoration: none; font: inherit;
}
.mv-btn span {
    width: 54px; height: 54px; display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff;
    background: radial-gradient(circle at 35% 30%, #2a2d33, #0b0c0e 70%);
    border: 2px solid var(--mv-silver);
    transform: rotate(45deg); border-radius: 8px;
    box-shadow: 0 0 0 1px #000, 0 0 10px rgba(220, 225, 235, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform .15s, box-shadow .2s;
}
.mv-btn span i { transform: rotate(-45deg); }
.mv-btn em { font-style: normal; font-size: 12px; font-weight: 600; text-shadow: 0 1px 3px #000; }
.mv-btn:hover span { box-shadow: 0 0 0 1px #000, 0 0 16px rgba(255, 59, 71, 0.6); }
.mv-like.on span { color: #ff2a3a; border-color: #ff3b47; box-shadow: 0 0 16px rgba(255, 42, 58, 0.75); }
.mv-like.pop span { transform: rotate(45deg) scale(1.18); }
.mv-views { cursor: default; }
.mv-playgame span {
    width: 62px; height: 62px;
    background: linear-gradient(to bottom, #c01a26, #6e0b12);
    box-shadow: 0 0 0 1px #000, 0 0 18px rgba(192, 24, 42, 0.75);
}
.mv-playgame em { font-family: 'Cinzel', serif; letter-spacing: 1px; color: #fff; }


/* ---------- Siguientes ---------- */
.mv-next-grid {
    background: var(--mv-panel);
    border: 1px solid rgba(217, 221, 227, 0.22);
    border-radius: 6px; padding: 14px;
    max-height: min(80vh, 840px); overflow-y: auto;
}
.mv-next-grid h3 {
    margin: 0 0 12px; text-align: center;
    font-family: 'Cinzel', serif; letter-spacing: 3px; font-size: 15px; color: var(--mv-silver);
}
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mv-card {
    position: relative; display: block; aspect-ratio: 9 / 13; overflow: hidden; border-radius: 4px;
    border: 1px solid rgba(217, 221, 227, 0.25);
}
.mv-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.mv-card:hover img { transform: scale(1.06); }
.mv-card.active { border-color: #ff3b47; box-shadow: 0 0 12px rgba(255, 59, 71, 0.6); }
.mv-card span {
    position: absolute; left: 6px; font-size: 11px; color: #fff;
    background: rgba(0, 0, 0, 0.65); padding: 1px 6px; border-radius: 3px;
}
.mv-card .d { top: 6px; }
.mv-card .w { bottom: 6px; }

.mv-empty, .mv-notfound {
    padding: 18px; margin-bottom: 12px; text-align: center; border-radius: 6px;
    background: var(--mv-panel); border: 1px solid rgba(217, 221, 227, 0.25); color: #d4d7dc;
}
.mv-notfound a { color: #ff3b47; }

/* ---------- Compartir / avisos ---------- */
.mv-sheet {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    display: flex; align-items: flex-end; justify-content: center;
}
.mv-sheet-box {
    position: relative; width: min(420px, 100%);
    background: #0b0c0e; border: 1px solid var(--mv-silver, #d9dde3); border-bottom: 0;
    border-radius: 12px 12px 0 0; padding: 22px 18px 26px;
    display: flex; flex-direction: column; gap: 10px;
}
.mv-sheet-box h3 { margin: 0 0 6px; text-align: center; font-family: 'Cinzel', serif; color: #fff; }
.mv-sheet-box a, .mv-sheet-box button:not(.close) {
    display: flex; align-items: center; gap: 10px; justify-content: center;
    padding: 12px; border-radius: 6px; border: 1px solid rgba(217, 221, 227, 0.3);
    background: #15171b; color: #fff; text-decoration: none; font: inherit; cursor: pointer;
}
.mv-sheet-box .wa { background: #1f9d55; border-color: #25d366; }
.mv-sheet-box .fb { background: #1b4fa3; border-color: #3b82f6; }
.mv-sheet-box .dc { background: #4752c4; border-color: #5865f2; }
.mv-sheet-box .dl { background: linear-gradient(to bottom, #c01a26, #6e0b12); border-color: #d9dde3; }
.mv-sheet-box .close {
    position: absolute; top: 8px; right: 12px; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer;
}
.mv-toast {
    position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 10001;
    background: rgba(10, 10, 12, 0.95); border: 1px solid var(--mv-silver, #d9dde3);
    color: #fff; padding: 10px 18px; border-radius: 6px; font-size: 14px;
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
    .mv-page { grid-template-columns: 180px minmax(300px, 440px) 74px; }
    .mv-next-grid { display: none; }
}

/* ---------- Celular: pantalla completa estilo TikTok ---------- */
@media (max-width: 760px) {
    .content-area:has(#mv-page) { padding: 0 !important; }
    .hero-banner:has(~ .content-area #mv-page) { display: none; }
    .mv-page { display: block; }
    .mv-cats {
        position: sticky; top: 0; z-index: 20; padding: 8px 6px; border-radius: 0;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.6));
        border: 0; box-shadow: none;
    }
    .mv-brand { display: none; }
    .mv-cat-list { flex-direction: row; overflow-x: auto; gap: 6px; scrollbar-width: none; }
    .mv-cat-list::-webkit-scrollbar { display: none; }
    .mv-cat { flex: 0 0 auto; padding: 6px 12px; font-size: 13px; background: transparent; border-color: transparent; }
    .mv-cat i { display: none; }
    .mv-cat.active { background: transparent; box-shadow: none; border-color: transparent; border-bottom: 2px solid #ff3b47; border-radius: 0; }
    .mv-feed { height: calc(100dvh - 52px); border-radius: 0; border: 0; box-shadow: none; }
    .mv-side { display: none; }
    .mv-actions { gap: 14px; }
    .mv-btn span { width: 46px; height: 46px; font-size: 19px; }
    .mv-playgame span { width: 52px; height: 52px; }
    .mv-info { padding-right: 76px; }
    .mv-full { top: 12px; }
}
