/* General Styles */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: Arial, sans-serif;
    overflow-x: hidden; /* Evita el desbordamiento horizontal */
}

#loading-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
}
#loading-bar {
    width: 80%;
    background: #ddd;
    border-radius: 10px;
    overflow: hidden;
}
#loading-bar-progress {
    width: 0;
    height: 20px;
    background: #4caf50;
}
#loading-text {
    margin-top: 10px;
    color: white;
}

#controls-container {
    display: none;
}
@media (max-width: 768px) {
    #controls-container {
        display: flex;
        position: absolute;
        bottom: 40px;
        width: 100%;
        justify-content: center;
        gap: 10px;
    }
    .control-button {
        padding: 10px;
        font-size: 16px;
        background-color: rgba(0, 0, 0, 0.5);
        color: white;
        border: none;
        border-radius: 5px;
        flex: 1;
        max-width: 100px;
    }
}

.container-index-page {
    background: url('../images/background.webp') no-repeat center center fixed;
    background-size: cover;
}

.container {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 110px);
    overflow-y: auto;
    padding-top: 70px;
    padding-bottom: 70px;
}

.historia-page .container {
    background: url('../images/background-historia.webp') no-repeat center center fixed;
    background-size: cover;
}

.blockchain-page .container {
    background: url('../images/background2.webp') no-repeat center center fixed;
    background-size: cover;
}

/* Header Styles */
header {
    background: linear-gradient(to bottom, var(--menu-background) 50%, transparent 50%);
    padding: 10px 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    height: 60px;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: auto;
}

.logo {
    height: 50px;
    margin-left: 0;
}

.nav-menu {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 10px;
    flex-grow: 1;
    justify-content: center;
    align-items: center;
    position: relative;
}

.nav-menu li {
    margin: 0;
}

.nav-menu li a {
    color: var(--menu-button-text);
    background-color: var(--menu-button-background);
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: color 0.3s ease, background-color 0.3s ease;
    border: none;
}

.nav-menu li a:hover {
    color: var(--menu-button-hover-text);
    background-color: var(--menu-button-hover-background);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--menu-text);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
}


@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: center;
    }
    .nav-menu {
        flex-direction: column;
        width: 50%;
        display: none;
        align-items: center;
    }
    .nav-menu li {
        width: 100%;
        text-align: center;
    }
    .nav-menu li a {
        display: block;
        padding: 10px;
        border-bottom: 1px solid #444444;
    }
    .nav-menu.show {
        display: flex;
    }

    .menu-toggle {
        display: block;
        align-self: center;
        margin-top: -60px;
    }
    .overlay.show {
        display: block;
    }
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

.content {
    padding: 20px;
    max-width: 900px;
    margin: auto;
    text-align: left;
}

h1, h2 {
    text-align: center;
    color: #ffee00;
    font-family: 'Comic Sans MS', cursive, sans-serif;
}

p, ul li {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    color: #ffee00;
}

ul {
    list-style-type: none;
    padding: 0;
}

ul li {
    background: #ff0000;
    margin: 10px 0;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

ul li:hover {
    transform: scale(1.05);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 20px auto;
    border: 5px solid #333;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

footer {
    height: 50px;
    background-color: rgba(0, 0, 0, 0.8);
    color: rgb(224, 228, 29);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: fixed;
    bottom: 0;
    width: 100%;
    font-size: 1em;
}

footer p {
    margin: 0;
    padding: 0;
}

.story-section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
}

.story-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.next-button {
    display: none;
    margin: 20px auto;
    padding: 10px 20px;
    font-size: 16px;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background-color: var(--menu-button-background);
    color: var(--menu-button-text);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.next-button:hover {
    background-color: var(--menu-button-hover-background);
    color: var(--menu-button-hover-text);
}

#main-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 10px;
    color: white;
    width: 90%;
    max-width: 800px;
}
#main-menu ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: space-around;
    flex-wrap: wrap;
}
#main-menu ul li {
    margin: 5px 0;
}
#main-menu ul li a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 5px;
}
#main-menu ul li a i {
    margin-right: 5px;
}

@media (max-width: 600px) {
    #main-menu ul {
        flex-direction: column;
        align-items: center;
    }
    #main-menu {
        top: 10%;
        left: 50%;
        transform: translate(-50%, 0);
        width: 100%;
        border-radius: 0;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.story-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

@media (min-width: 768px) {
    .story-content {
        flex-direction: row;
    }
}

.story-content.reverse {
    flex-direction: column-reverse;
}

@media (min-width: 768px) {
    .story-content.reverse {
        flex-direction: row-reverse;
    }
}

.comic-panel, .story-text {
    flex: 1;
}

#download-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

#download-menu h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #ff6347;
}

#download-menu a {
    display: inline-block;
    margin: 0 10px;
    color: white;
    text-decoration: none;
    transition: transform 0.2s ease, color 0.3s ease;
}

#download-menu a:hover {
    transform: scale(1.1);
    color: #ff6347;
}

#download-menu img {
    width: 50px;
    height: 50px;
    margin-bottom: 5px;
}

.wallet-page .container {
    background: url('../images/background2.webp') no-repeat center center fixed;
    background-size: cover;
    overflow-y: auto;
    padding-top: 70px;
    padding-bottom: 70px;
}

.wallet-page .content {
    padding: 20px;
    max-width: 900px;
    margin: auto;
    text-align: center;
}

.wallet-page h2 {
    color: #fff;
}

.wallet-page a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s ease, color 0.3s ease;
}

.wallet-page a:hover {
    transform: scale(1.1);
    color: #ff6347;
}

.wallet-page img {
    width: 50px;
    height: 50px;
    margin-bottom: 5px;
}
