:root {
	--primary: #2c3e50;
	--accent: #e67e22;
	--bg: #f0f2f5;
	--card: #ffffff;
	--text: #333333;
	--biblia-bg: #fff8f0;
	--border: #eeeeee;
	--text-light: #555555;
}

body.dark-mode {
	--bg: #121212;
	--card: #1e1e1e;
	--text: #e0e0e0;
	--biblia-bg: #2d2d2d;
	--border: #333333;
	--text-light: #b0b0b0;
	--primary: #34495e;
}

* {
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
	transition: background-color 0.3s, color 0.3s;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background-color: var(--bg);
	margin: 0;
	padding: 15px;
	color: var(--text);
	line-height: 1.6;
}

.app-container {
	max-width: 600px;
	margin: 0 auto;
	background: var(--card);
	padding: 20px;
	border-radius: 20px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
	min-height: 90vh;
	display: flex;
	flex-direction: column;
	padding-bottom: 100px;
}

.header {
	text-align: center;
	margin-bottom: 20px;
	border-bottom: 2px solid var(--border);
	padding-bottom: 15px;
}

.fecha-label {
	color: var(--accent);
	font-weight: 700;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 1px;
}

h1 {
	color: var(--text);
	font-size: 1.4rem;
	margin: 8px 0;
	line-height: 1.2;
}

.biblia-box {
	background: var(--biblia-bg);
	border-left: 4px solid var(--accent);
	padding: 15px;
	margin: 15px 0;
	border-radius: 0 10px 10px 0;
}

.biblia-box strong {
	color: var(--accent);
	display: block;
	margin-bottom: 5px;
}

.biblia-box p {
	margin: 0;
	font-style: italic;
	font-size: 1.05rem;
	color: var(--text-light);
}

.texto-reflexion {
	flex-grow: 1;
}

.reflexion-p {
	margin-bottom: 1.2rem;
	text-align: justify;
	font-size: 1.05rem;
	color: var(--text);
}

/* === CONTROLES === */
.controles {
	margin-top: auto;
	padding-top: 20px;
	border-top: 1px solid var(--border);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.controles button {
	background: #f1f5f9;
	color: #334155;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	max-width: 110px;
	font-size: 0.75rem;
	font-weight: 700;
	padding: 10px 16px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	flex: 1;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	cursor: pointer;
}

.controles button:active:not(:disabled) {
	background: #e2e8f0;
	transform: translateY(1px);
}

.controles button:disabled {
	background: #e5e7eb;
	color: #9ca3af;
	cursor: not-allowed;
	box-shadow: none;
}

body.dark-mode .controles button {
	background: #2d2d2d;
	color: #cbd5e1;
	border-color: #444;
}

/* === INPUT DATE === */
input[type="date"] {
	background-color: #fffaf5;
	border: 1.5px solid #ffedd5;
	color: var(--accent);
	padding: 8px 12px;
	border-radius: 10px;
	font-family: inherit;
	font-weight: 700;
	font-size: 0.85rem;
	outline: none;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	color-scheme: light;
}

input[type="date"]::-webkit-calendar-picker-indicator {
	cursor: pointer;
	border-radius: 4px;
	margin-left: 5px;
	filter: invert(53%) sepia(85%) saturate(1000%) hue-rotate(1deg) brightness(95%) contrast(95%);
}

body.dark-mode input[type="date"] {
	background-color: #2d2d2d;
	border-color: var(--accent);
	color: var(--accent);
	color-scheme: dark;
}

body.dark-mode input[type="date"]::-webkit-calendar-picker-indicator {
	filter: invert(80%) sepia(20%) saturate(1000%) hue-rotate(1deg);
}

/* === BOTONES FLOTANTES === */
.float-buttons {
	position: fixed;
	bottom: 25px;
	right: 20px;
	display: flex;
	flex-direction: column;
	gap: 15px;
	z-index: 1000;
}

.btn-float {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	transition: transform 0.2s, background-color 0.3s;
	color: white;
	position: relative;
}

.btn-float:active {
	transform: scale(0.95);
}

#btnCompartir {
	background: #25d366;
}

#btnNocturno {
	background: #34495e;
}

#btnVoz {
	background: #e67e22;
	--progress: 0deg;
}

/* === LOADER CIRCULAR CON RELLENO COMPLETO === */
#btnVoz.reading::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: 
		conic-gradient(from 0deg at 50% 50%, 
			rgba(255, 255, 255, 0.3) 0deg,
			rgba(255, 255, 255, 0.3) var(--progress),
			rgba(255, 255, 255, 0.05) var(--progress),
			rgba(255, 255, 255, 0.05) 360deg
		);
	pointer-events: none;
	z-index: 1;
}

/* Ícono encima del loader */
#btnVoz {
	position: relative;
}

#btnVoz span,
#btnVoz::after {
	position: relative;
	z-index: 2;
}

/* === LISTA DE REFLEXIONES LATERAL === */
.lista-reflexiones {
	position: fixed;
	top: 0;
	left: -100%;
	width: 85%;
	max-width: 350px;
	height: 100%;
	background: var(--card);
	z-index: 2000;
	box-shadow: 4px 0 15px rgba(0, 0, 0, 0.3);
	transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	overflow-y: auto;
	padding: 20px;
}

.lista-reflexiones.active {
	left: 0;
}

.item-lista {
	padding: 15px 10px;
	border-bottom: 1px solid var(--border);
	cursor: pointer;
	color: var(--text);
}

.item-lista:active {
	background: rgba(0, 0, 0, 0.05);
}

/* === BOTÓN MENÚ HAMBURGUESA === */
#btnMenu {
	background: none;
	color: var(--text);
	font-size: 28px;
	padding: 0;
	flex: none;
	margin-right: 15px;
	cursor: pointer;
}

/* === MENSAJES DE ERROR === */
.error-msg {
	text-align: center;
	padding: 50px 20px;
	color: #888;
	font-style: italic;
}