html, body {
    height: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: black;
    background-image: url("img/layout/lay_content.jpg");
    background-size: cover;
    background-repeat: repeat;
    font-family: Verdana, Arial, sans-serif;
    font-size: 100.00%;
    line-height: 1.2;
    padding: 0px;
    margin: 0px;
}

p:first-child,
h1:first-child, h2:first-child, h3:first-child, h4:first-child,
h1+p, h2+p, h3+p, h4+p {
    margin-top: 0px;
}

h1 { padding-top: 5px; font-size: 16px; }
h2 { font-size: 14px; }
h3 { font-size: 12px; font-weight: bold; }
h4 { font-size: 12px; font-weight: bold; font-style: italic; margin-bottom: 5px; }
h5 { font-size: 10px; font-weight: bold; margin-bottom: 3px; }
p { margin: 0px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

a:link, a:visited { color: #840000; text-decoration: none; }
a:active, a:hover { color: #072350; text-decoration: none; }
a.premium { font-weight: bold; }

img { border: 0px; padding: 0px; margin: 0px; }
hr { border: 0px; border-top: solid 1px black; }
form { margin: 0px; }
label { cursor: pointer; }
input { font-size: 12px; font-weight: normal; }
input[type=radio], input[type=checkbox] { vertical-align: middle; }

.fila-resaltada td {
    background: #fcf8e3 !important;
}

.mainpane {
    margin: 0px auto;
    max-width: 840px;
    width: 100%;
    overflow: visible;
}

.mainpanehelp {
    margin: 0px auto;
    max-width: 920px;
    width: 100%;
    overflow: visible;
}

.contentpane {
    padding: 0px 10px 15px 10px;
}

table.borderlist {
    padding: 0px;
    margin: 0px auto;
    border-spacing: 0px;
    border: 1px solid #CFAB65;
    border-collapse: collapse;
    empty-cells: show;
}

.borderlist th {
    background: url(img/layout/bg_table_head.png) repeat;
    padding: 0 3px;
    height: 36px;
    border: 1px solid #CFAB65;
    font-size: 12px;
}

.borderlist td {
    background: url(img/layout/bg_table_cell.jpg) repeat;
    padding: 0 3px;
    height: 21px;
    border: 1px solid #CFAB65;
    font-size: 12px;
}

/* MODIFICADO: Estilos para la celda de unidad para alinear múltiples iconos */
.unit-cell {
    gap: 5px; 
}

/* NUEVO: Hacer que los iconos clicables tengan un cursor de puntero */
.unit-cell .js-note-trigger {
    cursor: pointer;
}

.new-attack-icon {
    width: 16px;
    height: 16px;
}

.note-icon {
    width: 16px;
    height: 16px;
}
/* FIN DE NUEVOS ESTILOS */

.attack-counter-container {
    margin-bottom: 1em;
}
.attack-counter {
    color: #840000;
    font-size: 2em;
    font-weight: bold;
}
.attack-counter-hidden {
    color: gray;
    font-size: 1.2em;
    font-weight: normal;
    margin-left: 10px;
}


#fab-open-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #840000;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

#overlay.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

#side-panel-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 350px;
    max-width: 90%;
    height: 100%;
    background: url(img/layout/lay_content.jpg) repeat;
    z-index: 1002;
    box-shadow: -4px 0 10px rgba(0,0,0,0.3);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
}

#side-panel-container.is-open {
    transform: translateX(0);
}

#btn-close-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
}

.acordeon {
    padding-top: 15px;
}
.acordeon-header {
    background-color: rgba(207, 171, 101, 0.1);
    color: #840000;
    cursor: pointer;
    padding: 12px 15px;
    width: 100%;
    border: 1px solid #CFAB65;
    border-bottom: none;
    text-align: left;
    outline: none;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    position: relative;
}

.acordeon-header:last-of-type {
   border-bottom: 1px solid #CFAB65; /* El último botón sí tiene borde inferior */
}

.acordeon-header.active, .acordeon-header:hover {
    background-color: rgba(207, 171, 101, 0.2);
}

.acordeon-header::before {
    content: '+';
    color: #840000;
    font-weight: bold;
    position: absolute;
    right: 15px;
    transition: transform 0.3s ease;
}

.acordeon-header.active::before {
    transform: rotate(45deg);
}

.acordeon-panel {
    padding: 0 15px;
    background-color: rgba(0,0,0,0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    border-left: 1px solid #CFAB65;
    border-right: 1px solid #CFAB65;
}

.acordeon-panel.show {
    padding: 15px 15px;
    border-bottom: 1px solid #CFAB65;
}

.acordeon-panel .seccion-panel:not(:last-child) {
    margin-bottom: 20px;
}

/* NUEVO: Estilos para la ventana modal de notas */
#note-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1050;
    display: none; /* Oculta por defecto */
    justify-content: center;
    align-items: center;
}

#note-modal-overlay.is-visible {
    display: flex; /* Muestra la modal */
}

#note-modal {
    background: url(img/layout/lay_content.jpg) repeat;
    padding: 20px;
    border: 2px solid #CFAB65;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
}

#note-modal h3 {
    margin-top: 0;
    color: #840000;
    text-align: center;
}

#note-textarea {
    width: 100%;
    min-height: 120px;
    margin-top: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #CFAB65;
    font-family: Verdana, Arial, sans-serif;
    font-size: 14px;
    padding: 5px;
    box-sizing: border-box; /* Asegura que el padding no afecte el ancho */
}

.note-modal-buttons {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.note-modal-buttons button {
    padding: 8px 16px;
    border: 1px solid #840000;
    background-color: #840000;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

.note-modal-buttons #btn-delete-note {
    background-color: transparent;
    color: #840000;
    margin-right: auto; /* Alinea este botón a la izquierda */
}