/* Estilos específicos para el modo de adivinar habilidades */

/* Fondo específico para el modo de habilidades */
.abilities-mode-background {
    background-image: url('../src/backgrounds/abilities-mode.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.abilities-mode-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Aumentado la opacidad del fondo */
    z-index: 0;
}

/* Estilos para el listado de intentos */
.attempts-list-container {
    position: fixed;
    left: 20px;
    top: 100px;
    width: 250px; /* Aumentado el ancho */
    background-color: rgba(15, 25, 35, 0.8);
    border-radius: 8px;
    padding: 20px; /* Aumentado el padding */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-height: 75vh; /* Aumentado la altura máxima */
    overflow-y: auto;
    z-index: 10;
}

.attempts-list-title {
    font-family: 'Tungsten', sans-serif;
    font-size: 2rem; /* Aumentado el tamaño de fuente */
    color: #ffffff;
    text-align: center;
    margin-bottom: 15px; /* Aumentado el margen inferior */
    letter-spacing: 2px; /* Aumentado el espaciado entre letras */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Añadido sombra al texto */
}

.attempts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.attempt-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px; /* Aumentado el padding */
    border-radius: 6px; /* Aumentado el radio del borde */
    background-color: rgba(255, 0, 0, 0.2); /* Cambiado a rojo para intentos incorrectos */
    border: 1px solid rgba(255, 0, 0, 0.5); /* Añadido borde rojo */
    transition: all 0.3s ease;
    margin-bottom: 5px; /* Añadido margen inferior */
}

.attempt-item.correct {
    background-color: rgba(0, 128, 0, 0.3);
    border: 1px solid #00ff00;
}

.attempt-item img {
    width: 40px; /* Aumentado el tamaño */
    height: 40px; /* Aumentado el tamaño */
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3); /* Añadido borde */
}

.attempt-item span {
    font-family: 'Tungsten', sans-serif;
    font-size: 1.4rem; /* Aumentado el tamaño de fuente */
    color: #ffffff;
    letter-spacing: 1.5px; /* Aumentado el espaciado entre letras */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Añadido sombra al texto */
}

.attempt-item.correct span {
    color: #00ff00;
    font-weight: bold;
}

.ability-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: rgba(15, 25, 35, 0.8);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ability-image-container {
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.ability-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    z-index: 1;
}

.image-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    z-index: 2;
}

.cover-part {
    background-color: rgb(0 0 0);
    transition: opacity 0.3s ease;
}

#cover-part-1 {
    grid-column: 1;
    grid-row: 1;
}

#cover-part-2 {
    grid-column: 2;
    grid-row: 1;
}

#cover-part-3 {
    grid-column: 1;
    grid-row: 2;
}

#cover-part-4 {
    grid-column: 2;
    grid-row: 2;
}

.ability-hints {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.hint-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.hint-label {
    font-family: 'Tungsten', sans-serif;
    font-size: 1.2rem;
    color: #ffffff;
    letter-spacing: 1px;
}

.hint-value {
    font-family: 'Tungsten', sans-serif;
    font-size: 1.2rem;
    color: #ff4655;
    letter-spacing: 1px;
}

.hint-button {
    background-color: #ff4655;
    color: white;
    border: none;
    padding: 10px 20px;
    font-family: 'Tungsten', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.hint-button:hover {
    background-color: #ff2a3a;
}

.hint-button:disabled {
    background-color: #666;
    cursor: not-allowed;
}

/* Estilos para los botones de teclas */
.ability-key-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
    width: 100%;
    position: relative;
}

.key-button {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #1f2326;
    color: white;
    border: 2px solid #ece8e1;
    border-radius: 8px;
    font-family: 'Tungsten', sans-serif;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    position: relative;
    /* Efecto 3D para simular teclas reales */
    border-bottom: 4px solid #ece8e1;
}

.key-button:hover {
    background-color: #ff4655;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

.key-button.selected {
    background-color: #ff4655;
    transform: translateY(2px);
    border-bottom-width: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.key-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent);
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    pointer-events: none;
}

.key-button.highlight {
    animation: pulse 1s infinite;
    border-color: #ff4655;
}

.key-button.incorrect-key {
    background-color: #ff0000;
    border-color: #ff0000;
    animation: shake 0.5s;
}

.key-button.correct-key {
    background-color: #00cc00;
    border-color: #00cc00;
    animation: pulse-green 1s;
    transform: translateY(2px);
    border-bottom-width: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 204, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 204, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 204, 0, 0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 70, 85, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 70, 85, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 70, 85, 0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.temp-message {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    text-align: center;
    color: #ff4655;
    font-weight: bold;
    background-color: rgba(15, 25, 35, 0.8);
    padding: 8px;
    border-radius: 5px;
    animation: fadeIn 0.3s;
}

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

.ability-details {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-family: 'Arial', sans-serif;
    color: white;
    line-height: 1.5;
}

.ability-details p {
    margin: 5px 0;
}

/* Estilos para el autocompletado de habilidades */
.autocomplete-container {
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: rgba(15, 25, 35, 0.95);
    border: 1px solid #ff4655;
    border-radius: 4px;
    z-index: 1000;
    margin-top: 2px;
}

.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    color: white;
    font-family: 'Tungsten', sans-serif;
    letter-spacing: 1px;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.autocomplete-item:hover {
    background-color: rgba(255, 70, 85, 0.3);
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .ability-container {
        padding: 15px;
    }
    
    .ability-image-container {
        height: 150px;
    }
    
    .hint-label, .hint-value {
        font-size: 1rem;
    }
    
    .hint-button {
        font-size: 1rem;
        padding: 8px 16px;
    }
    
    .attempts-list-container {
        position: relative;
        left: 0;
        top: 0;
        width: 100%;
        max-width: 600px;
        margin: 0 auto 25px auto; /* Aumentado el margen inferior */
        max-height: 250px; /* Aumentado la altura máxima */
        z-index: 1;
        padding: 15px; /* Ajustado el padding */
    }
    
    .cooldown-message {
        width: 90%;
        padding: 15px;
    }
    
    .cooldown-message p {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .ability-container {
        padding: 10px;
    }
    
    .ability-image-container {
        height: 120px;
    }
    
    .hint-row {
        padding: 8px;
    }
    
    .hint-label, .hint-value {
        font-size: 0.9rem;
    }
    
    .hint-button {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    .attempts-list-container {
        padding: 10px;
        max-height: 150px;
    }
    
    .attempts-list-title {
        font-size: 1.6rem; /* Aumentado el tamaño de fuente */
        margin-bottom: 12px; /* Aumentado el margen inferior */
        letter-spacing: 1.5px; /* Ajustado el espaciado entre letras */
    }
    
    .attempt-item {
        padding: 8px; /* Aumentado el padding */
        gap: 8px; /* Aumentado el espacio entre elementos */
        border-radius: 5px; /* Ajustado el radio del borde */
    }
    
    .attempt-item img {
        width: 35px; /* Aumentado el tamaño */
        height: 35px; /* Aumentado el tamaño */
    }
    
    .attempt-item span {
        font-size: 1.2rem; /* Ajustado el tamaño de fuente */
    }
    
    .attempt-item span {
        font-size: 0.9rem;
    }
}