/* =====================================================================
   MU CAIDOS - INTRO - Paquete visual "caidos-ui"
   ---------------------------------------------------------------------
   Todo lo nuevo vive aqui. No reemplaza ningun CSS del intro: se carga
   DESPUES y solo retoca lo que hace falta.
   Indice:
     1. Variables de color
     2. Botones del menu izquierdo (3D)
     3. Iconos de redes sociales (3D)
     4. Logo con brillo (aura, reflejo de luz y destellos)
     5. Ventanas (Registro / Descargar) estilo RANKING
     6. Tarjetas y botones dentro de las ventanas
     7. Panel de TikTok metalizado (arriba a la derecha)
     8. Ventana del video de YouTube
     9. Pantallas chicas
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. VARIABLES
   ------------------------------------------------------------------- */
:root {
	--cd-oro:      #ffd34d;
	--cd-oro-2:    #f0b429;
	--cd-oro-osc:  #241a00;

	--cd-metal-1:  #5b6476;   /* brillo alto del metal */
	--cd-metal-2:  #39414f;
	--cd-metal-3:  #222833;
	--cd-metal-4:  #141821;   /* sombra del metal */

	--cd-verde:    #4CAF50;
	--cd-azul:     #2196F3;
	--cd-rojo:     #e60023;

	--cd-sombra:   0 14px 30px rgba(0,0,0,.6);
}

/* ---------------------------------------------------------------------
   2. BOTONES DEL MENU IZQUIERDO  -  relieve 3D
   Cada boton guarda su color original en --c y de ahi salen el filo,
   el resplandor y el icono.
   ------------------------------------------------------------------- */
.sidebar-menu .nav-button.inicio    { --c: #ffffff; }
.sidebar-menu .nav-button.registro  { --c: var(--cd-verde); }
.sidebar-menu .nav-button.ranking   { --c: var(--cd-oro); }
.sidebar-menu .nav-button.descargar { --c: var(--cd-azul); }

.sidebar-menu .nav-button {
	position: relative;
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 12px 14px;
	border: 1px solid rgba(255,255,255,.10);
	border-left: 4px solid var(--c);
	border-radius: 12px;
	background:
		linear-gradient(180deg, rgba(255,255,255,.09) 0%, rgba(255,255,255,0) 42%),
		linear-gradient(180deg, var(--cd-metal-2) 0%, var(--cd-metal-3) 45%, var(--cd-metal-4) 100%);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.22),
		inset 0 -2px 0 rgba(0,0,0,.55),
		0 5px 0 -1px rgba(0,0,0,.45),      /* el "canto" que da el grosor */
		0 10px 18px rgba(0,0,0,.55);
	text-shadow: 0 2px 3px rgba(0,0,0,.75);
	transition: transform .16s ease, box-shadow .16s ease, background .25s ease;
	will-change: transform;
}

/* Brillo que cruza el boton al pasar el mouse */
.sidebar-menu .nav-button::before {
	content: '';
	position: absolute;
	top: 0;
	left: -60%;
	width: 45%;
	height: 100%;
	background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.26) 50%, transparent 100%);
	transform: skewX(-18deg);
	opacity: 0;
	pointer-events: none;
}
.sidebar-menu .nav-button:hover::before {
	opacity: 1;
	animation: cdBrillo .7s ease forwards;
}
@keyframes cdBrillo {
	from { left: -60%; }
	to   { left: 115%; }
}

/* El resplandor redondo que ya traia el intro, ahora del color del boton */
.sidebar-menu .nav-button::after {
	background: radial-gradient(circle at 20% 50%,
		color-mix(in srgb, var(--c) 26%, transparent) 0%, transparent 72%);
}

.sidebar-menu .nav-button:hover {
	transform: translateY(-3px);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.3),
		inset 0 -2px 0 rgba(0,0,0,.55),
		0 8px 0 -1px rgba(0,0,0,.45),
		0 16px 26px rgba(0,0,0,.6),
		0 0 20px color-mix(in srgb, var(--c) 45%, transparent);
}

/* Al pulsar, el boton se hunde */
.sidebar-menu .nav-button:active {
	transform: translateY(3px);
	box-shadow:
		inset 0 3px 7px rgba(0,0,0,.75),
		0 1px 0 -1px rgba(0,0,0,.45),
		0 4px 8px rgba(0,0,0,.5);
}

/* Icono dentro de una chapita en relieve */
.sidebar-menu .nav-button i {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	color: var(--c);
	border-radius: 9px;
	background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(0,0,0,.4));
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.25),
		inset 0 -2px 4px rgba(0,0,0,.6),
		0 2px 4px rgba(0,0,0,.5);
	text-shadow: 0 0 10px color-mix(in srgb, var(--c) 70%, transparent);
}

/* Tarjeta del servidor: mismo acabado */
.sidebar .server-card {
	background:
		linear-gradient(180deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,0) 40%),
		linear-gradient(180deg, var(--cd-metal-3) 0%, var(--cd-metal-4) 100%);
	border: 1px solid rgba(255,255,255,.12);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.18),
		0 5px 0 -1px rgba(0,0,0,.45),
		0 12px 20px rgba(0,0,0,.55);
}
.sidebar .website-button {
	background: linear-gradient(180deg, #3aa9ff 0%, var(--cd-azul) 50%, #0f69b4 100%);
	border: 1px solid rgba(255,255,255,.2);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.4),
		0 3px 0 -1px rgba(0,0,0,.5),
		0 6px 12px rgba(0,0,0,.45);
	text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.sidebar .website-button:active {
	transform: translateY(2px);
	box-shadow: inset 0 3px 6px rgba(0,0,0,.6);
}

/* ---------------------------------------------------------------------
   3. ICONOS DE REDES  -  relieve 3D y color de cada red al pasar
   El atributo data-red lo pone el JS.
   ------------------------------------------------------------------- */
.social-sidebar .social-icon {
	position: relative;
	border-radius: 14px;
	border: 1px solid rgba(255,255,255,.12);
	background:
		linear-gradient(180deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 45%),
		linear-gradient(160deg, var(--cd-metal-2) 0%, var(--cd-metal-3) 50%, var(--cd-metal-4) 100%);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.26),
		inset 0 -3px 0 rgba(0,0,0,.55),
		0 5px 0 -2px rgba(0,0,0,.5),
		0 10px 16px rgba(0,0,0,.5);
	text-shadow: 0 2px 3px rgba(0,0,0,.7);
	transition: transform .16s ease, box-shadow .16s ease, background .25s ease;
	overflow: hidden;
}
.social-sidebar .social-icon::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(160deg, var(--r, #888) 0%, color-mix(in srgb, var(--r, #888) 45%, #000) 100%);
	opacity: 0;
	transition: opacity .22s ease;
}
.social-sidebar .social-icon i { position: relative; z-index: 1; }

.social-sidebar .social-icon:hover {
	transform: translateY(-3px);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.35),
		inset 0 -3px 0 rgba(0,0,0,.5),
		0 8px 0 -2px rgba(0,0,0,.5),
		0 14px 22px rgba(0,0,0,.55),
		0 0 18px color-mix(in srgb, var(--r, #888) 55%, transparent);
}
.social-sidebar .social-icon:hover::before { opacity: 1; }
.social-sidebar .social-icon:active {
	transform: translateY(3px);
	box-shadow: inset 0 3px 8px rgba(0,0,0,.8);
}

.social-sidebar .social-icon[data-red="facebook"]  { --r: #1877F2; }
.social-sidebar .social-icon[data-red="instagram"] { --r: #d6249f; }
.social-sidebar .social-icon[data-red="whatsapp"]  { --r: #25D366; }
.social-sidebar .social-icon[data-red="discord"]   { --r: #5865F2; }
.social-sidebar .social-icon[data-red="tiktok"]    { --r: #00f2ea; }
.social-sidebar .social-icon[data-red="kick"]      { --r: #53fc18; }
.social-sidebar .social-icon[data-red="twitch"]    { --r: #9146FF; }
.social-sidebar .social-icon[data-red="youtube"]   { --r: #FF0000; }

/* Boton de YouTube de abajo a la derecha, con el mismo acabado */
.youtube-button {
	border: 1px solid rgba(255,255,255,.14);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.2),
		0 4px 0 -1px rgba(0,0,0,.5),
		0 10px 18px rgba(0,0,0,.55);
}
.youtube-button:active { transform: translateY(2px); }

/* ---------------------------------------------------------------------
   4. LOGO CON BRILLO

   Sin fuego. El logo va limpio y nitido, y brilla con tres capas que
   NUNCA pintan encima del dibujo de forma permanente:

     a) AURA      Resplandor dorado DETRAS del logo, que respira.
     b) REFLEJO   Franja de luz que cruza el logo en diagonal cada pocos
                  segundos. Va recortada con la silueta del propio PNG
                  (mask-image): la luz solo pasa por encima del dibujo y
                  nunca se ve un rectangulo.
     c) DESTELLOS Estrellas de 4 puntas en las partes de metal (remache
                  de la M, disco y curva de la U, hoja de la espada y la
                  joya de la corona). Se encienden justo cuando la
                  franja de luz pasa por encima de cada una.

   Rendimiento: todo se anima solo con transform y opacity, que lo mueve
   la tarjeta grafica sin volver a dibujar la pagina. No hay ningun
   filtro animado: eso era lo que hacia pesado el fuego.

   TIEMPOS: el ciclo dura 6.5 s y el reflejo cruza en el primer 26 %
   (1.7 s), despues de esperar 1.4 s al cargar. El JS calcula con esos
   mismos numeros en que momento se enciende cada destello: si se
   cambian aqui, hay que cambiar BRILLO_* en caidos-ui.js.
   ------------------------------------------------------------------- */

/* El tamano del logo NO depende del JS: se aplica en cuanto carga esta
   hoja, asi no hay salto. "body" delante para ganarle a css/caidos.css,
   que lo forzaba a 150x150 con object-fit (dejaba franjas vacias). */
body .sidebar-logo {
	padding: 0;
	margin: 4px 0 20px;
	overflow: visible;
}
body .sidebar-logo img {
	display: block;
	width: 190px;
	max-width: none;
	height: auto;
	object-fit: initial;
	/* Solo una sombra oscura para despegarlo del video. Nada de halos de
	   color encima del dibujo: eso era lo que lo ensuciaba antes. */
	filter: drop-shadow(0 4px 9px rgba(0,0,0,.72));
}

/* Caja que envuelve SOLO la imagen: las capas del brillo se colocan
   respecto a ella y coinciden exactas con el dibujo. */
.cd-logo-caja {
	position: relative;
	display: inline-block;
	line-height: 0;
	isolation: isolate;        /* capas y mezcla se quedan aqui dentro */
}
.cd-logo-caja img {
	position: relative;
	z-index: 1;
}

/* a) AURA -------------------------------------------------------------
   Degradado ya suave de por si: no lleva blur, asi no cuesta nada. */
.cd-brillo__aura {
	position: absolute;
	left: -16%;
	right: -16%;
	top: -14%;
	bottom: -12%;
	z-index: 0;
	pointer-events: none;
	background: radial-gradient(closest-side at 50% 46%,
		rgba(255, 198, 96, .50)  0%,
		rgba(255, 140, 38, .26) 42%,
		rgba(255,  92, 12, .10) 68%,
		rgba(255,  92, 12, 0)  100%);
	opacity: .6;
	animation: cdAura 6.5s ease-in-out 1.4s infinite;
	will-change: opacity, transform;
}
/* Se hincha mientras pasa el reflejo y luego respira despacio */
@keyframes cdAura {
	0%   { opacity: .55; transform: scale(.97); }
	14%  { opacity: .95; transform: scale(1.03); }
	42%  { opacity: .62; transform: scale(.99); }
	72%  { opacity: .74; transform: scale(1.01); }
	100% { opacity: .55; transform: scale(.97); }
}

/* b) REFLEJO ----------------------------------------------------------
   La mascara (la silueta del logo) la pone el JS con la direccion
   exacta de la imagen; aqui solo se dice que ocupe toda la caja. */
.cd-brillo__reflejo {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	overflow: hidden;
	-webkit-mask-size: 100% 100%;
	        mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	        mask-repeat: no-repeat;
	-webkit-mask-position: center;
	        mask-position: center;
	/* color-dodge: la luz hace "reventar" de brillo lo que ya es claro
	   (la plata, el naranja) y apenas toca lo oscuro, como un reflejo
	   real sobre metal. Con mezcla normal parecia un velo blanco pintado
	   encima (se compararon normal, screen, overlay, soft-light y este). */
	mix-blend-mode: color-dodge;
}
/* La franja. Es 34 % de ancha e inclinada 20 grados: los numeros del
   translateX estan calculados para que entre y salga entera por fuera
   del logo (el JS usa los mismos). */
.cd-brillo__reflejo::before {
	content: '';
	position: absolute;
	top: -25%;
	bottom: -25%;
	left: 0;
	width: 34%;
	background: linear-gradient(90deg,
		rgba(255, 255, 255, 0)    0%,
		rgba(255, 248, 230, .10) 32%,
		rgba(255, 252, 242, .78) 50%,
		rgba(255, 248, 230, .10) 68%,
		rgba(255, 255, 255, 0)  100%);
	transform: translateX(-185%) skewX(-20deg);
	animation: cdReflejo 6.5s linear 1.4s infinite;
	will-change: transform;
}
@keyframes cdReflejo {
	0%   { transform: translateX(-185%) skewX(-20deg); }
	26%  { transform: translateX(379%)  skewX(-20deg); }
	100% { transform: translateX(379%)  skewX(-20deg); }
}

/* c) DESTELLOS --------------------------------------------------------
   El JS los coloca (left/top en %) y les da su retraso. El tamano va en
   % del ancho del logo, asi encogen con el. Los margenes en % tambien
   se miden sobre el ancho: por eso centran bien. */
.cd-brillo__destello {
	position: absolute;
	z-index: 3;
	width: calc(var(--t, 1) * 15%);
	aspect-ratio: 1;
	margin: calc(var(--t, 1) * -7.5%) 0 0 calc(var(--t, 1) * -7.5%);
	pointer-events: none;
	mix-blend-mode: screen;     /* el resplandor suma luz, no tapa el dibujo */
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3CradialGradient id='g'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='.42' stop-color='%23fff6dc'/%3E%3Cstop offset='1' stop-color='%23ffe2a0' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M50 0C52.6 36 64 47.4 100 50C64 52.6 52.6 64 50 100C47.4 64 36 52.6 0 50C36 47.4 47.4 36 50 0Z' fill='url(%23g)'/%3E%3C/svg%3E") center / 100% 100% no-repeat,
		radial-gradient(circle,
			rgba(255, 248, 228, .75) 0%,
			rgba(255, 220, 160, .24) 22%,
			rgba(255, 210, 140, 0)   50%);
	opacity: 0;
	transform: scale(0);
	animation: cdDestello 6.5s ease-out infinite;   /* retraso: lo pone el JS */
	will-change: transform, opacity;
}
/* Variante dorada para la joya de la corona */
.cd-brillo__destello--oro {
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3CradialGradient id='g'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='.4' stop-color='%23ffe7a6'/%3E%3Cstop offset='1' stop-color='%23ffa12e' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M50 0C52.6 36 64 47.4 100 50C64 52.6 52.6 64 50 100C47.4 64 36 52.6 0 50C36 47.4 47.4 36 50 0Z' fill='url(%23g)'/%3E%3C/svg%3E") center / 100% 100% no-repeat,
		radial-gradient(circle,
			rgba(255, 236, 180, .8)  0%,
			rgba(255, 180,  70, .28) 22%,
			rgba(255, 160,  50, 0)   50%);
}
@keyframes cdDestello {
	0%   { opacity: 0; transform: scale(0)   rotate(0deg); }
	3.5% { opacity: 1; transform: scale(1)   rotate(30deg); }
	9%   { opacity: 0; transform: scale(.3)  rotate(70deg); }
	100% { opacity: 0; transform: scale(0)   rotate(70deg); }
}

/* ---------------------------------------------------------------------
   5. VENTANAS (REGISTRO / DESCARGAR) ESTILO RANKING
   El JS convierte #popup6 y #popup8 en ventanas .cdwin.
   --a = color de la ventana (verde para Registro, azul para Descargas).
   ------------------------------------------------------------------- */
.overlay.cdwin-overlay {
	background: rgba(0,0,0,.55) !important;
	z-index: 2000;
}

.popup.cdwin {
	--a: var(--cd-oro);
	position: fixed !important;
	top: 50% !important;
	left: 50% !important;
	transform: translate(-50%, -50%) scale(.88) !important;
	width: min(1120px, 94vw) !important;
	/* La altura la pone el contenido: nada de huecos vacios abajo */
	height: auto !important;
	max-height: min(760px, 90vh) !important;
	max-width: none;
	min-width: 320px;
	min-height: 260px;
	display: flex;
	flex-direction: column;
	padding: 0 !important;
	border: 1px solid rgba(255,255,255,.16) !important;
	border-radius: 14px !important;
	background:
		linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,0) 30%),
		linear-gradient(160deg, rgba(26,30,39,.97) 0%, rgba(14,17,23,.97) 100%) !important;
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.14),
		0 22px 60px rgba(0,0,0,.78),
		0 0 0 1px rgba(0,0,0,.55) !important;
	overflow: hidden;
	z-index: 2001 !important;
	text-align: left;
	/* el .popup original anima "all": se limita para que al arrastrar
	   la ventana siga al mouse sin retraso */
	transition: transform .25s ease, opacity .25s ease !important;
}
.popup.cdwin.cdwin--arrastrando { transition: none !important; }
.popup.cdwin.active { transform: translate(-50%, -50%) scale(1) !important; }
/* Cuando el usuario la mueve, el JS usa left/top en px */
.popup.cdwin.cdwin--movida            { transform: none !important; }
.popup.cdwin.cdwin--movida.active     { transform: none !important; }

/* ----- Barra de titulo ----- */
.cdwin__bar {
	position: relative;
	flex: 0 0 auto;
	height: 50px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 8px 0 10px;
	cursor: move;
	user-select: none;
	-webkit-user-select: none;
	touch-action: none;
	border-bottom: 1px solid rgba(0,0,0,.5);
	background:
		linear-gradient(180deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 55%),
		linear-gradient(180deg, var(--a) 0%, color-mix(in srgb, var(--a) 62%, #000) 100%);
	box-shadow: inset 0 -2px 6px rgba(0,0,0,.35);
}
/* Medallon con el personaje de MU */
.cdwin__sello {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid rgba(0,0,0,.45);
	box-shadow:
		inset 0 0 0 1px rgba(255,255,255,.4),
		0 2px 5px rgba(0,0,0,.5);
}
.cdwin__t {
	flex: 1 1 auto;
	font-family: 'Montserrat', Arial, sans-serif;
	font-size: 17px;
	font-weight: 800;
	letter-spacing: 4px;
	text-align: center;
	color: #10140c;
	text-shadow: 0 1px 0 rgba(255,255,255,.35);
	pointer-events: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.cdwin__x {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	padding: 0;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: Arial, sans-serif;
	font-size: 20px;
	font-weight: bold;
	line-height: 1;
	color: #16190f;
	background: rgba(0,0,0,.16);
	border: 1px solid rgba(0,0,0,.4);
	border-radius: 50%;
	cursor: pointer;
	box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
	transition: background .15s ease, color .15s ease, transform .15s ease;
}
.cdwin__x:hover { background: #16190f; color: var(--a); transform: rotate(90deg); }

/* ----- Cuerpo ----- */
.cdwin__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	padding: 16px 18px 10px;
	scrollbar-width: thin;
	scrollbar-color: var(--a) rgba(255,255,255,.07);
}
.cdwin__body::-webkit-scrollbar { width: 10px; }
.cdwin__body::-webkit-scrollbar-track { background: rgba(255,255,255,.05); }
.cdwin__body::-webkit-scrollbar-thumb {
	background: linear-gradient(180deg, var(--a), color-mix(in srgb, var(--a) 55%, #000));
	border-radius: 6px;
}
/* El titulo viejo y la X vieja ya no se ven: los reemplaza la barra */
.popup.cdwin .popup-titulo,
.popup.cdwin > .btn-cerrar-popup,
.cdwin__body > .btn-cerrar-popup,
.cdwin__body > .popup-titulo { display: none !important; }

/* El CSS viejo dejaba estos titulos en opacity:0 salvo durante una
   animacion de entrada, y acababan viendose apagados. Aqui se fijan. */
.popup.cdwin h3,
.popup.cdwin.active h3 {
	font-size: 15px;
	font-weight: 600;
	color: #cfd6e4;
	text-align: center;
	margin-bottom: 4px;
	opacity: 1 !important;
	animation: none !important;
}
.popup.cdwin h4,
.popup.cdwin.active h4 {
	font-size: 17px;
	font-weight: 800;
	text-align: center;
	margin: 0 0 18px;
	color: var(--a);
	text-shadow: 0 2px 8px rgba(0,0,0,.7);
	opacity: 1 !important;
	animation: none !important;
}
.popup.cdwin .contenedor-inputs,
.popup.cdwin.active .contenedor-inputs { opacity: 1 !important; animation: none !important; }
.popup.cdwin h4 font { color: inherit !important; }

/* ----- Pie con los personajes de MU ----- */
.cdwin__pie {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 7px 14px;
	background: rgba(0,0,0,.5);
	border-top: 1px solid rgba(255,255,255,.08);
}
.cdwin__pie img {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid rgba(255,255,255,.22);
	box-shadow: 0 2px 5px rgba(0,0,0,.6);
	opacity: .62;
	transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease;
}
.cdwin__pie img:hover {
	transform: translateY(-4px) scale(1.18);
	opacity: 1;
	box-shadow: 0 6px 14px rgba(0,0,0,.7), 0 0 14px color-mix(in srgb, var(--a) 60%, transparent);
}
.cdwin__nota {
	font-family: 'Inter', Arial, sans-serif;
	font-size: 11px;
	letter-spacing: 1px;
	color: rgba(255,255,255,.33);
	margin-left: 6px;
	white-space: nowrap;
}

/* ----- Agarre para redimensionar ----- */
.cdwin__grip {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 20px;
	height: 20px;
	cursor: nwse-resize;
	touch-action: none;
	z-index: 5;
	background:
		linear-gradient(135deg, transparent 0 46%, rgba(255,255,255,.4) 46% 54%, transparent 54%),
		linear-gradient(135deg, transparent 0 70%, rgba(255,255,255,.4) 70% 78%, transparent 78%);
}
/* Tapa transparente: evita que el iframe/el texto se coma el arrastre */
.cdwin__escudo {
	position: absolute;
	inset: 0;
	display: none;
	z-index: 4;
	cursor: move;
}
.popup.cdwin.cdwin--arrastrando .cdwin__escudo { display: block; }

/* ---------------------------------------------------------------------
   6. TARJETAS Y BOTONES DENTRO DE LAS VENTANAS
   Las cajas .box1-3 / .box2-3 / .box3-3 del intro pasan a ser tarjetas
   de cristal en relieve, y los enlaces .ver botones 3D.
   ------------------------------------------------------------------- */
.cdwin__body .box1-3,
.cdwin__body .box2-3,
.cdwin__body .box3-3 {
	float: none;
	display: block;
	max-width: none;
	width: auto;
}
.cdwin__cajas {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
	align-items: stretch;
}
/* Las tres cajas quedan de la misma altura aunque una tenga mas botones */
.cdwin__cajas > .box1-3,
.cdwin__cajas > .box2-3,
.cdwin__cajas > .box3-3 { display: flex; }

.cdwin__body article.margin1 {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 16px 16px 18px;
	border-radius: 14px;
	border: 1px solid rgba(255,255,255,.12);
	background:
		linear-gradient(180deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,0) 38%),
		linear-gradient(165deg, rgba(42,48,60,.92) 0%, rgba(18,21,28,.94) 100%) !important;
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.18),
		inset 0 -2px 0 rgba(0,0,0,.5),
		0 6px 0 -2px rgba(0,0,0,.4),
		0 14px 24px rgba(0,0,0,.5);
	transition: transform .2s ease, box-shadow .2s ease;
}
.cdwin__body article.margin1:hover {
	transform: translateY(-4px);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.24),
		0 10px 0 -2px rgba(0,0,0,.4),
		0 20px 32px rgba(0,0,0,.55),
		0 0 22px color-mix(in srgb, var(--a) 32%, transparent);
}
.cdwin__body article.margin1 h2 {
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	text-align: center;
	color: var(--a);
	margin-bottom: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(255,255,255,.1);
	text-shadow: 0 2px 6px rgba(0,0,0,.6);
}
.cdwin__body article.margin1 p {
	font-size: 13px;
	line-height: 1.6;
	color: #c3cad8 !important;
	margin-bottom: 12px;
}
.cdwin__body article.margin1 p font { color: inherit !important; font-size: inherit !important; }

/* Botones DESCARGAR / REGISTRAR / INGRESAR en 3D */
.cdwin__body .ver-mas,
.cdwin__body .ver-mas2,
.cdwin__body .ver-mas3 {
	width: auto;
	min-width: 150px;
	max-width: 100%;
	height: 42px;
	line-height: 42px;
	margin: 10px auto 2px;
	border: 1px solid rgba(255,255,255,.2) !important;
	border-radius: 10px !important;
	background: linear-gradient(180deg,
		color-mix(in srgb, var(--a) 78%, #fff 10%) 0%,
		var(--a) 45%,
		color-mix(in srgb, var(--a) 52%, #000) 100%) !important;
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.45),
		inset 0 -2px 0 rgba(0,0,0,.4),
		0 4px 0 -1px rgba(0,0,0,.5),
		0 9px 16px rgba(0,0,0,.5) !important;
	transition: transform .15s ease, box-shadow .15s ease, filter .15s ease !important;
}
.cdwin__body .ver-mas:hover,
.cdwin__body .ver-mas2:hover,
.cdwin__body .ver-mas3:hover {
	transform: translateY(-2px);
	filter: brightness(1.12);
	border-radius: 10px !important;
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.5),
		0 7px 0 -1px rgba(0,0,0,.5),
		0 14px 22px rgba(0,0,0,.55),
		0 0 20px color-mix(in srgb, var(--a) 55%, transparent) !important;
}
.cdwin__body .ver-mas:active,
.cdwin__body .ver-mas2:active,
.cdwin__body .ver-mas3:active {
	transform: translateY(3px);
	box-shadow: inset 0 3px 8px rgba(0,0,0,.6) !important;
}
.cdwin__body .ver-mas a.ver,
.cdwin__body .ver-mas2 a.ver,
.cdwin__body .ver-mas3 a.ver {
	display: block;
	width: 100%;
	height: 100%;
}
.cdwin__body .ver-mas a.ver font,
.cdwin__body .ver-mas2 a.ver font,
.cdwin__body .ver-mas3 a.ver font {
	font-size: 14px !important;
	font-weight: 800;
	letter-spacing: 1.5px;
	color: #11140d !important;
	text-shadow: 0 1px 0 rgba(255,255,255,.3);
}
/* El bloque del boton se pega abajo para que las tarjetas queden parejas */
.cdwin__body article.margin1 > .ver-mas:last-child,
.cdwin__body article.margin1 > .ver-mas2:last-child,
.cdwin__body article.margin1 > .ver-mas3:last-child { margin-top: auto; }

/* Formulario de la ventana de registro */
.cdwin__body form .contenedor-inputs input {
	width: 100%;
	max-width: 280px;
	height: 40px;
	line-height: 40px;
	margin: 0 auto 12px;
	display: block;
	font-size: 14px;
	color: #e8edf6;
	background: rgba(0,0,0,.45);
	border: 1px solid rgba(255,255,255,.18) !important;
	border-radius: 8px;
	box-shadow: inset 0 2px 6px rgba(0,0,0,.6);
}
.cdwin__body form .contenedor-inputs input::placeholder { color: rgba(255,255,255,.35); }
.cdwin__body form .contenedor-inputs input:focus {
	outline: none;
	border-color: var(--a) !important;
	box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 0 12px color-mix(in srgb, var(--a) 50%, transparent);
}
.cdwin__body form .btn-submit {
	height: 40px;
	border-radius: 9px;
	font-weight: 700;
	letter-spacing: 1px;
	color: #11140d;
	background: linear-gradient(180deg, color-mix(in srgb, var(--a) 80%, #fff 12%), var(--a) 50%, color-mix(in srgb, var(--a) 55%, #000));
	box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 4px 0 -1px rgba(0,0,0,.5), 0 8px 14px rgba(0,0,0,.45);
}
.cdwin__body form .btn-submit:active { transform: translateY(2px); }

/* Tabla de requisitos del sistema */
.cdwin__body table {
	width: 100% !important;
	font-size: 12px !important;
	background: rgba(0,0,0,.35) !important;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 6px 16px rgba(0,0,0,.5);
}
.cdwin__body table th,
.cdwin__body table td {
	font-size: 12px !important;
	padding: 7px 10px !important;
	border: none !important;
	border-bottom: 1px solid rgba(255,255,255,.07) !important;
	color: #dbe2ee !important;
	text-align: left;
}
.cdwin__body table tr:first-child th,
.cdwin__body table tr:first-child td {
	background: linear-gradient(180deg, color-mix(in srgb, var(--a) 70%, #000), color-mix(in srgb, var(--a) 40%, #000)) !important;
	color: #0e110a !important;
	font-weight: 800;
	letter-spacing: 1px;
	text-transform: uppercase;
}
/* El index.php trae al final un <style> que pinta las filas pares de
   naranja; aqui se limpia para que la tabla siga el color de la ventana. */
.cdwin__body table tr { background: transparent !important; }
.cdwin__body table tr:nth-of-type(even) td { background: rgba(255,255,255,.05) !important; }
.cdwin__body table tr:hover td { background: color-mix(in srgb, var(--a) 22%, #10141c) !important; }

/* ---------------------------------------------------------------------
   7. PANEL DE TIKTOK  -  metal pulido, arriba a la derecha
   Va a la derecha pero dejando libre la columna de redes (70px).
   Se usa "body #liveBox" para ganarle al <style> que trae el index.php
   sin recurrir a !important: asi el arrastre con el mouse sigue mandando.
   ------------------------------------------------------------------- */
body #liveBox {
	top: 18px;
	right: 92px;
	bottom: auto;
	left: auto;
	width: 288px;
	padding: 10px 11px 12px;
	border: 2px solid #6b7689;
	border-radius: 16px;
	background:
		linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 26%),
		linear-gradient(145deg,
			var(--cd-metal-1) 0%,
			var(--cd-metal-3) 26%,
			var(--cd-metal-4) 52%,
			var(--cd-metal-2) 78%,
			var(--cd-metal-4) 100%);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.5),
		inset 0 -3px 8px rgba(0,0,0,.75),
		0 6px 0 -2px rgba(0,0,0,.5),
		var(--cd-sombra);
	overflow: hidden;
	z-index: 1200;
}
/* Brillo metalico que recorre el panel */
body #liveBox::after {
	content: '';
	position: absolute;
	top: -60%;
	left: -140%;
	width: 60%;
	height: 260%;
	background: linear-gradient(104deg, transparent 0%, rgba(255,255,255,.30) 45%, rgba(255,255,255,.06) 62%, transparent 100%);
	transform: rotate(8deg);
	pointer-events: none;
	animation: cdMetal 5.5s ease-in-out infinite;
}
@keyframes cdMetal {
	0%, 62%  { left: -140%; }
	100%     { left: 190%; }
}
/* Filo interior, como una chapa remachada */
body #liveBox::before {
	content: '';
	position: absolute;
	inset: 4px;
	border-radius: 12px;
	border: 1px solid rgba(255,255,255,.12);
	pointer-events: none;
}
body #liveBox #dragHandle { position: relative; z-index: 2; }
body #liveBox .thumbnail,
body #liveBox .live-title,
body #liveBox #openLiveBtn { position: relative; z-index: 2; }

body #liveBox #dragHandle > div { font-size: 13px; letter-spacing: .4px; text-shadow: 0 2px 3px rgba(0,0,0,.8); }
body #liveBox .thumbnail {
	max-height: 150px;          /* el panel queda compacto y no come pantalla */
	object-fit: contain;        /* se ve la miniatura entera, sin recortes */
	background: #0b0d12;
	border-radius: 10px;
	border: 1px solid rgba(255,255,255,.2);
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.5), 0 6px 14px rgba(0,0,0,.6);
}
body #liveBox .live-title {
	font-size: 13px;
	letter-spacing: .3px;
	text-shadow: 0 2px 4px rgba(0,0,0,.8);
}
body #liveBox #closeBtn {
	border-radius: 8px;
	border: 1px solid rgba(255,255,255,.18);
	background: linear-gradient(180deg, #5d6678, #2b313c);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 2px 5px rgba(0,0,0,.6);
	font-size: 12px;
	position: relative;
	z-index: 3;
}
body #liveBox #closeBtn:hover { background: linear-gradient(180deg, #78839a, #3a4150); }
body #liveBox #openLiveBtn {
	border-radius: 10px;
	border: 1px solid rgba(255,255,255,.22);
	background: linear-gradient(180deg, #ff4d64 0%, var(--cd-rojo) 48%, #8f0016 100%);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.45),
		inset 0 -2px 0 rgba(0,0,0,.4),
		0 4px 0 -1px rgba(0,0,0,.5),
		0 8px 14px rgba(0,0,0,.5);
	letter-spacing: 1px;
	transition: transform .15s ease, filter .15s ease;
}
body #liveBox #openLiveBtn:hover { filter: brightness(1.12); transform: translateY(-2px); }
body #liveBox #openLiveBtn:active { transform: translateY(2px); box-shadow: inset 0 3px 7px rgba(0,0,0,.65); }

/* Boton 🔴 Live (cuando el panel esta cerrado) tambien arriba a la derecha */
body #toggleBtn {
	top: 18px;
	right: 92px;
	bottom: auto;
	left: auto;
	border: 1px solid rgba(255,255,255,.25);
	background: linear-gradient(180deg, #ff4d64 0%, var(--cd-rojo) 50%, #8f0016 100%);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.45),
		0 4px 0 -1px rgba(0,0,0,.5),
		0 9px 16px rgba(0,0,0,.55);
	z-index: 1201;
}
body #toggleBtn:active { transform: translateY(2px); }

/* ---------------------------------------------------------------------
   8. VENTANA DEL VIDEO DE YOUTUBE (abajo a la derecha)
   ------------------------------------------------------------------- */
#cdyt {
	position: fixed;
	right: 92px;            /* 92px deja libre la columna de botones de redes */
	bottom: 70px;           /* y queda justo encima del boton MU CAIDOS */
	width: 400px;
	display: none;
	border: 2px solid #6b7689;
	border-radius: 16px;
	background:
		linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 22%),
		linear-gradient(145deg, var(--cd-metal-1) 0%, var(--cd-metal-3) 30%, var(--cd-metal-4) 60%, var(--cd-metal-2) 100%);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.45),
		inset 0 -3px 8px rgba(0,0,0,.75),
		0 6px 0 -2px rgba(0,0,0,.5),
		var(--cd-sombra);
	overflow: hidden;
	z-index: 1150;
	font-family: 'Montserrat', Arial, sans-serif;
}
#cdyt.cdyt--on { display: block; }
/* Los Shorts son verticales: mas angostos, para que la ventana no se
   estire hasta chocar con el panel de TikTok de arriba. */
#cdyt.cdyt--vertical { width: 220px; }

#cdyt .cdyt__bar {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 38px;
	padding: 0 6px 0 10px;
	cursor: move;
	user-select: none;
	-webkit-user-select: none;
	touch-action: none;
	border-bottom: 1px solid rgba(0,0,0,.55);
	background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 60%), rgba(0,0,0,.35);
}
#cdyt .cdyt__yt { color: #ff2d3f; font-size: 16px; text-shadow: 0 0 10px rgba(255,0,0,.6); }
#cdyt .cdyt__t {
	flex: 1 1 auto;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 1.4px;
	color: #e7ecf6;
	text-shadow: 0 2px 3px rgba(0,0,0,.8);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
}
#cdyt .cdyt__b {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	font-size: 12px;
	color: #dfe5f0;
	background: linear-gradient(180deg, #5d6678, #2b313c);
	border: 1px solid rgba(255,255,255,.18);
	border-radius: 7px;
	cursor: pointer;
	box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 2px 4px rgba(0,0,0,.55);
	transition: filter .15s ease, transform .15s ease;
}
#cdyt .cdyt__b:hover { filter: brightness(1.25); }
#cdyt .cdyt__b:active { transform: translateY(1px); }
#cdyt .cdyt__b.is-on { background: linear-gradient(180deg, #ff4d64, #8f0016); color: #fff; }

#cdyt .cdyt__video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border-top: 1px solid rgba(255,255,255,.08);
}
#cdyt.cdyt--vertical .cdyt__video { aspect-ratio: 9 / 16; }
#cdyt .cdyt__video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}
/* Aviso de "sin sonido" sobre el video */
#cdyt .cdyt__mudo {
	position: absolute;
	left: 8px;
	bottom: 8px;
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 7px 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .5px;
	color: #fff;
	background: rgba(0,0,0,.72);
	border: 1px solid rgba(255,255,255,.22);
	border-radius: 9px;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(0,0,0,.6);
	transition: background .15s ease, transform .15s ease;
}
#cdyt .cdyt__mudo:hover { background: var(--cd-rojo); transform: translateY(-2px); }
#cdyt .cdyt__mudo[hidden] { display: none; }

#cdyt .cdyt__pie {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 6px 11px 8px;
	background: rgba(0,0,0,.4);
	border-top: 1px solid rgba(255,255,255,.07);
}
#cdyt .cdyt__pie a {
	font-size: 11px;
	letter-spacing: .6px;
	color: #ffb0b8;
	text-decoration: none;
	white-space: nowrap;
}
#cdyt .cdyt__pie a:hover { color: #fff; text-decoration: underline; }
#cdyt .cdyt__pie span { font-size: 10px; color: rgba(255,255,255,.3); letter-spacing: .6px; }

/* Chapita para volver a abrir el video */
#cdyt-abrir {
	position: fixed;
	right: 92px;
	bottom: 70px;
	display: none;
	align-items: center;
	gap: 8px;
	padding: 9px 15px;
	font-family: 'Montserrat', Arial, sans-serif;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 1px;
	color: #fff;
	background: linear-gradient(180deg, #ff4d64 0%, var(--cd-rojo) 50%, #8f0016 100%);
	border: 1px solid rgba(255,255,255,.25);
	border-radius: 11px;
	cursor: pointer;
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,.45),
		0 4px 0 -1px rgba(0,0,0,.5),
		0 9px 16px rgba(0,0,0,.55);
	z-index: 1150;
}
#cdyt-abrir.cdyt--on { display: flex; }
#cdyt-abrir:active { transform: translateY(2px); }

/* ---------------------------------------------------------------------
   9. PANTALLAS CHICAS
   ------------------------------------------------------------------- */
@media (max-width: 980px) {
	body #liveBox { width: 230px; right: 82px; }
	body #liveBox .thumbnail { max-height: 118px; }
	#cdyt { right: 82px; width: min(320px, calc(100vw - 110px)); }
	#cdyt.cdyt--vertical { width: min(200px, calc(100vw - 110px)); }
	#cdyt-abrir { right: 82px; }
}

/* En altura corta, el video vertical se recorta antes de estirarse */
@media (max-height: 820px) {
	#cdyt.cdyt--vertical .cdyt__video { max-height: 46vh; }
	body #liveBox .thumbnail { max-height: 112px; }
}

@media (max-width: 760px) {
	.popup.cdwin {
		width: 96vw !important;
		height: 92vh !important;
		border-radius: 10px !important;
	}
	.cdwin__t { font-size: 14px; letter-spacing: 2px; }
	.cdwin__nota { display: none; }
	.cdwin__pie img { width: 26px; height: 26px; }
	.cdwin__body { padding: 12px 12px 8px; }

	/* En el celular el menu lateral ya ocupa casi todo: el panel de TikTok
	   arranca cerrado (lo hace el JS) y se abre angosto, pegado al borde. */
	body #liveBox { width: 164px; right: 8px; top: 10px; padding: 8px; }
	body #liveBox .thumbnail { max-height: 96px; }
	body #liveBox .live-title { font-size: 11px; }
	body #liveBox #openLiveBtn { padding: 8px 4px; font-size: 11px; }
	body #toggleBtn { right: 8px; top: 10px; padding: 7px 13px; font-size: 12px; }

	#cdyt { right: 8px; bottom: 62px; width: min(230px, calc(100vw - 16px)); }
	#cdyt.cdyt--vertical { width: min(168px, calc(100vw - 16px)); }
	#cdyt-abrir { right: 8px; bottom: 62px; }

	body .sidebar-logo img { width: 140px; }
}

/* El intro encoge el logo cuando la pantalla es BAJA (no estrecha),
   igual que hacia css/caidos.css. Se respeta ese criterio. */
@media (max-height: 760px) {
	body .sidebar-logo img { width: 146px; }
	body .sidebar-logo { margin: 0 0 10px; }
}
@media (max-height: 640px) {
	body .sidebar-logo img { width: 116px; }
}

/* Si el visitante pide menos animacion: el aura queda quieta y el
   reflejo y los destellos no aparecen. */
@media (prefers-reduced-motion: reduce) {
	.cd-brillo__aura { animation: none !important; opacity: .7; }
	.cd-brillo__reflejo,
	.cd-brillo__destello { display: none !important; }
	body #liveBox::after { animation: none !important; }
	.sidebar-menu .nav-button:hover::before { animation: none !important; opacity: 0; }
}
