/* Estilos específicos para el modo de Sound Skins */

/* Botón de regreso fijo */
.fixed-back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: rgba(15, 25, 35, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-family: 'Tungsten', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    z-index: 1000;
    transition: all 0.3s ease;
    border: 1px solid #ff4655;
}

.fixed-back-button:hover {
    background-color: #ff4655;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Botón para reportar bugs */
.report-bug-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: rgba(15, 25, 35, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-family: 'Tungsten', sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    z-index: 1000;
    transition: all 0.3s ease;
    border: 1px solid #ff4655;
}

.report-bug-button:hover {
    background-color: #ff4655;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Footer */
.footer {
    position: fixed;
    bottom: 10px;
    left: 10px;
    font-size: 1.3rem;
    color: white;
    background-color: transparent;
    z-index: 10;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.footer a {
    color: var(--primary-color, #ff4655);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-hover-color, #ff7b86);
}

/* Fondo específico para el modo de sound skins */
.sound-skins-mode-background {
    background-image: url('/src/backgrounds/skins-mode.webp'); /* Usando el mismo fondo que skins por ahora */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.sound-skins-mode-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.sound-skins-game-content {
    position: relative;
    z-index: 1;
    background-color: rgba(15, 25, 35, 0.8);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    width: 100%;
}

/* Estilos para el contenedor del reproductor de audio */
.sound-player-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#skin-sound {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 4px;
    display: none; /* Ocultar el reproductor de audio nativo */
}

/* Estilos para el contenedor de ayuda */
.hint-container {
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background-color: rgba(70, 130, 255, 0.2);
    border: 1px solid #4682ff;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Estilos para el contenedor de la imagen de ayuda */
.hint-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Estilos para la imagen de ayuda */
.hint-image {
    max-width: 200px;
    height: auto;
    border-radius: 4px;
    transition: filter 0.5s ease;
}

.play-sound-button {
    background-color: #ff4655;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: 'Tungsten', sans-serif;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    width: 80%;
    max-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.play-sound-button.with-icon {
    padding: 0.8rem 1.5rem;
}

.play-sound-button:hover {
    background-color: #ff7b86;
}

.play-sound-button:disabled {
    background-color: #888;
    cursor: not-allowed;
}

.play-icon, .pause-icon {
    width: 24px;
    height: 24px;
}

/* Estilos para el reproductor de audio personalizado */
.custom-audio-player {
    width: 100%;
    margin-bottom: 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.audio-progress-container {
    width: 100%;
    padding: 0.5rem 0;
}

.audio-progress-bar {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.audio-progress-fill {
    height: 100%;
    background-color: #ff4655;
    width: 0;
    border-radius: 4px;
    transition: width 0.1s linear;
}

/* Estilos para el input de búsqueda */
.skin-search-container {
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
}

.skin-search-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid #ff4655;
    border-radius: 4px;
    color: #0f1923;
    font-family: 'Tungsten', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    outline: none;
    transition: all 0.3s ease;
}

.skin-search-input:focus {
    border-color: #ff7b86;
    box-shadow: 0 0 8px rgba(255, 70, 85, 0.5);
}

.skin-search-input:disabled {
    background-color: rgba(200, 200, 200, 0.3);
    border-color: #888;
    color: #ccc;
    cursor: not-allowed;
}

/* Estilos para el contenedor de cooldown */
.cooldown-container {
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(255, 70, 85, 0.2);
    border: 1px solid #ff4655;
    border-radius: 4px;
    text-align: center;
}

.cooldown-text {
    color: white;
    font-size: 1.1rem;
    margin: 0;
    font-weight: bold;
    letter-spacing: 0.5px;
}

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

.autocomplete-item {
    padding: 0.8rem 1rem;
    cursor: pointer;
    color: white;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.autocomplete-skin-image {
    width: 80px;
    height: 40px;
    object-fit: contain;
    margin-right: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 4px;
}

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

.autocomplete-icon {
    width: 70px;
    height: 30px;
    object-fit: contain;
    border-radius: 4px;
    filter: grayscale(100%) brightness(0.7) contrast(1.2);
    opacity: 0.8;
}

.autocomplete-skin-image {
    width: 80px;
    height: 40px;
    object-fit: contain;
    margin-right: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 4px;
}

.autocomplete-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.9rem;
}

/* Estilos para la tabla de skins */
.skin-table-container {
    width: 100%;
    border-radius: 4px;
    overflow: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-height: 270px;
}

.skin-table-header {
    display: grid;
    grid-template-columns: 1fr 2fr;
    background-color: #ff4655;
    color: white;
    font-weight: bold;
    padding: 1rem;
    text-align: center;
}

.skin-table-body {
    max-height: 400px;
    overflow-y: auto;
    background-color: rgba(15, 25, 35, 0.9);
}

.skin-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}

.skin-row:hover {
    background-color: rgba(255, 70, 85, 0.1);
}

.skin-cell {
    padding: 0.5rem;
    text-align: center;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.skin-cell img {
    max-height: 80px;
    max-width: 150px;
    object-fit: contain;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.skin-cell img:hover {
    transform: scale(1.1);
}

/* Estilos para el modal de éxito */
.success-modal {
    background-color: rgba(15, 25, 35, 0.95);
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: relative;
}

.success-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.success-modal-title {
    color: #ff4655;
    font-size: 2.5rem;
    margin: 0;
    font-family: 'Tungsten', sans-serif;
    letter-spacing: 1px;
}

.success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.success-message {
    text-align: center;
    margin-bottom: 1.5rem;
    color: white;
}

.success-message p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.success-message h3 {
    font-size: 2rem;
    color: #ff4655;
    margin: 0;
    font-family: 'Tungsten', sans-serif;
    letter-spacing: 1px;
}

.success-skin-image {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.success-skin-image img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.cooldown-message {
    text-align: center;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.1rem;
}

.success-close-button {
    background-color: #ff4655;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: 'Tungsten', sans-serif;
    letter-spacing: 1px;
}

.success-close-button:hover {
    background-color: #ff7b86;
}

/* Colores para las coincidencias */
.match {
    background-color: #4eff46; /* Verde para coincidencia exacta */
}

.partial-match {
    background-color: #ffb946; /* Naranja para coincidencia parcial (arma correcta) */
}

.no-match {
    background-color: #ff4655; /* Rojo para sin coincidencia */
}

/* Responsive */
@media (max-width: 768px) {
    .skin-table-header,
    .skin-row {
        grid-template-columns: 0.8fr 2fr;
    }
    
    .skin-cell img {
        max-height: 40px;
        max-width: 80px;
    }
    
    .success-modal {
        width: 95%;
        padding: 1.5rem;
    }
    
    .success-modal-title {
        font-size: 2rem;
    }
    
    .success-message h3 {
        font-size: 1.8rem;
    }

    .play-sound-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}