body {
    background-color: #1a1a1a;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

header {
    text-align: center;
    margin-top: 20px;
    border-bottom: 2px solid #d4af37; /* Dorado metálico */
    padding-bottom: 10px;
    width: 80%;
}

h1 {
    margin: 0;
    font-size: 2.5rem;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.subtitle {
    font-size: 1rem;
    color: #a0a0a0;
}

.main-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    width: 100%;
    max-width: 1400px;
    flex-direction: column; /* Cambiado a columna para poner el banner arriba */
    align-items: center;
}

#board {
    width: 400px;
    margin-top: 40px; /* Espacio entre la fila superior y el tablero */
}

.controls {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 350px;
    height: 400px;
    box-sizing: border-box;
    justify-content: space-between;
}

label {
    font-weight: bold;
    color: #d4af37;
}

select, button {
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #444;
    background-color: #333;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

button:hover {
    background-color: #444;
    border-color: #d4af37;
}

button.primary {
    background-color: #d4af37;
    color: #1a1a1a;
    font-weight: bold;
    border: none;
}

button.primary:hover {
    background-color: #b5952f;
}

.status-box {
    margin-top: 20px;
    padding: 10px;
    background-color: #333;
    border-left: 4px solid #d4af37;
}

/* Estilos para la sección de videos */
.video-section {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
    max-width: 350px; /* Ancho para la columna central */
    height: 400px;
    justify-content: flex-start; /* Alinea el contenido arriba */
}
.video-wrapper {
    flex-grow: 1; /* Hace que el contenedor del video crezca */
    display: flex;
    flex-direction: column;
    min-height: 0; /* Solución para overflow en flexbox */
}
.video-section h3 {
    color: #d4af37;
    border-bottom: 1px solid #555;
    padding-bottom: 8px;
    margin-top: 0;
    font-size: 1.1rem;
}
.video-section video {
    width: 100%;
    border-radius: 4px;
    flex-grow: 1; /* Hace que el video ocupe el espacio disponible */
    object-fit: contain; /* Muestra todo el video sin recortar */
    min-height: 0; /* Solución para overflow en flexbox */
}
.video-section .video-wrapper p {
    text-align: center;
    color: #ccc;
    margin-top: 8px;
    font-size: 0.9rem;
}

/* Estilos para los Asides (Barras laterales) */
.sidebar {
    flex: 1; /* Para que ocupen mitad y mitad en el banner */
    background-color: #222;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #444;
    font-size: 0.9rem;
}
.sidebar h3 {
    color: #d4af37;
    border-bottom: 1px solid #555;
    padding-bottom: 8px;
    margin-top: 0;
    font-size: 1.1rem;
}
.sidebar ul {
    padding-left: 0;
    list-style: none;
}
.sidebar li {
    margin-bottom: 15px;
    color: #ccc;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}
.sidebar strong {
    color: #e0e0e0;
    display: block;
    margin-bottom: 4px;
}
.game-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around; /* Distribuye los elementos en la fila */
    gap: 40px;
    width: 100%;
}

/* Nuevo estilo para el Banner (Asides juntos) */
.banner-section {
    display: flex;
    width: 100%;
    gap: 20px;
    justify-content: space-between;
    margin-top: 40px; /* Separación visual */
}

/* Ajustes para móviles */
@media (max-width: 900px) {
    .game-area {
        flex-direction: column;
        align-items: center;
    }
    #board {
        width: 100%;
        max-width: 400px;
    }
    .banner-section {
        flex-direction: column;
    }
}

/* Estilos para la sección de información */
.info-section {
    width: 90%;
    max-width: 800px;
    margin: 40px 0;
    padding: 30px;
    background-color: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    line-height: 1.6;
}
.info-section h2 {
    color: #d4af37;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-top: 30px;
}
.info-section h3 {
    color: #e0e0e0;
    margin-top: 20px;
    font-size: 1.2rem;
}
.info-section ul {
    padding-left: 20px;
    color: #ccc;
}
.info-section li {
    margin-bottom: 10px;
}
.info-section p {
    color: #ccc;
}

footer {
    margin-top: auto;
    padding: 50px 20px;
    text-align: center;
    color: #888;
    background-color: #222;
    border-top: 1px solid #333;
    width: 100%;
}

footer .footer-title {
    color: #d4af37;
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}

/* Estilos del Carrusel */
.carousel-container {
    width: 100%; 
    max-width: 350px; /* Ancho para la columna izquierda */
    height: 400px; /* Mismo alto que el tablero para simetría */
    border-radius: 4px;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    border: 1px solid #444;
    background-color: #000;
}
.carousel-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Muestra la imagen completa sin recortar */
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.carousel-container img.active {
    opacity: 1;
}

/* Selector de Idioma */
.lang-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Estilos para el Tema Claro (Light Mode) */
body.light-theme {
    background-color: #f4f4f4;
    color: #222;
}
body.light-theme .controls,
body.light-theme .sidebar,
body.light-theme .info-section,
body.light-theme .video-section,
body.light-theme footer {
    background-color: #ffffff;
    border-color: #ccc;
    color: #333;
}
body.light-theme .subtitle,
body.light-theme .sidebar li,
body.light-theme .info-section p,
body.light-theme .info-section ul,
body.light-theme .video-section .video-wrapper p,
body.light-theme footer {
    color: #555;
}
body.light-theme .sidebar strong,
body.light-theme .info-section h3 {
    color: #222;
}
body.light-theme select,
body.light-theme button {
    background-color: #e0e0e0;
    color: #333;
    border-color: #bbb;
}
body.light-theme button:hover {
    background-color: #d0d0d0;
}
body.light-theme button.primary {
    background-color: #d4af37;
    color: #1a1a1a;
    border: none;
}
body.light-theme button.primary:hover {
    background-color: #b5952f;
}
body.light-theme .status-box {
    background-color: #eee;
    color: #333;
}

/* Estilos para la sección de Descarga APK */
.download-container {
    text-align: center;
    margin-top: 25px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.download-btn {
    display: inline-block;
    background-color: #28a745; /* Verde éxito */
    color: white;
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 50px;
    transition: transform 0.2s, background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.download-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
    color: white;
}

.download-btn .icon {
    margin-right: 8px;
}

.small-info {
    font-size: 0.85rem;
    color: #888;
    margin-top: 10px;
    font-style: italic;
}

/* Estilos para iframes (Responsive) */
.info-section iframe {
    max-width: 100%;
}

/* Estilos para el embed responsive de Itch.io */
.itch-io-embed {
    text-align: center;
}

.iframe-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 552px; /* Ancho máximo del embed original */
    margin: 0 auto; /* Centrar el contenedor */
    /* Proporción de aspecto: 167px / 552px = 0.3025 */
    padding-top: 30.25%;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}