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

body {
    /* Eliminamos 'background: black' y lo reemplazamos por esto: */
    background-color: black; /* Un color de fondo por si la imagen no carga */
    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.1;
    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; }

/* --- Clases de Utilidad --- */
.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; } /* Hereda la fuente de body */
input[type=radio], input[type=checkbox] { vertical-align: middle; }

/* --- Layout Responsivo --- */
.mainpane {
    margin: 0px auto;
    max-width: 840px; /* Cambio clave para responsividad */
    width: 100%;
    overflow: visible;
}

.mainpanehelp {
    margin: 0px auto;
    max-width: 920px; /* Cambio clave para responsividad */
    width: 100%;
    overflow: visible;
}

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

/* --- Estilos de Tablas --- */
table.borderlist {
    padding: 0px;
    margin: 0px auto; /* Centrar tabla */
    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;
}

/* --- Estilos para el Contador de Ataques --- */
.attack-counter-container {
    margin-bottom: 1em; /* Espacio extra */
}
.attack-counter {
    color: #840000; /* Rojo del tema */
    font-size: 2em; /* Tamaño grande */
    font-weight: bold;
}
.attack-counter-hidden {
    color: gray;
    font-size: 1.2em; /* Un poco más grande que el texto normal */
    font-weight: normal;
    margin-left: 10px;
}

/* ======================================= */
/* ========= ESTILOS PANEL LATERAL ========= */
/* ======================================= */
#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;
}