* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

body {
    background-color: #f0f0f0;
    padding: 20px;
}

.container {
    max-width: 100%;
    padding: 10px;
    overflow-x: hidden;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-container {
    margin-bottom: 20px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    max-width: 600px;
    gap: 20px;
}

.card-image-container {
    flex-shrink: 0;
}

.card-image {
    width: 200px;
    height: 280px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.card-image:hover {
    transform: scale(1.05);
}

.card-info {
    flex-grow: 1;
    padding: 10px;
}

.card-name {
    font-weight: bold;
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 10px;
}

.card-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

#player-count {
    width: 60px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

#player-names-container {
    width: 100%;
    margin-bottom: 20px;
}

#player-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.player-input {
    display: flex;
    align-items: center;
}

.player-input label {
    min-width: 100px;
}

.player-input input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#players-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#players-table th, #players-table td {
    padding: 8px 6px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-size: 0.9rem;
}

#players-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

#players-table tr:hover {
    background-color: #f5f5f5;
}

#players-table td:first-child {
    text-align: left;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}

/* Estilos para los diferentes tipos de puntos */
.energy-value {
    color: #FF8C00; /* Naranja brillante */
    font-weight: bold;
}

.blue-value {
    color: #007BFF; /* Azul */
    font-weight: bold;
}

.red-value {
    color: #DC3545; /* Rojo */
    font-weight: bold;
}

/* Estilo para el fondo verde de jugadores */
.green-background {
    background-color: #a5d6a7;
    transition: background-color 0.3s ease;
}

.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#finish-btn {
    background-color: #f44336;
}

#finish-btn:hover {
    background-color: #d32f2f;
}

/* Estilos para el botón y panel de configuración */
.config-btn {
    margin-top: 20px;
    background-color: #2196F3;
}

.config-btn:hover {
    background-color: #0b7dda;
}

.config-panel {
    width: 100%;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.config-panel h3 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.config-input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.config-input-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.config-input-group input, 
.config-input-group textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.config-input-group textarea {
    min-height: 80px;
    resize: vertical;
}

.config-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

#add-card-btn {
    background-color: #4CAF50;
}

#add-card-btn:hover {
    background-color: #45a049;
}

#close-config-btn {
    background-color: #757575;
}

#close-config-btn:hover {
    background-color: #616161;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    /* Ajustes para tablets */
    .container {
        padding: 10px;
    }
    
    .card-container {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .card-image-container {
        margin-bottom: 15px;
        width: 100%;
        text-align: center;
    }
    
    .card-image {
        width: 180px;
        height: 252px;
    }
    
    .card-info {
        width: 100%;
        text-align: center;
    }
    
    #players-table th, #players-table td {
        padding: 6px 4px;
        font-size: 0.8rem;
    }
    
    .buttons-cell {
        gap: 0px;
    }
    
    .plus-btn, .minus-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    #players-table td:first-child {
        max-width: 100px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    /* Ajustes para móviles */
    .container {
        padding: 5px;
    }
    
    .card-image {
        width: 150px;
        height: 210px;
    }
    
    .card-name {
        font-size: 1.1rem;
    }
    
    .card-description {
        font-size: 0.8rem;
    }
    
    /* Hacer la tabla scrollable horizontalmente */
    #game-container {
        width: 100%;
        overflow-x: auto;
    }
    
    #players-table {
        min-width: 400px; /* Ancho mínimo para asegurar legibilidad */
    }
    
    #players-table th, #players-table td {
        padding: 5px 3px;
        font-size: 0.75rem;
    }
    
    #players-table th {
        white-space: normal;
        font-size: 0.7rem;
    }
    
    .plus-btn, .minus-btn {
        width: 20px;
        height: 20px;
        font-size: 11px;
        margin: 0;
    }
    
    .buttons-cell {
        gap: 0px;
        padding: 2px;
    }
    
    /* Ajustes para botones y controles */
    button {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .input-group {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .input-group label {
        margin-bottom: 5px;
        width: 100%;
        text-align: center;
    }
    
    /* Hacer el indicador de cooldown más pequeño */
    .cooldown-indicator {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    /* Ajustes para el modal del ganador */
    .modal-content {
        max-width: 90%;
        padding: 15px;
    }
    
    .winner-name {
        font-size: 1.8rem;
    }
    
    .trophy {
        font-size: 3rem;
    }
    
    #players-table td:first-child {
        max-width: 80px;
        font-size: 0.75rem;
    }
}

/* Para pantallas muy pequeñas */
@media (max-width: 360px) {
    .card-image {
        width: 130px;
        height: 182px;
    }
    
    #players-table {
        min-width: 300px;
    }
    
    .plus-btn, .minus-btn {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
    
    #players-table th, #players-table td {
        padding: 4px 2px;
        font-size: 0.7rem;
    }
    
    #players-table td:first-child {
        max-width: 60px;
        font-size: 0.7rem;
    }
}

/* Estilos para el modal del ganador */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    position: relative;
    z-index: 1001;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.5s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.winner-name {
    color: #2196F3;
    font-size: 2.5rem;
    margin: 10px 0;
}

.trophy {
    font-size: 4rem;
    margin: 20px 0;
    animation: trophyGlow 2s infinite alternate;
}

@keyframes trophyGlow {
    from {
        text-shadow: 0 0 5px gold;
    }
    to {
        text-shadow: 0 0 20px gold, 0 0 30px orange;
    }
}

.winner-score {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 20px;
}

.close-modal-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.close-modal-btn:hover {
    background-color: #45a049;
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    pointer-events: none;
}

/* Estilos para los botones de control en la tabla */
.buttons-cell {
    display: flex;
    justify-content: center;
    gap: 0px;
}

.plus-btn, .minus-btn {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.plus-btn {
    background-color: #2196F3;
}

.plus-btn:hover {
    background-color: #0b7dda;
}

.minus-btn {
    background-color: #f44336;
}

.minus-btn:hover {
    background-color: #d32f2f;
}

/* Estilos para la carta bloqueada y el indicador de cooldown */
.card-locked {
    filter: grayscale(70%);
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.cooldown-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    animation: pulse 1s infinite alternate;
    z-index: 10;
}

@keyframes pulse {
    from {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3);
    }
    to {
        transform: translate(-50%, -50%) scale(1.1);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
} 