/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    font-family: 'Arial', sans-serif;
    color: #fff;
    background-color: #1c1c1c;
    line-height: 1.6;
    --sb-track-color: #232E33;
    --sb-thumb-color: #f0c040;
    --sb-size: 15px;
}

body::-webkit-scrollbar {
    width: var(--sb-size);
}

body::-webkit-scrollbar-track {
    background: var(--sb-track-color);
    border-radius: 12px;
}

body::-webkit-scrollbar-thumb {
    background: var(--sb-thumb-color);
    border-radius: 12px;
    border: 1px solid #232E33;
}

@supports not selector(::-webkit-scrollbar) {
    body {
        scrollbar-color: var(--sb-thumb-color) var(--sb-track-color);
    }
}

/* Encabezado */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 50px;
    background-color: #333;
}

header .logo-container {
    display: flex;
    align-items: center;
}

header .logo {
    margin-right: 15px; /* Espacio entre el logo y el título */
}

header .logo img {
    width: 50px;
}

header .title h1 {
    font-size: 1.5em; /* Ajusta el tamaño del texto según sea necesario */
    color: #fff; /* Color del texto para que contraste con el fondo */
    margin: 0; /* Elimina el margen por defecto */
}

header .title h1 a {
    text-decoration: none;
    color: #fff;
}

header .title h1 a:hover {
    color: #f0c040;
}

/* Nav */
header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

header nav a {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: #f0c040;
}

/* Sección de Batallas */
#batallas {
    padding: 50px 20px;
    text-align: center;
}

#batallas h2 {
    margin-bottom: 20px;
    font-size: 2em;
}

#batallas p {
    font-size: 1.2em;
    margin-bottom: 40px;
}

/* Carrusel */
.carousel-container {
    overflow: hidden; /* Oculta el scrollbar */
    position: relative; /* Necesario para el arrastre */
    background-color: #1c1c1c;
}

.carousel {
    display: flex;
    gap: 50px;
    height: 500px;
    transition: transform 0.3s ease; /* Suaviza el desplazamiento */
}

/* Cartas */
.battle-card {
    width: 300px;
    height: 400px;
    margin-top: 50px;
    perspective: 1000px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.4s ease, box-shadow 0.4s ease; /* Añadida transición para hover */
}


.battle-card .card-front, .battle-card .card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    background-color: #333;
    border: 2px solid #f0c040;
    border-radius: 10px;
    padding: 20px;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    transition: transform 0.6s ease;
    overflow: hidden; /* Evita que el contenido desborde la carta */
}

.battle-card .card-front img {
    width: 100%;
    height: 70%;
    object-fit: cover;
    border-radius: 10px;
}

.battle-card .card-front h3, .battle-card .card-back h3 {
    margin-top: 10px;
    font-size: 1.2em;
}

.battle-card .card-front h3 {
    color: #f0c040;

}
.battle-card .card-back {
    transform: rotateY(180deg);
}
.battle-card .card-back h3 {
    color: #f0c040;
    margin-bottom: 20px;
}

.battle-card.flipped .card-front {
    transform: rotateY(180deg);
}

.battle-card.flipped .card-back {
    transform: rotateY(0deg);
}

/* Flecha hacia arriba */
#back-to-top {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background-color: #f0c040; 
    color: rgb(0, 0, 0); 
    border-radius: 50%;
    text-align: center;
    line-height: 2rem;
    width: 2rem;
    height: 2rem;
}

#back-to-top a {
    text-decoration: none;
    color: #000000; 
}

#back-to-top:hover {
    background-color: #555; 
    transform: scale(1.1);
}

#back-to-top:hover a {
    color: #fff; 
}
/* Footer */
footer {
    background-color: #504f4f;
    padding: 20px;
    text-align: center;
}

footer p {
    margin-bottom: 10px;
}

footer .social img {
    width: 30px;
    margin: 0 10px;
    transition: transform 0.3s ease;
}

footer .social img:hover {
    transform: scale(1.2);
}


/* Evitar el segundo scrollbar y temblores */
body {
    overflow-x: hidden; /* Elimina cualquier scrollbar lateral */
}

html {
    overflow-y: auto; /* Asegura que solo haya un scrollbar vertical */
    height: 100%;
}
