/* MarketCity – Bienvenida (colores de marca: navy, azul eléctrico, amarillo) */
.mcb-overlay, .mcb-pill {
	--mcb-primary: #0b5cff;
	--mcb-accent: #fcd116;
	--mcb-dark: #0a1628;
	--mcb-ink: #0f172a;
	--mcb-muted: #5b6678;
	--mcb-line: #e3e8f0;
	--mcb-soft: #f3f5f8;
	--mcb-radius: 22px;
	font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.mcb-overlay *, .mcb-overlay *::before, .mcb-overlay *::after,
.mcb-pill *, .mcb-pill *::before, .mcb-pill *::after { box-sizing: border-box; }
html.mcb-lock, html.mcb-lock body { overflow: hidden !important; }
.mcb-overlay [hidden] { display: none !important; }

.mcb-overlay {
	position: fixed; inset: 0; z-index: 2147483000;
	display: flex; align-items: center; justify-content: center;
	padding: 16px;
	background: radial-gradient(1200px 600px at 50% 0%, rgba(11, 92, 255, .35), transparent 60%), rgba(6, 12, 26, .78);
	backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
	opacity: 0; transition: opacity .35s ease;
}
.mcb-overlay.mcb-open { opacity: 1; }

.mcb-modal {
	position: relative;
	width: 100%; max-width: 940px; max-height: calc(100dvh - 32px); overflow: auto;
	background: #fff; color: var(--mcb-ink);
	border-radius: var(--mcb-radius);
	box-shadow: 0 40px 100px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08);
	transform: translateY(30px) scale(.95); transition: transform .45s cubic-bezier(.2, .9, .25, 1.15);
	scrollbar-width: thin;
}
.mcb-open .mcb-modal { transform: none; }
.mcb-modal-video { max-width: 880px; background: var(--mcb-dark); color: #fff; }

.mcb-close {
	position: absolute; top: 12px; right: 12px; z-index: 5;
	width: 38px; height: 38px; border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .92); color: var(--mcb-ink);
	font-size: 24px; line-height: 1; cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.mcb-close:hover { background: #fff; transform: rotate(90deg); transition: transform .2s; }

/* ---------- chips ---------- */
.mcb-chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 6px 12px; border-radius: 999px;
	font-size: 12px; font-weight: 700; letter-spacing: .02em; line-height: 1.2;
}
.mcb-chip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.mcb-chip-dark { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .14); }
.mcb-chip-glass { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .18); text-transform: uppercase; letter-spacing: .08em; }
.mcb-chip-soft { background: #eaf1ff; color: var(--mcb-primary); }
.mcb-chip-ok { background: #e7f8ef; color: #0f8a4a; }
.mcb-live { width: 8px; height: 8px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 0 0 rgba(255, 59, 59, .6); animation: mcb-live 1.4s infinite; }
@keyframes mcb-live { 70% { box-shadow: 0 0 0 8px rgba(255, 59, 59, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 59, 0); } }

/* ---------- botones ---------- */
.mcb-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	width: 100%; padding: 16px 22px;
	border: 0; border-radius: 14px; cursor: pointer;
	background: linear-gradient(180deg, #ffe04a, var(--mcb-accent) 45%, #f5b800);
	color: var(--mcb-dark) !important;
	font: 800 17px/1.1 Poppins, system-ui, sans-serif; text-decoration: none !important; letter-spacing: .01em;
	box-shadow: 0 6px 0 #c99400, 0 12px 24px rgba(245, 184, 0, .35);
	transition: transform .12s, box-shadow .12s, filter .2s;
	position: relative; overflow: hidden;
}
.mcb-btn::after { /* brillo que cruza el botón */
	content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .65), transparent);
	transform: skewX(-20deg); animation: mcb-shine 2.8s infinite;
}
@keyframes mcb-shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.mcb-btn:hover { filter: brightness(1.04); }
.mcb-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #c99400, 0 6px 12px rgba(245, 184, 0, .3); }
.mcb-btn:disabled { cursor: wait; filter: saturate(.6); }
.mcb-btn:disabled::after { animation: none; }

/* =========================================================
 * Paso 1 · video
 * ======================================================= */
.mcb-stage { animation: mcb-in .45s ease both; }
.mcb-stage.mcb-leave { animation: mcb-out .28s ease both; }
@keyframes mcb-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes mcb-out { to { opacity: 0; transform: scale(.97); } }

.mcb-stage-video {
	padding: 26px 26px 22px;
	background: radial-gradient(700px 300px at 85% -10%, rgba(11, 92, 255, .55), transparent 70%),
	            radial-gradient(500px 260px at 0% 110%, rgba(56, 67, 208, .45), transparent 70%), var(--mcb-dark);
}
.mcb-vhead { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 0 48px 16px 0; }
.mcb-vhead h2 { margin: 0; color: #fff; font: 800 clamp(20px, 3.2vw, 30px)/1.15 Poppins, system-ui, sans-serif; }
.mcb-vframe {
	position: relative; aspect-ratio: 16 / 9; width: 100%;
	border-radius: 16px; overflow: hidden; background: #000;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 20px 50px rgba(0, 0, 0, .5);
}
.mcb-vid { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.mcb-unmute {
	position: absolute; left: 14px; bottom: 18px; display: inline-flex; align-items: center; gap: 8px;
	padding: 9px 14px; border: 0; border-radius: 999px; cursor: pointer;
	background: rgba(255, 255, 255, .95); color: var(--mcb-dark); font: 700 13px Poppins, sans-serif;
}
.mcb-unmute svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mcb-vbar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); }
.mcb-vbar i { display: block; height: 100%; width: 0; background: var(--mcb-accent); transition: width .25s linear; }

.mcb-vfoot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.mcb-teaser { display: flex; align-items: center; gap: 10px; margin: 0; color: rgba(255, 255, 255, .8); font-size: 14px; }
.mcb-teaser svg { flex: none; width: 26px; height: 26px; fill: none; stroke: var(--mcb-accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mcb-teaser b { color: #fff; }
.mcb-vbtns { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.mcb-vbtns .mcb-btn { width: auto; padding: 14px 22px; font-size: 16px; }
.mcb-skip {
	padding: 13px 16px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 12px;
	background: transparent; color: rgba(255, 255, 255, .85); font: 600 14px Poppins, sans-serif; cursor: pointer; white-space: nowrap;
}
.mcb-skip:disabled { opacity: .55; cursor: default; }
.mcb-skip:not(:disabled):hover { background: rgba(255, 255, 255, .08); }

/* =========================================================
 * Paso 2 · ruleta
 * ======================================================= */
.mcb-stage-game { display: grid; grid-template-columns: 1.05fr 1fr; }

.mcb-left {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
	padding: 30px 26px;
	color: #fff; overflow: hidden;
	background: radial-gradient(420px 320px at 50% 55%, rgba(11, 92, 255, .55), transparent 70%),
	            linear-gradient(160deg, #0d2a6b 0%, var(--mcb-dark) 55%, #06101f 100%);
	border-radius: var(--mcb-radius) 0 0 var(--mcb-radius);
}
.mcb-left::before { /* rayos de luz detrás de la ruleta */
	content: ""; position: absolute; left: 50%; top: 52%; width: 760px; height: 760px; translate: -50% -50%;
	background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .05) 0 8deg, transparent 8deg 22deg);
	animation: mcb-rays 40s linear infinite; pointer-events: none;
}
@keyframes mcb-rays { to { rotate: 360deg; } }
.mcb-left > * { position: relative; }
.mcb-left-note { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .75); }
.mcb-left-note b { color: var(--mcb-accent); }

.mcb-wheel-wrap { position: relative; width: min(100%, 360px); aspect-ratio: 1; }
.mcb-wheel {
	position: absolute; inset: 7%; width: 86%; height: 86%; border-radius: 50%;
	will-change: transform;
	box-shadow: 0 0 0 6px #fff, 0 18px 40px rgba(0, 0, 0, .45);
}
/* aro dorado con bombillos */
.mcb-bulbs {
	position: absolute; inset: 0; border-radius: 50%;
	background: conic-gradient(from 0deg, #f5b800, #ffe36b, #f5b800, #ffd000, #f5b800, #ffe36b, #f5b800);
	box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .15), 0 0 40px rgba(252, 209, 22, .35);
}
.mcb-bulbs i {
	position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px;
	border-radius: 50%;
	background: #fff8d6; box-shadow: 0 0 8px 2px rgba(255, 244, 180, .9);
	animation: mcb-blink 1.2s infinite;
}
.mcb-wheel-wrap { container-type: inline-size; }
.mcb-bulbs i:nth-child(odd) { animation-delay: .6s; }
.mcb-spinning .mcb-bulbs i { animation-duration: .25s; }
.mcb-won .mcb-bulbs i { animation: mcb-blink .18s 10; }
@keyframes mcb-blink { 50% { background: #ffc400; box-shadow: 0 0 2px rgba(255, 196, 0, .3); } }

.mcb-pointer {
	position: absolute; top: -2px; left: 50%; z-index: 3; width: 44px; height: 54px; translate: -50% 0;
	transform-origin: 50% 20%;
	background: linear-gradient(180deg, #ff4d4d, #d90429);
	clip-path: polygon(50% 100%, 0 28%, 18% 0, 82% 0, 100% 28%);
	filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .4));
}
.mcb-pointer::after { content: ""; position: absolute; left: 50%; top: 12px; width: 12px; height: 12px; translate: -50% 0; border-radius: 50%; background: #fff; }
.mcb-pointer.mcb-flick { animation: mcb-flick .12s ease-out; }
@keyframes mcb-flick { 40% { transform: rotate(-16deg); } }

.mcb-hub {
	position: absolute; top: 50%; left: 50%; z-index: 2; width: 21%; height: 21%; translate: -50% -50%;
	display: flex; align-items: center; justify-content: center; overflow: hidden;
	border-radius: 50%; background: var(--mcb-dark);
	border: 5px solid var(--mcb-accent);
	box-shadow: 0 6px 16px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 255, 255, .15);
}
.mcb-hub b { color: var(--mcb-accent); font: 900 clamp(16px, 4.6cqw, 24px) Poppins, sans-serif; }
.mcb-hub img { width: 78%; height: auto; object-fit: contain; }

.mcb-right { display: flex; flex-direction: column; justify-content: center; padding: 34px 32px 26px; }
.mcb-panel { display: flex; flex-direction: column; align-items: flex-start; }
.mcb-panel h2 { margin: 14px 0 8px; color: var(--mcb-ink); font: 800 clamp(22px, 2.8vw, 30px)/1.15 Poppins, system-ui, sans-serif; letter-spacing: -.01em; }
.mcb-cta { margin: 0 0 18px; color: var(--mcb-muted); font-size: 14px; line-height: 1.5; }

.mcb-form { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.mcb-field { display: flex; flex-direction: column; gap: 6px; }
.mcb-field span { font-size: 12px; font-weight: 700; color: var(--mcb-ink); }
.mcb-field input {
	width: 100%; padding: 14px 16px; font: 500 16px Poppins, system-ui, sans-serif; color: var(--mcb-ink);
	background: var(--mcb-soft); border: 2px solid transparent; border-radius: 12px; outline: none;
	transition: border-color .15s, background .15s;
}
.mcb-field input:focus { background: #fff; border-color: var(--mcb-primary); box-shadow: 0 0 0 4px rgba(11, 92, 255, .12); }
.mcb-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--mcb-muted); line-height: 1.45; cursor: pointer; }
.mcb-consent input { flex: none; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--mcb-primary); }
.mcb-consent a { color: var(--mcb-primary); font-weight: 600; }
.mcb-error { min-height: 1em; margin: 0; color: #d90429; font-size: 13px; font-weight: 600; }
.mcb-later { align-self: center; margin-top: 4px; padding: 4px; border: 0; background: none; color: #8a93a6; font: 500 13px Poppins, sans-serif; text-decoration: underline; cursor: pointer; }

/* confianza (estilo Amazon: sobrio, claro) */
.mcb-trust {
	display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px;
	margin: 22px 0 0; padding: 16px 0 0; list-style: none; border-top: 1px solid var(--mcb-line);
}
.mcb-trust li { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; font-weight: 600; color: #334155; line-height: 1.3; }
.mcb-trust svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--mcb-primary); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ganadores recientes (prueba social estilo Temu, con datos reales) */
.mcb-ticker {
	grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 10px;
	padding: 11px 16px; background: var(--mcb-dark); color: rgba(255, 255, 255, .85); font-size: 13px;
	border-radius: 0 0 var(--mcb-radius) var(--mcb-radius);
}
.mcb-ticker b { color: var(--mcb-accent); font-weight: 700; }
.mcb-ticker-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); }
.mcb-ticker-txt.mcb-in { animation: mcb-tick .4s ease both; }
@keyframes mcb-tick { from { opacity: 0; transform: translateY(8px); } }
.mcb-stage-game:has(.mcb-ticker) .mcb-left { border-radius: var(--mcb-radius) 0 0 0; }

/* =========================================================
 * Paso 3 · premio
 * ======================================================= */
.mcb-pop { animation: mcb-popin .5s cubic-bezier(.2, .9, .25, 1.3) both; }
@keyframes mcb-popin { from { opacity: 0; transform: scale(.9); } }
.mcb-prize {
	margin: 14px 0 0; font: 900 clamp(38px, 5.4vw, 54px)/1 Poppins, system-ui, sans-serif; letter-spacing: -.02em;
	background: linear-gradient(90deg, var(--mcb-primary), #3843d0); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mcb-prize-sub { margin: 6px 0 18px; color: var(--mcb-muted); font-size: 14px; }

.mcb-ticket {
	position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
	padding: 14px 14px 14px 20px; border-radius: 14px;
	background: linear-gradient(135deg, #fff9db, #fff3b0); border: 2px dashed #e0b300;
}
.mcb-ticket::before, .mcb-ticket::after { /* muescas de boleto */
	content: ""; position: absolute; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: #fff;
}
.mcb-ticket::before { left: -11px; border-right: 2px dashed #e0b300; }
.mcb-ticket::after { right: -11px; border-left: 2px dashed #e0b300; }
.mcb-ticket-l { display: flex; flex-direction: column; }
.mcb-ticket-l small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #8a6d00; }
.mcb-code { font: 800 24px/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .12em; color: var(--mcb-dark); }
.mcb-copy {
	flex: none; padding: 10px 16px; border: 0; border-radius: 10px; cursor: pointer;
	background: var(--mcb-dark); color: #fff; font: 700 13px Poppins, sans-serif;
}
.mcb-copy.mcb-ok { background: #0f8a4a; }
.mcb-timer { margin: 10px 0 2px; font-size: 13px; color: var(--mcb-muted); }
.mcb-timer b { color: #d90429; font-variant-numeric: tabular-nums; }
.mcb-auto { display: flex; align-items: center; gap: 6px; margin: 0 0 16px; font-size: 13px; color: #0f8a4a; font-weight: 600; }
.mcb-auto svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.mcb-paylater { align-self: stretch; text-align: center; margin: 12px 0 0; font-size: 13px; color: var(--mcb-muted); }
.mcb-paylater b { color: var(--mcb-primary); }

/* confeti */
.mcb-confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 6; }
.mcb-confetti i { position: absolute; top: -24px; border-radius: 2px; animation: mcb-fall linear forwards; }
@keyframes mcb-fall { to { transform: translate(var(--x, 40px), 112vh) rotate(900deg); } }

/* =========================================================
 * Cupón flotante
 * ======================================================= */
.mcb-pill {
	position: fixed; left: 16px; bottom: 16px; z-index: 2147482000;
	display: flex; align-items: stretch;
	background: var(--mcb-dark); color: #fff; border-radius: 16px;
	box-shadow: 0 14px 34px rgba(6, 16, 31, .35), 0 0 0 1px rgba(255, 255, 255, .08);
	transform: translateY(140%); transition: transform .5s cubic-bezier(.2, .9, .25, 1.2);
	max-width: calc(100vw - 32px);
}
.mcb-pill.mcb-in { transform: none; }
.mcb-pill-main { display: flex; align-items: center; gap: 10px; padding: 10px 6px 10px 10px; border: 0; background: none; color: inherit; cursor: pointer; text-align: left; font-family: inherit; min-width: 0; }
.mcb-pill-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--mcb-accent); animation: mcb-wiggle 3s infinite; }
.mcb-pill-ico svg { width: 22px; height: 22px; fill: none; stroke: var(--mcb-dark); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes mcb-wiggle { 0%, 85%, 100% { transform: rotate(0); } 88% { transform: rotate(-12deg); } 92% { transform: rotate(10deg); } 96% { transform: rotate(-6deg); } }
.mcb-pill-txt { display: flex; flex-direction: column; min-width: 0; }
.mcb-pill-txt b { font-size: 15px; font-weight: 800; color: var(--mcb-accent); line-height: 1.2; }
.mcb-pill-txt small { font-size: 12px; color: rgba(255, 255, 255, .8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.mcb-pill-code { font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: #fff; }
.mcb-pill-x { flex: none; width: 34px; border: 0; background: none; color: rgba(255, 255, 255, .6); font-size: 20px; cursor: pointer; border-left: 1px solid rgba(255, 255, 255, .1); }
.mcb-pill-x:hover { color: #fff; }

/* =========================================================
 * Móvil
 * ======================================================= */
@media (max-width: 760px) {
	.mcb-overlay { padding: 10px; align-items: flex-end; }
	.mcb-modal { max-height: calc(100dvh - 20px); border-radius: 20px; }
	.mcb-stage-video { padding: 18px 14px 16px; }
	.mcb-vhead { margin-right: 44px; }
	.mcb-vfoot { flex-direction: column; align-items: stretch; }
	.mcb-vbtns { flex-direction: row-reverse; }
	.mcb-vbtns .mcb-btn { flex: 1; }

	.mcb-stage-game { grid-template-columns: 1fr; }
	.mcb-left { padding: 20px 16px 16px; gap: 12px; border-radius: 20px 20px 0 0 !important; }
	.mcb-wheel-wrap { width: min(72vw, 270px); }
	.mcb-right { padding: 20px 18px 18px; }
	.mcb-panel h2 { margin-top: 10px; }
	.mcb-cta { margin-bottom: 14px; }
	.mcb-trust { gap: 8px 10px; margin-top: 16px; padding-top: 12px; }
	.mcb-trust li { font-size: 11px; }
	.mcb-ticker { font-size: 12px; border-radius: 0 0 20px 20px; }
	.mcb-pill { left: 10px; right: auto; bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	.mcb-btn::after, .mcb-left::before, .mcb-bulbs i, .mcb-pill-ico, .mcb-live { animation: none !important; }
	.mcb-modal, .mcb-pill { transition: none; }
}
