/* Estilos para las encuestas de LaLiga Fantasy */
.laliga-polls-wrapper {
    max-width: 450px;
    margin: 0 auto;
}

.poll-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    padding: 20px;
    text-align: center;
}

.poll-duration {
    text-transform: uppercase;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 20px;
    color: #333;
}

.top-player, .bottom-player {
    margin-bottom: 15px;
}

.player-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px;
}

.player-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.team-logo {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.vs-text {
    font-weight: bold;
    font-size: 18px;
    margin: 15px 0;
}

.vote-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.vote-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.player1-btn {
    background-color: #f5f5f5;
    color: #333;
}

.player2-btn {
    background-color: #26c9ac;
    color: white;
}

.poll-results {
    margin-top: 15px;
}

.results-text {
    display: flex;
    justify-content: space-between;
}

.result-player1, .result-player2 {
    font-weight: bold;
}

.vote-count {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.no-polls {
    text-align: center;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 10px;
}

/**
 * Estilos para LaLiga Fantasy Polls - Diseño optimizado
 */

/* Estilos generales */
.laliga-poll-creator,
.laliga-polls-container,
.laliga-player-ranking,
.laliga-user-ranking {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
    color: #333;
}

/* Rejilla de encuestas */
.polls-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 20px 0;
}

/* Tarjeta de comparación */
.laliga-comparison-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Título/Duración */
.comparison-duration {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Nuevo: Alias de la encuesta */
.comparison-alias {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
    text-align: center;
    font-style: italic;
}

/* Nuevo: Descripción de la encuesta */
.comparison-description {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
    padding: 0 15px;
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 10px;
}

/* Estilos para jugadores */
.comparison-player {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.player-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 8px;
    background: #f2f2f2;
}

.player-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%; /* Ajustar para fotos de caras */
}

.player-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    text-align: center;
}

.team-logo {
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.team-logo img {
    max-width: 100%;
    max-height: 100%;
}

/* Texto VS */
.comparison-vs {
    font-size: 18px;
    font-weight: 600;
    color: #666;
    margin: 10px 0;
}

/* Botones de votación */
.comparison-voting {
    width: 100%;
    margin-top: 10px;
}

.voting-buttons {
    display: flex;
    gap: 10px;
}

.vote-button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.player1-button {
    background: #f2f2f2;
    color: #333;
}

.player2-button {
    background: #26c9ac;
    color: white;
}

/* Resultados de votación */
.comparison-results {
    width: 100%;
    margin-top: 10px;
}

.results-percentage {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.percentage-player1, .percentage-player2 {
    font-weight: 600;
    font-size: 14px;
}

.results-votes {
    text-align: center;
    font-size: 12px;
    color: #666;
}

/* Mensaje cuando no hay encuestas */
.no-polls-message {
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    color: #666;
}

/* Estilos para formulario de creación */
.laliga-modern-form {
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-top: 20px;
}

.form-header {
    margin-bottom: 20px;
    text-align: center;
}

.form-header h3 {
    color: #333;
    font-size: 20px;
    margin: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background-color: #f9f9f9;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.poll-options {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.poll-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.poll-option input[type="radio"] {
    margin-right: 8px;
}

.players-selection h4 {
    text-align: center;
    margin-bottom: 15px;
    color: #444;
}

.selected-players-vs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.player-slot {
    width: 45%;
    cursor: pointer;
}

.empty-player {
    height: 150px;
    border: 2px dashed #ddd;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f9f9f9;
    transition: all 0.2s;
}

.empty-player:hover {
    border-color: #bbb;
    background-color: #f0f0f0;
}

.add-player-icon {
    font-size: 30px;
    color: #aaa;
    margin-bottom: 10px;
}

.selected-player {
    height: 150px;
    border-radius: 15px;
    background-color: #f9f9f9;
    padding: 10px;
    text-align: center;
    position: relative;
}

.selected-player-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 8px;
}

.selected-player-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.selected-player-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.selected-player-team {
    font-size: 14px;
    color: #666;
}

.remove-player {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-search-container {
    position: relative;
    margin-bottom: 15px;
}

#player-search {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background-color: #f9f9f9;
}

.search-results {
    position: absolute;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.player-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.player-item:hover {
    background-color: #f5f5f5;
}

.player-item:last-child {
    border-bottom: none;
}

.player-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
    flex-shrink: 0;
    border: 1px solid #eee;
    background-color: #f9f9f9;
}

.player-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-info {
    flex-grow: 1;
}

.player-info .player-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
    text-align: left;
}

.player-info .player-team {
    font-size: 14px;
    color: #666;
}

.error-message {
    color: #f44336;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.laliga-submit-btn {
    width: 100%;
    padding: 12px;
    background-color: #26c9ac;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.laliga-submit-btn:hover {
    background-color: #22b79e;
}

.poll-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.poll-message .success {
    background-color: #e6f7f1;
    color: #26c9ac;
    padding: 15px;
    border-radius: 8px;
}

.poll-message .error {
    background-color: #ffebee;
    color: #f44336;
    padding: 15px;
    border-radius: 8px;
}

/* Responsive modificado para mantener la presentación en fila para móviles */
@media (max-width: 480px) {
    .selected-players-vs {
        flex-direction: row; /* Mantener en fila */
        gap: 10px; /* Reducir el espacio entre elementos */
    }
    
    .player-slot {
        width: 45%; /* Mantener el ancho proporcionalmente */
    }
    
    .vs-indicator {
        font-size: 16px; /* Reducir tamaño para móviles */
    }
    
    /* Ajustes para mejorar visualización en pantallas pequeñas */
    .empty-player, .selected-player {
        height: 130px; /* Reducir altura */
    }
    
    .selected-player-photo {
        width: 60px; /* Reducir tamaño de la foto */
        height: 60px;
    }
    
    .selected-player-name {
        font-size: 14px; /* Texto más pequeño */
    }
    
    .selected-player-team {
        font-size: 12px; /* Texto más pequeño */
    }
    
    /* Ajustes para las opciones de encuesta en móvil */
    .poll-options {
        flex-direction: column; /* Apilar opciones en móvil */
        gap: 8px;
    }
}