@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Outfit:wght@300;400;600&family=Pirata+One&family=Kalam:wght@400;700&display=swap');

:root {
	--bg-deep: #0a0e17;
	--bg-ocean: #111a2e;
	--accent-gold: #e2b865;
	--accent-gold-hover: #f1d794;
	--accent-red: #c94040;
	--accent-teal: #2c9aa3;
	--text-main: #e0e7ff;
	--text-muted: #8b9bb4;
	--glass-bg: rgba(17, 26, 46, 0.6);
	--glass-border: rgba(226, 184, 101, 0.2);
	--glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

body {
	font-family: 'Outfit', sans-serif;
	background-color: var(--bg-deep);
	background-image: radial-gradient(circle at 50% 0%, #172440 0%, #0a0e17 70%);
	background-attachment: fixed;
	color: var(--text-main);
	margin: 0;
	padding: 20px;
	line-height: 1.6;
}

h1, h2, h3 {
	font-family: 'Cinzel', serif;
	color: var(--accent-gold);
	text-shadow: 0 2px 10px rgba(226, 184, 101, 0.4);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
}

strong {
	color: var(--accent-gold);
	font-weight: 700;
}

a {
	color: var(--accent-gold);
	text-decoration: none;
	transition: all 0.3s ease;
}

a:hover {
	color: var(--accent-gold-hover);
	text-shadow: 0 0 8px var(--accent-gold-hover);
}

/* Contenedores de Texto */
#texto, .instrucciones, .reproductor-opcional {
	background: rgba(10, 14, 23, 0.65);
	border: 1px solid #c6a64a;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
	margin-bottom: 25px;
	color: #e0e7ff;
	font-size: 1.15rem;
	line-height: 1.8;
	text-align: justify;
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
}

.reproductor-opcional {
    text-align: center;
}

.tabla-oculta {
	display: none;
}

.tabla-oculta.visible {
	display: block;
	background: rgba(10, 14, 23, 0.65);
	border: 1px solid #c6a64a;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
	margin-bottom: 25px;
	color: #e0e7ff;
	font-size: 1.15rem;
	line-height: 1.8;
	text-align: justify;
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
}

#texto:hover {
	border-color: #e2b865;
	box-shadow: 0 10px 40px rgba(226, 184, 101, 0.1);
}

.instrucciones {
	background: rgba(44, 154, 163, 0.1);
	border-color: rgba(44, 154, 163, 0.4);
	font-size: 1.3rem;
}

/* Clase para enlaces de campañas restringidas */
.link-disabled {
    color: var(--text-muted) !important;
    text-decoration: none !important;
    cursor: default !important;
    pointer-events: none !important;
}

/* Imagenes y Carteles */
.imagen-loseta, .imagen-loseta2 {
    display: block !important;
    margin: 25px auto !important;
    max-width: 90% !important;
    height: auto !important;
    border-radius: 12px;
    border: 2px solid var(--accent-gold);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.instrucciones table img, .tabla-oculta table img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
}

#texto img:not(.imagen-loseta):not(.imagen-loseta2):not([src*="travesia"]):not([src*="aventura"]):not([src*="water"]),
.instrucciones img:not([src*="travesia"]):not([src*="aventura"]):not([src*="water"]):not(.imagen-loseta):not(.imagen-loseta2),
.tabla-oculta img:not([src*="travesia"]):not([src*="aventura"]):not([src*="water"]):not(.imagen-loseta):not(.imagen-loseta2) {
	max-width: 4rem !important;
	height: auto !important;
	display: inline-block !important;
	vertical-align: middle;
	margin: 0 5px;
}

img[src*="bpirata.png"] {
    width: 50px !important;
    height: auto !important;
    vertical-align: middle;
}

img[src*="aventura.png"], img[src*="sintravesia.png"] {
	max-width: 80% !important;
	height: auto !important;
	display: block !important;
	margin: 15px auto !important;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
	border-radius: 8px;
}

/* Campañas */
.campaña {
	background: rgba(226, 184, 101, 0.08);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(226, 184, 101, 0.3);
	border-radius: 10px;
	padding: 10px 15px;
	margin-bottom: 12px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
	color: #ffffff;
    /* --- AJUSTE DE TAMAÑO DE LETRA DE CAMPAÑAS --- */
    font-size: 0.85rem; 
}

.campaña ul { margin: 5px 0; padding-left: 20px; }
.campaña li { margin-bottom: 5px; }

/* Tipografia narrativa */
.narrativa {
	font-family: 'Georgia', serif;
	font-style: italic;
	font-size: 1.3rem;
	color: #d1d9e6;
	margin-bottom: 1.5rem;
	text-indent: 1.5em;
}

/* Botones */
button, .boton-continuar, .boton-dorado, .boton-especial, .boton-retorno {
	background: linear-gradient(135deg, rgba(226, 184, 101, 0.8), rgba(184, 142, 65, 0.9));
	color: #0b1120;
	border: none;
	border-radius: 12px;
	padding: 12px 24px;
	font-family: 'Outfit', sans-serif;
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	box-shadow: 0 4px 15px rgba(226, 184, 101, 0.3);
	transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
	display: inline-block;
	text-decoration: none;
	text-align: center;
	margin-bottom: 12px;
	margin-right: 8px;
}

button:hover, .boton-continuar:hover, .boton-dorado:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(226, 184, 101, 0.5);
	background: linear-gradient(135deg, rgba(241, 215, 148, 0.9), rgba(226, 184, 101, 1));
	color: #000;
}

.boton-especial {
	background: linear-gradient(135deg, rgba(44, 154, 163, 0.8), rgba(28, 112, 120, 0.9));
	color: #fff;
	box-shadow: 0 4px 15px rgba(44, 154, 163, 0.3);
}

/* Tablas */
table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 12px;
	overflow: hidden;
}

.tracker-table {
	width: 60% !important;
	margin: 20px auto !important;
	border: 2px solid var(--accent-gold);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
	table-layout: fixed;
}

table thead th {
	background: rgba(226, 184, 101, 0.2);
	color: var(--accent-gold);
	padding: 15px;
	font-family: 'Cinzel', serif;
	font-weight: 700;
	text-transform: uppercase;
	text-align: center;
}

table td {
    padding: 10px;
    text-align: center;
    vertical-align: middle;
}

/* Header de Portada - AJUSTES DE USUARIO */
.main-header {
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    padding: 20px 40px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.brand-group {
    text-align: left;
}

/* --- AJUSTE DE TAMAÑO DEL LOGO --- */
.main-logo {
    width: 200px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(226, 184, 101, 0.2));
    transition: transform 0.3s ease;
}

.main-logo:hover {
    transform: scale(1.05);
}

.main-header .subtitle {
    font-family: 'Cinzel', serif;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin: 5px 0 0 0;
    text-align: left !important;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    padding: 10px;
    background: transparent;
    border-radius: 12px;
}

#user-nickname-container span {
    font-size: 1.4rem !important;
    margin-left: 5px;
    vertical-align: middle;
}

#user-nickname-container:hover {
    filter: brightness(1.2);
    text-decoration: underline dotted var(--accent-gold);
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0,0,0,0.4);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid var(--accent-gold);
}

.user-profile-badge img {
    width: 45px;
    height: 45px;
    border-radius: 50% !important;
    border: 2px solid var(--accent-gold);
    object-fit: cover !important;
    flex-shrink: 0;
}

/* Panel Diario de Navegación - MAS ESTRECHO */
.panel-diario {
    max-width: 700px !important;
    margin: 30px auto !important;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-out;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    font-size: 0.85rem;
}

.panel-diario.panel-collapsed {
    padding-bottom: 0px;
    max-width: 500px !important;
}

.panel-diario .panel-content {
    max-height: 1000px;
    opacity: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 20px;
}

.panel-diario.panel-collapsed .panel-content {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    pointer-events: none;
}

.panel-diario .toggle-icon {
    transition: transform 0.4s ease;
    color: var(--accent-gold);
    font-size: 0.8rem;
}

.panel-diario.panel-collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.panel-diario h3:hover {
    color: var(--accent-gold-hover);
}

.panel-diario h3 {
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(226, 184, 101, 0.2);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tabla-bitacora {
    width: 100%;
    border-collapse: collapse;
}

.tabla-bitacora th {
    text-align: left;
    color: var(--accent-gold);
    font-family: 'Cinzel', serif;
    padding: 12px;
    border-bottom: 2px solid rgba(226, 184, 101, 0.3);
    font-size: 0.9rem;
}

.tabla-bitacora td {
    padding: 15px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Clases de Utilidad */
.u-text-center { text-align: center !important; }
.u-mb-20 { margin-bottom: 20px !important; }
.u-mt-30 { margin-top: 30px !important; }
.u-font-pirata { font-family: 'Pirata One', cursive !important; }
.u-title-lg { font-size: 3rem !important; }
.u-text-shadow-sm { text-shadow: 0 2px 5px rgba(0,0,0,0.2) !important; }

.u-font-italic { font-style: italic !important; }
.u-cursor-pointer { cursor: pointer !important; }
.u-display-none { display: none !important; }

/* Otros Modales */
.popup-imagen {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(0, 0, 0, 0.85);
	justify-content: center;
	align-items: center;
}
.popup-imagen.visible { display: flex; }
.popup-imagen img {
	max-width: 92vw;
	max-height: 92vh;
	border-radius: 10px;
	border: 2px solid var(--accent-gold);
	object-fit: contain;
}

/* Footer */
.main-footer {
	margin-top: 40px;
	font-size: 0.9rem;
	text-align: center !important;
	color: var(--text-muted);
}

/* --- FORMATO BICOLOR --- */
.main-footer strong {
    color: var(--accent-gold);
}

/* --- RESTAURACIÓN DE COMPONENTES --- */

/* Sidebar/Campaña Listas (Asegura el funcionamiento del acordeón) */
.lista-capitulos {
	display: none;
}

/* Tracker adjustments (Para los capítulos) */
.tracker-cell {
	background: rgba(17, 26, 46, 0.8);
	border: 1px solid rgba(226, 184, 101, 0.3);
	color: var(--accent-gold);
	text-align: center;
	width: 65px;
	height: 65px;
	padding: 8px;
	vertical-align: middle;
}

.tracker-cell.visited { background: rgba(62, 43, 22, 0.9); }
.tracker-cell.last-visited {
	background: #e2b865;
	color: #000 !important;
	box-shadow: 0 0 20px rgba(226, 184, 101, 0.6);
	font-weight: bold;
}

/* Tablas Equilibradas y Objetivos */
.tabla-equilibrada {
	width: 90% !important;
	border-collapse: collapse;
	margin: 20px auto !important;
}
.tabla-equilibrada td, .tabla-equilibrada th {
	border: 1px solid #b89b65;
	padding: 8px;
	text-align: center;
}

.objetivo {
	background: rgba(44, 154, 163, 0.15);
	border: 2px solid rgba(44, 154, 163, 0.4);
	border-radius: 16px;
	color: #aadedf;
	padding: 15px;
	margin: 20px 0;
	text-align: center;
}

/* --- Selector de Objetivos Premium --- */
.objetivos-container {
    padding: 25px;
    background: rgba(17, 26, 46, 0.4);
    border: 1px solid rgba(226, 184, 101, 0.2);
    border-radius: 16px;
    margin: 25px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.selector-pirata {
    background: var(--bg-ocean) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23e2b865' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 15px center;
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
    border-radius: 10px;
    padding: 14px 25px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    cursor: pointer;
    width: 100%;
    max-width: 450px;
    display: block;
    margin: 0 auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.selector-pirata:hover {
    border-color: var(--accent-gold-hover);
    box-shadow: 0 0 15px rgba(226, 184, 101, 0.3);
    transform: translateY(-2px);
}

.selector-pirata:focus {
    border-color: var(--accent-gold-hover);
    box-shadow: 0 0 20px rgba(226, 184, 101, 0.4);
}

.selector-pirata option {
    background: var(--bg-deep);
    color: var(--text-main);
    padding: 10px;
}

#resultadoObjetivo {
    margin-top: 25px;
    padding: 20px;
    background: rgba(44, 154, 163, 0.1);
    border: 1px solid var(--accent-teal);
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    color: var(--accent-teal);
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

/* --- Menú Flotante de MN --- */
.mn-hover-dropdown {
    display: none;
    background: var(--bg-ocean);
    border: 1px solid var(--accent-gold);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    margin-top: 15px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.7);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
}

.mn-hover-dropdown table {
    font-size: 0.9rem;
}

/* Decoraciones de Fondo */
.rosa-vientos, .mascara-pirata {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: -1;
	pointer-events: none;
	opacity: 0.08;
	filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.8));
	max-width: 90vw;
	max-height: 90vh;
}

/* --- Cuadros de Selección (Parchment Style) --- */
.u-popup-bg {
    background: url('../img/pergamino-bg.png'), #f4e4bc;
    background-size: cover;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.8), inset 0 0 100px rgba(139, 69, 19, 0.2);
    border: 2px solid #8b4513;
    color: #000000;
    font-family: 'Kalam', cursive;
    position: relative;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}

.u-popup-bg h2 {
    font-family: 'Pirata One', cursive;
    color: #000000 !important;
    font-size: 2.2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(74, 52, 17, 0.2);
    padding-bottom: 10px;
}

.u-popup-bg p {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 25px;
    color: #000000;
    font-weight: 600;
}

.u-popup-bg .campaña {
    background: rgba(139, 69, 19, 0.1) !important;
    border: 1px solid rgba(139, 69, 19, 0.3) !important;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.u-popup-bg .campaña:hover {
    background: rgba(139, 69, 19, 0.15) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.u-popup-bg .boton-dorado {
    background: #4a3411;
    color: #f4e4bc;
    border: none;
    box-shadow: 0 4px 0 #2a1d0a;
}

.u-popup-bg .boton-dorado:hover {
    background: #5d4216;
    transform: translateY(-1px);
}

/* --- Pirate Prompt Overlay --- */
.pirate-prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.pirate-prompt-overlay.visible {
    display: flex;
}

.pirate-prompt-content {
    background: url('../img/pergamino-bg.png'), #f4e4bc;
    background-size: cover;
    padding: 50px;
    border-radius: 10px;
    box-shadow: 0 10px 100px rgba(0,0,0,1);
    border: 2px solid #8b4513;
    max-width: 500px;
    width: 90%;
    text-align: center;
    color: #000000;
    font-family: 'Kalam', cursive;
    font-weight: 500;
    line-height: 1.4;
}

.pirate-prompt-content h2,
.pirate-prompt-content h3 {
    font-family: 'Pirata One', cursive !important;
    color: #000000 !important;
    margin-top: 0;
    font-weight: bold;
}

.pirate-prompt-input {
    width: 100%;
    padding: 15px;
    margin: 20px 0;
    background: rgba(139, 69, 19, 0.4); /* Más opaco para contraste */
    border: 1px solid rgba(139, 69, 19, 0.6);
    border-radius: 5px;
    color: var(--accent-gold); /* Texto legible */
    font-family: 'Kalam', cursive;
    font-weight: 700;
    font-size: 1.25rem;
    outline: none;
    text-align: center;
}

.pirate-prompt-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}
/* --- Buzón de Sugerencias --- */

.sugerencia-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid var(--accent-gold);
}

.sugerencia-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.sugerencia-card.status-visible { border-left-color: var(--accent-teal); }
.sugerencia-card.status-denied { border-left-color: var(--accent-red); opacity: 0.7; }
.sugerencia-card.status-pending { border-left-color: var(--accent-gold); }
.sugerencia-card.status-merged { border-left-color: #555; }

.sugerencia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(226, 184, 101, 0.1);
    padding-bottom: 10px;
}

.category-tag {
    background: rgba(226, 184, 101, 0.2);
    color: var(--accent-gold);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.timestamp {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sug-text {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: var(--text-main);
}

.sug-img-preview {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    border: 1px solid var(--accent-gold);
    cursor: pointer;
    transition: transform 0.2s;
    background: #0003;
}

.sug-img-preview:hover {
    transform: scale(1.05);
}

.sugerencia-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-top: 15px;
    font-size: 0.85rem;
}

.status-badge {
    margin-left: auto;
    font-weight: bold;
    letter-spacing: 1px;
}

.badge-seccion {
    background: rgba(44, 154, 163, 0.2);
    color: var(--accent-teal);
    padding: 2px 10px;
    border-radius: 4px;
    border: 1px solid rgba(44, 154, 163, 0.4);
}

/* Estilos de Motín (Likes) */
.mutiny-support-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 8px;
    box-shadow: none;
}

.mutiny-support-btn:hover {
    color: var(--accent-gold);
    background: rgba(226, 184, 101, 0.1);
    transform: scale(1.1);
}

.mutiny-support-btn.active {
    color: var(--accent-gold);
    text-shadow: 0 0 10px var(--accent-gold);
}

.mutiny-count {
    font-weight: bold;
    font-family: 'Cinzel', serif;
}

/* --- Nuevos Estilos para Limpieza de Inline Styles --- */

.panel-filtros-pirata {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid #d4c5a3;
    color: #333;
}

.panel-filtros-pirata label {
    color: #333;
}

.filtros-flex-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.selector-filtros-mini {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #b89b65;
    background: white;
}

/* Tarjetas de Vídeo (JS Generated) */
.video-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #b89b65;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.video-thumb-wrapper {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    background: #000;
}

.video-thumb-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 3rem;
    opacity: 0.8;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.video-duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: sans-serif;
}

.video-info-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.video-badges-row {
    font-size: 14px;
    color: #666;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.video-badge-tag {
    background: #e0e0e0;
    padding: 2px 8px;
    border-radius: 4px;
    color: #333;
}

.video-type-label {
    color: #b89b65;
    font-weight: bold;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    display: block;
    margin-top: 5px;
}

.video-card-title {
    margin: 0;
    font-size: 1.1rem;
    color: #8b0000;
    text-align: center;
    font-family: 'Pirata One', cursive;
}

.video-card-author {
    margin: 0;
    font-size: 0.9rem;
    color: #333;
    text-align: center;
    font-style: italic;
}

/* Sugerencias Fixes */
.sugerencia-form-textarea {
    text-align: left;
    height: 150px;
    font-size: 1rem;
}

.sugerencia-file-input {
    background: rgba(226, 184, 101, 0.1);
    border: 1px dashed var(--accent-gold);
    width: 100%;
}

.upload-progress-container {
    margin-top: 10px;
    color: var(--accent-gold);
}

.admin-btn-negative {
    background: var(--accent-red) !important;
}

/* Footer Fixes */
.footer-credits-highlight {
    color: var(--accent-gold);
}

.sugerencia-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* Comentarios */
.comments-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed rgba(226, 184, 101, 0.3);
}

.comments-list {
    margin-bottom: 15px;
}

.comment-item {
    background: rgba(0,0,0,0.2);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.comment-item strong {
    color: var(--accent-gold);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Ajustes para el formulario pirata */
.form-pirata .form-row label {
    display: block;
    margin-bottom: 10px;
    font-family: 'Cinzel', serif;
    color: var(--accent-gold);
}


/* --- Perfil y Descargas Styles --- */
.u-title-hero {
    font-family: 'Pirata One', cursive;
    font-size: 3rem;
}

.perfil-panel {
    background: #e6ddc5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #b89b65;
}

.perfil-form-group {
    margin-bottom: 15px;
}

.perfil-form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.perfil-form-col {
    flex: 1;
    min-width: 150px;
}

.perfil-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #3e2723;
}

.perfil-form-group input,
.perfil-form-group select,
.perfil-form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #8d6e63;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #fffaf0;
}

.perfil-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.perfil-checkbox-group input {
    width: auto;
}

.perfil-list-item {
    border-bottom: 1px solid #b89b65;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.perfil-action-btn {
    font-size: 1.2rem !important;
    width: 100%;
}

.btn-brown {
    background-color: #2c3e50 !important;
}

.btn-orange {
    background-color: #d35400 !important;
}

.u-margin-top-md {
    margin-top: 15px !important;
}

/* --- Downloads Styles --- */
.download-category {
    margin-bottom: 30px;
}

.download-category h2 {
    border-bottom: 2px solid #b89b65;
    padding-bottom: 10px;
}

.download-list {
    list-style: none;
    padding: 0;
}

.download-item {
    background: rgba(255, 255, 255, 0.8);
    margin: 10px 0;
    padding: 15px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #d4c5a3;
}

.download-item:hover {
    background: rgba(255, 255, 255, 1);
}

.file-info {
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: bold;
    font-size: 1.1rem;
    color: #8b0000;
}

.file-desc {
    font-size: 0.9rem;
    color: #555;
}

.btn-download {
    background-color: #2c3e50;
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.btn-download:hover {
    background-color: #34495e;
}

/* --- Rankings Styles --- */
.rankings-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}
.rankings-seccion-titulo {
  font-family: 'Cinzel', serif;
  color: var(--accent-gold);
  text-align: center;
  margin-bottom: 25px;
  font-size: 1.8rem;
  text-shadow: 0 0 10px rgba(226, 184, 101, 0.3);
}
.parchment-table-container {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--accent-gold);
  border-radius: 8px;
  padding: 5px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  margin-bottom: 40px;
  overflow-x: auto;
}
.rankings-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Outfit', sans-serif;
  color: #fff;
  font-size: 0.9rem;
}
.rankings-table th {
  background: rgba(226, 184, 101, 0.15);
  color: var(--accent-gold);
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 15px;
  text-align: left;
  border-bottom: 2px solid var(--accent-gold);
  white-space: nowrap;
}
.rankings-table td {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(226, 184, 101, 0.1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.rankings-table tr:hover {
  background: rgba(226, 184, 101, 0.05);
}
.status-recorded {
  color: #4cd137;
  font-weight: bold;
}
.status-pending-text {
  color: var(--accent-gold);
  font-style: italic;
}
.btn-detalle {
  background: var(--accent-gold);
  color: #000;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: all 0.2s ease;
}
.btn-detalle:hover {
  background: #fff;
  transform: scale(1.05);
}
.btn-delete {
  background: #c0392b;
  color: white;
  margin-left: 5px;
}
.btn-delete:hover {
  background: #e74c3c;
}
.rankings-actions {
  text-align: center;
  margin-top: 20px;
}
.btn-clear-all {
  background: #c0392b !important;
  border: none !important;
  margin-left: 10px !important;
}
.prestigio-score {
  font-weight: bold;
  color: var(--accent-gold);
}
.empty-message {
  text-align: center;
  padding: 50px;
  font-style: italic;
  color: var(--text-muted);
}

/* Modal Rankings Styling */
.ranking-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.ranking-modal-overlay.visible {
  display: flex;
}
.ranking-modal-content {
  background: url('img/pergamino-bg.png'), #f4e4bc;
  background-size: cover;
  width: 90%;
  max-width: 600px;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 0 50px rgba(0,0,0,0.8);
  border: 3px solid #8b4513;
  font-family: 'Kalam', cursive;
  color: #000;
  max-height: 90vh;
  overflow-y: auto;
}
.ranking-modal-content h2 {
  font-family: 'Pirata One', cursive;
  text-align: center;
  color: #4a3411;
  font-size: 2.2rem;
  margin-top: 0;
  border-bottom: 2px solid rgba(74, 52, 17, 0.2);
  padding-bottom: 10px;
  text-transform: none;
  text-shadow: none;
}
.ranking-form-row {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ranking-form-row label {
  font-weight: bold;
  font-size: 1.1rem;
  color: #331d06;
}
.ranking-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.ranking-input, .ranking-select {
  padding: 10px;
  border: 1px solid #8b4513;
  border-radius: 5px;
  background: rgba(139, 69, 19, 0.05);
  font-family: 'Kalam', cursive;
  font-size: 1.1rem;
  color: #000;
  outline: none;
}
.companions-check-container {
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(139, 69, 19, 0.1);
  padding: 10px;
  border-radius: 8px;
}
#companions-area {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px dashed rgba(139, 69, 19, 0.3);
}
.companion-row {
  background: rgba(255, 255, 255, 0.3);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid rgba(139, 69, 19, 0.2);
}
.companion-row h4 {
  margin: 0 0 10px 0;
  font-family: 'Pirata One', cursive;
  color: #4a3411;
}
.modal-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}
.btn-ranking-save {
  background: #4a3411;
  color: #f4e4bc;
  cursor: pointer;
}
.btn-ranking-cancel {
  background: #8b4513;
  color: #f4e4bc;
}
.ranking-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* --- Changelog Styles --- */
.changelog-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}
.changelog-item {
  background: rgba(17, 26, 46, 0.7);
  border: 1px solid var(--accent-gold);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.changelog-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(226, 184, 101, 0.15);
  border-color: var(--accent-gold-hover);
}
.changelog-date {
  font-size: 0.9rem;
  color: var(--accent-gold);
  font-family: 'Cinzel', serif;
  margin-bottom: 10px;
  display: block;
}
.changelog-title {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 10px;
  font-family: 'Cinzel', serif;
}
.changelog-desc {
  color: var(--text-main);
  line-height: 1.6;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  margin-left: 10px;
  vertical-align: middle;
}
.badge-feature {
  background: rgba(44, 154, 163, 0.2);
  color: var(--accent-teal);
  border: 1px solid var(--accent-teal);
}
.badge-fix {
  background: rgba(201, 64, 64, 0.2);
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
}
.header-section {
  text-align: center;
  margin-bottom: 40px;
}
.back-btn {
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* --- Videos Section --- */
.video-gallery {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-top: 30px;
}

@media (max-width: 1200px) {
    .video-gallery { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 992px) {
    .video-gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .video-gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .video-gallery { grid-template-columns: 1fr; }
}

.video-placeholder {
    background: rgba(0, 0, 0, 0.1);
    border: 2px dashed var(--accent-gold);
    padding: 40px;
    text-align: center;
    border-radius: 10px;
    color: var(--text-muted);
}

/* --- Painting Section --- */
.painting-section {
    margin-bottom: 40px;
    background: rgba(0, 0, 0, 0.4);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--accent-gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.painting-section h2 {
    border-bottom: 1px solid var(--accent-gold);
    padding-bottom: 15px;
    color: var(--accent-gold);
    font-family: 'Cinzel', serif;
    margin-top: 0;
}
