/* ==========================================================================
   L-BRAILLE - RESPONSIVE & MODERN DESIGN SYSTEM
   Preserva todos los selectores y clases originales con diseño adaptable.
   ========================================================================== */

:root {
	--blue: #0A0A61;
	--blue-dark: #05053B;
	--blue-card: rgba(15, 23, 74, 0.88);
	--accent-green: #00b060;
	--accent-green-hover: #00874a;
	--text-light: #ffffff;
	--text-muted: #e2e8f0;
	--radius-sm: 8px;
	--radius-md: 16px;
	--radius-lg: 24px;
	--shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
	--shadow-md: 0 10px 25px -3px rgba(0, 0, 0, 0.4);
	--shadow-glow: 0 0 20px rgba(0, 176, 96, 0.35);
}

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

html {
	font-size: 16px;
	height: 100%;
	width: 100%;
}

body {
	width: 100%;
	min-height: 100vh;
	margin: 0;
	padding: 0;
	background: radial-gradient(circle at 50% 20%, #151b66 0%, #070933 100%);
	background-color: var(--blue);
	text-align: center;
	font-family: 'Outfit', 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--text-light);
	line-height: 1.5;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
}

#verso {
	width: 100%;
	min-height: 100vh;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
}

/* ==========================================================================
   PANTALLA DE INICIO (#start)
   ========================================================================== */

#start {
	width: 100%;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: clamp(16px, 4vw, 40px);
}

.start-card {
	width: 100%;
	max-width: 680px;
	background: var(--blue-card);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--radius-lg);
	padding: clamp(24px, 5vw, 48px);
	box-shadow: var(--shadow-md);
	display: flex;
	flex-direction: column;
	align-items: center;
	animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInScale {
	from {
		opacity: 0;
		transform: scale(0.96) translateY(12px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.title {
	width: 100%;
	color: #fff;
	margin-bottom: clamp(12px, 3vh, 24px);
}

.title h1 {
	margin: 0;
	font-family: 'Outfit', Georgia, sans-serif;
	font-size: clamp(28px, 6vw, 44px);
	font-weight: 800;
	letter-spacing: -0.5px;
	text-shadow: 0 2px 10px rgba(0,0,0,0.5);
	background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.imageStart {
	width: 100%;
	max-width: 220px;
	height: auto;
	margin: 0 auto clamp(16px, 3vh, 28px);
	cursor: pointer;
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
	outline: none;
}

.imageStart:hover {
	transform: scale(1.08) translateY(-4px);
	filter: drop-shadow(0 10px 20px rgba(0, 176, 96, 0.35));
}

.imageStart img {
	width: 100%;
	height: auto;
	max-height: 160px;
	object-fit: contain;
	display: block;
	margin: 0 auto;
}

.contentContainer {
	width: 100%;
	margin: 0 0 clamp(24px, 4vh, 36px);
}

.content {
	color: var(--text-muted);
	text-align: center;
	font-size: clamp(16px, 2.5vw, 20px);
	font-weight: 400;
	line-height: 1.6;
}

.content p {
	margin: 0;
}

.startButton {
	width: 100%;
	display: flex;
	justify-content: center;
}

.firstButton {
	cursor: pointer;
	border-radius: var(--radius-md);
	width: 100%;
	max-width: 320px;
	padding: clamp(14px, 2.5vh, 20px) 24px;
	color: #ffffff;
	background: linear-gradient(135deg, #00b060 0%, #00874a 100%);
	border: 1px solid rgba(255, 255, 255, 0.2);
	font-size: clamp(18px, 3.5vw, 24px);
	font-weight: 700;
	font-family: inherit;
	box-shadow: 0 6px 20px rgba(0, 176, 96, 0.4);
	transition: all 0.25s ease;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.firstButton:hover,
.firstButton:focus-visible {
	background: linear-gradient(135deg, #02c96f 0%, #009954 100%);
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(0, 176, 96, 0.6);
	outline: none;
}

.firstButton:active {
	transform: translateY(1px);
	box-shadow: 0 4px 12px rgba(0, 176, 96, 0.3);
}

/* ==========================================================================
   INTERFAZ DE UNIDADES (unitall, nameDiv, buttons)
   ========================================================================== */

.unitall {
	width: 100%;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	padding: clamp(16px, 3vw, 32px);
	box-sizing: border-box;
	background-size: cover !important;
	background-position: center center !important;
}

.nameDiv {
	margin: 12px 0;
	font-size: clamp(18px, 3vw, 24px) !important;
	font-weight: 600;
	color: #ffffff;
	text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.buttonUser {
	background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%) !important;
	color: #ffffff !important;
	border: 1px solid rgba(255, 255, 255, 0.25) !important;
	border-radius: var(--radius-sm) !important;
	padding: 10px 20px !important;
	font-size: clamp(14px, 2vw, 16px) !important;
	font-weight: 600 !important;
	width: auto !important;
	min-width: 160px;
	max-width: 280px;
	margin: 10px auto 20px !important;
	cursor: pointer;
	box-shadow: var(--shadow-sm);
	transition: all 0.2s ease;
	font-family: inherit;
}

.buttonUser:hover {
	background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%) !important;
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

.buttonUser:active {
	transform: translateY(0);
}

.ficherdiv {
	width: auto;
	min-width: 90px;
	max-width: 160px;
	height: auto;
	aspect-ratio: 1 / 1.35;
	margin: 12px auto;
}

/* Tablas de unidades con efecto clickeable */
.unitall table {
	width: 100%;
	max-width: 650px;
	margin: 10px auto;
	border-collapse: separate;
	border-spacing: 0 12px;
}

.unitall table tr {
	cursor: pointer;
	transition: transform 0.2s ease, filter 0.2s ease;
	border-radius: var(--radius-md);
}

.unitall table tr:hover {
	transform: scale(1.02);
	filter: drop-shadow(0 6px 14px rgba(0,0,0,0.45));
}

.unitall table tr h1 {
	font-size: clamp(15px, 2.8vw, 22px) !important;
	margin: 0 !important;
	padding: 18px 24px !important;
	text-align: left;
	color: #ffffff;
	font-weight: 700;
	text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

/* ==========================================================================
   AJUSTES RESPONSIVOS GLOBALES Y MODERNOS
   ========================================================================== */

/* Fichas Braille (table de madera con puntos) */
table[style*="wood.svg"] {
	border-collapse: separate;
	border-spacing: 4px;
	border-radius: 8px;
	box-shadow: 0 4px 10px rgba(0,0,0,0.4);
	display: inline-table !important;
	vertical-align: middle;
}

table[style*="wood.svg"] td {
	border-radius: 50%;
	transition: transform 0.15s ease;
}

/* Contenedores de botones Back / Next / Tip adaptables */
div[style*="btnback.svg"],
div[style*="btnclose.svg"],
div[style*="btnhelp.svg"],
div[style*="btnnext.svg"] {
	transition: transform 0.2s ease, filter 0.2s ease;
	outline: none;
}

div[style*="btnback.svg"]:hover,
div[style*="btnclose.svg"]:hover,
div[style*="btnhelp.svg"]:hover,
div[style*="btnnext.svg"]:hover {
	transform: scale(1.08);
	filter: brightness(1.15) drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

div[style*="btnback.svg"]:active,
div[style*="btnclose.svg"]:active,
div[style*="btnhelp.svg"]:active,
div[style*="btnnext.svg"]:active {
	transform: scale(0.96);
}

/* Modales y Overlays */
div[style*="opacity.svg"] {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 999;
}

/* Tarjetas de Respuestas de Actividades */
table[style*="answerbg.svg"] td,
td[style*="answerbg.svg"] {
	border-radius: var(--radius-sm);
	transition: transform 0.2s ease, filter 0.2s ease;
}

td[style*="answerbg.svg"]:hover {
	transform: scale(1.03);
	filter: brightness(1.1) drop-shadow(0 4px 10px rgba(0,0,0,0.4));
}

td[style*="answerbg.svg"] h1 {
	font-size: clamp(14px, 2.5vw, 24px) !important;
	padding: 8px 12px;
	margin: 0;
	color: #ffffff;
	font-weight: 700;
	text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

/* ==========================================================================
   MEDIA QUERIES PARA ADAPTABILIDAD ESPECÍFICA
   ========================================================================== */

@media (max-width: 768px) {
	body {
		font-size: 14px;
	}

	.start-card {
		padding: 24px 18px;
	}

	.firstButton {
		max-width: 100%;
		padding: 16px;
	}

	.unitall table {
		max-width: 100%;
	}
}

@media (max-width: 480px) {
	.title h1 {
		font-size: 26px;
	}

	.content {
		font-size: 15px;
	}
}