body {
    margin: 0;
    font-family: Andada Pro, serif;
    background-color: #121212;
    color: #fff;
}

header {
    position: relative;
    height: 80vh;
    overflow: hidden;
    margin-top: 0;
}

header .overlay {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    text-align: center;
    padding: 0 20px;
    color: white;
}

/* ===== FOOTER ===== */
footer {
    background: #1a1a2e;
    color: white;
    padding: 20px;
    text-align: center;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-left {
    flex: 1;
    text-align: left;
}

.footer-right {
    display: flex;
    gap: 30px;
    align-items: center;
}

.footer-right a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.footer-right a:hover {
    color: #e94560;
}

section {
    padding: 50px 20px;
    max-width: 1200px;
    margin: auto;
}

.button-container {
    text-align: center;
    margin: 40px 0;
}

nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    box-sizing: border-box;
    display: flex;
    flex-direction: column; /* CAMBIA A COLUMNA para ambos */
    padding: 15px 20px;
}

.nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.nav-bottom {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    display: block; /* Siempre visible por defecto */
}

.desktop-play-button {
    display: none;
}

nav a {
    color: #ccc;
    text-decoration: none;
    padding: 10px 20px;
    transition: color 0.3s;
    font-weight: 600;
}

nav a:not(.play-button) {
    color: #ccc;
    display: flex;
    text-decoration: none;
    padding: 0 20px;
    transition: color 0.3s;
    font-weight: 600;
    align-items: center; /* Centra verticalmente el texto */
    justify-content: center;
    height: auto; /* Altura automática */
    min-height: 40px; /* Altura mínima */
    border-radius: 5px;
}

nav a:not(.play-button):hover {
    color: #fff;
    background-color: transparent;
    border-radius: 5px;
}

nav a:hover {
    color: #fff;
    background-color: transparent;
    border-radius: 5px;
}

.lang-btn {
    background-color: #2e2e2e;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 15px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    transition: background-color 0.3s;
    height: 100%; /* Igual que la imagen de Discord */
    box-sizing: border-box;
    white-space: nowrap;
}

.lang-btn svg {
    stroke: white;
    transition: transform 0.3s ease;
}

.lang-btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.flag-icon {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}

.language-dropdown {
    position: relative;
    font-size: 1em;
    user-select: none;
    display: flex;
    align-items: center;
    height: 100%;
}

.lang-btn:hover, .lang-btn:focus {
    background-color: #ff6600;
    outline: none;
}

.lang-list {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #2e2e2e;
    margin: 5px 0 0 0;
    padding: 0;
    list-style: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    width: max-content;
    min-width: 140px;
    z-index: 100;
}

.lang-list[hidden] {
    display: none;
}

.lang-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    cursor: pointer;
    color: white;
    font-weight: 500;
    border-radius: 6px;
}

.lang-list li:hover, .lang-list li:focus {
    background-color: #ff6600;
    outline: none;
}

.lang-list li[aria-selected="true"] {
    background-color: #ff6600;
    font-weight: 700;
}

.language-dropdown .lang-btn {
    padding: 10px 15px !important;
    height: 40px;
}

.language-dropdown .flag-icon {
    width: 20px;
    height: 14px;
}

.discord-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 5px;
}

.discord-button img {
    width: 42px; /* Tamaño óptimo para igualar altura */
    height: 42px;
    filter: brightness(0.8);
    transition: filter 0.3s ease;
    border-radius: 4px;
    cursor: pointer;
    display: block;
}

.discord-button:hover img {
    filter: brightness(1);
}

.play-button {
    background-color: transparent;
    color: #ccc;
    padding: 12px 25px;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.3s, border 0.3s;
    white-space: nowrap;
    cursor: pointer;
    border: 2px solid #ccc;
    display: inline-block;
    text-align: center;
}

.play-button:hover {
    color: white;
    border: 2px solid white;
    background-color: transparent;
}

.kickstarter-button {
    background-color: #05ce78; /* Kickstarter green */
    color: #fff;
    padding: 15px 30px;
    font-size: 1.2em;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(5, 206, 120, 0.4);
    display: inline-block;
    transition: background-color 0.3s, box-shadow 0.3s;
    cursor: pointer;
    font-weight: 700;
    border: none;
    font-family: 'Montserrat', sans-serif; /* Kickstarter-like */
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.kickstarter-button:hover {
    background-color: #04b96a;
    box-shadow: 0 6px 12px rgba(5, 206, 120, 0.5);
}

#habilidades-container {
    flex: 0 0 400px; /* ancho fijo de 400px */
    width: 400px;
    padding: 0 15px;
    text-align: center;
}

.container > div:nth-child(2) {
    flex: 1; /* toma el resto del espacio */
    width: 100%;
    max-width: none; /* elimina límite */
}

#habilidades {
    display: flex;
    flex-direction: row;
    align-items: flex-start; /* Alinea todas las imágenes en la parte superior */
    gap: 10px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0;
    margin: 0 -15px;
    /* Estilos para la barra de scroll */
    scrollbar-width: thin; /* Para Firefox */
    scrollbar-color: #00bcd4 #2e2e2e; /* Color del scroll (Firefox) */
}

#habilidades > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px; /* Ancho mínimo para cada habilidad */
    flex: 0 0 auto; /* Evita que se compriman */
}

#habilidades > div p {
    margin-top: 5px;
    font-size: 12px;
    text-align: center;
    user-select: none;
}

#habilidades p {
    text-align: center;
    font-size: 12px;
    margin: 0;
    line-height: 1.3;
    max-width: 80px; /* Mismo ancho que el contenedor */
    word-wrap: break-word;
}

#habilidades img {
    width: 60px;
    height: 60px;
    object-fit: contain; /* Asegura que la imagen mantenga sus proporciones */
    margin-bottom: 5px; /* Espacio entre imagen y texto */
}

#habilidades img.selected {
    border: 2px solid #00bcd4;
    box-shadow: 0 0 10px #00bcd4;
    transform: scale(1.1);
}

#habilidades img:hover {
    transform: scale(1.1);
    border: 2px solid #00bcd4;
}

.container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 40px; /* espacio entre habilidades y video */
    max-width: 1400px;
    margin: 0 auto; /* centra el contenedor en la página */
    padding: 80px 20px;
    box-sizing: border-box;
}

header video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

#descripcionHabilidad {
    width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* añade espacio a los lados */
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: left;
}

#videoHabilidad {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
}

#videoHabilidad video,
#videoHabilidad source {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== RESPONSIVO: MÓVIL ===== */
@media (max-width: 768px) {
    nav {
        padding: 10px 15px;
    }

    .nav-top {
        flex-direction: column;
        gap: 15px;
    }

    .nav-left {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .nav-right {
        justify-content: center;
        width: 100%;
    }

    .nav-bottom {
        margin-top: 15px;
    }

    .nav-bottom .play-button {
        width: 90%;
        max-width: 300px;
        padding: 15px 20px;
    }
}

/* ===== ESCRITORIO (PC) ===== */
@media (min-width: 769px) {
    nav {
        padding: 20px 20px;
    }

    .nav-bottom {
        margin-top: 25px;
    }

    .nav-bottom .play-button {
        background-color: rgba(255, 255, 255, 0.1);
        border: 2px solid #ff6600;
        color: white;
        font-size: 1.1em;
        padding: 15px 30px;
        display: inline-block;
    }

    .nav-bottom .play-button:hover {
        background-color: #ff6600;
        color: white;
    }
}